Getting started
Installation
Build Sarab, install it into your home directory, and start Android for the first time.
Sarab is built from source. It takes three commands, and none of them needs root.
git clone https://github.com/SL0wZEr/sarab && cd sarab
packaging/install.sh --prefix ~/.local
sarab start
The rest of this page says what each one does. If something about your machine needs changing first, Sarab stops and prints the exact command to run: see Requirements.
1. Build and install
You need Rust 1.88 or newer. From the checkout:
packaging/install.sh --prefix ~/.local
The script builds Sarab in release mode, then copies it into the prefix and says what it wrote:
~/.local/bin/sarab, the one command;- its two helpers,
sarab-nsandsarab-hostd, in~/.local/lib/sarab; - the files Sarab lays over Android’s image, in
~/.local/share/sarab/overlay, and its documentation in~/.local/share/doc/sarab; - a systemd user unit,
sarab.service, which it writes but never enables; - a handler that installs an
.apkwhen you double-click it, made the default only if you have none; - shell completion for bash, and for fish when fish is installed.
It ends by listing whatever is still missing on this machine, such as pasta or an AppArmor profile, with the command that fixes it. Make sure ~/.local/bin is on your PATH; the script warns when it is not.
The prefix must be outside the checkout. Running the script again later is safe, and is how you update.
2. Start Android
sarab start
The first time, this sets Android up with you, in the terminal:
- It checks this computer: binder, the host tools, your sub-ids and your GPU. Anything missing stops it here, before the download, with the fix.
- It asks which Android you want. With Google apps (recommended) has the Play Store, Google sign-in, and the many apps that need Google; Google asks you to register the device once. Without Google apps has no Google account and sends nothing to Google; install apps from
.apkfiles or an open store such as F-Droid. - It says where Android goes and how much space it takes, 1.4 GB to download and about 5 GB on disk, and asks before it downloads anything.
- It downloads the image, checks it against the SHA-256 Sarab is tested with, and prepares it. A dropped download resumes.
- It boots Android for the first time, which takes longer than later boots.
- With Google apps, it waits for Google Play services to check in and shows how to register this device. See Google Play.
From then on, sarab start boots Android in a couple of seconds and returns once it is up:
$ sarab start
Android is up (1.5 s)
To keep Android somewhere other than ~/.local/share/sarab/android, answer no and run sarab setup --data-dir DIR first.
Expect notification sounds after a first start with Google apps. Google Play services keeps posting a reminder until the device is registered; registering stops it.
3. Install an app
sarab install app.apk
Or double-click the file. The app appears in your app launcher; open it from there, or with sarab app launch <package>. Installing apps has the details, including bundles and what to do about ARM-only apps.
Start Android at login
You do not have to: opening an app from the launcher starts Android when it is not running. If you would rather have it ready at login:
systemctl --user enable --now sarab
The install script never does this for you, because it boots Android at every login. Running in the background says more.