Sarab

Using Sarab

Installing apps

Install APKs and split bundles, open apps from your launcher, and remove them again.

Install

sarab install app.apk

It takes a single .apk, or a split bundle, .apks or .xapk. You can also double-click any of them in your file manager: the installer registers itself for those files, and answers with a desktop notification when there is no terminal to answer in. Android is started first if it is not running.

$ sarab install ~/Downloads/F-Droid.apk
installing F-Droid.apk ...
installed F-Droid (org.fdroid.fdroid)

Installing a newer version of an app you have updates it in place and keeps its data.

When Android refuses an app, Sarab says why in words, with Android’s code after it. The ones you are most likely to meet:

Sarab says What to do
this app is built for ARM processors only Look for an x86_64 build of the app. See below.
this app comes in several pieces Install the whole bundle (.apks, .xapk), not one APK from it.
a copy of this app signed by someone else is already installed Remove the installed one first with sarab app rm.
a newer version of this app is already installed Android does not downgrade apps.
this app needs a newer Android than the one Sarab runs (13) There is no way around it.

ARM-only apps

Android runs here on x86_64, and there is no translation layer for ARM code yet. Many apps ship only ARM native code, and Sarab refuses those at install time rather than letting them crash later. Apps written only in Java or Kotlin, and apps that include x86_64 libraries, install and run. F-Droid and many open-source apps publish x86_64 builds.

Where to get apps

  • An open store. Install F-Droid’s APK, and install and update apps from inside it.
  • The Play Store, with the Google apps image, once the device is registered. See Google Play.
  • APK files you trust, with sarab install.

Sarab is not a sandbox, so treat an Android app like any program you install on your desktop: only from sources you trust. See Security.

Open

Every app you install gets an entry in your app launcher, with its icon, and opens in its own window. Clicking an entry starts Android when it is not running. The entry also has an App Settings action, which opens Android’s settings page for that app, in launchers that show actions.

From a terminal:

sarab app ls                              # the apps you can open, and their packages
sarab app launch org.fdroid.fdroid        # what the launcher entry runs

sarab app ls lists every app with a launcher activity, including Android’s own:

PACKAGE                      SOURCE   NAME
org.lineageos.jelly          system   Browser
com.android.calculator2      system   Calculator
org.fdroid.fdroid            user     F-Droid
com.android.settings         system   Settings

Android’s built-in apps (system in that list) have launcher entries too, but hidden ones, so they do not crowd your launcher. Open them with sarab app launch, for example sarab app launch com.android.settings. --json and -q (package names only) are there for scripts.

To see Android’s whole interface in one window instead of a single app, run sarab app show.

sarab app intent android.intent.action.VIEW https://example.com

Sends an intent into Android, and prints the package that handled it. It is how you hand a web address, or any URI, to whichever Android app claims it.

Details

sarab app inspect org.fdroid.fdroid

Shows what Android knows about one app. Add --json for scripts.

Remove

sarab app rm org.fdroid.fdroid

Removing an app takes a few seconds, and closes any Android apps you have open: Android restarts its own system services after an uninstall, a known issue in the image that Sarab waits out for you. Apps that are part of the Android image cannot be removed; sarab policy can switch them off (see Inside Android).

    Type to search the documentation.