Getting started
Updating and uninstalling
Update Sarab from a newer checkout, move Android to the image it is tested with, or remove everything.
Update Sarab
Pull, then run the installer again with the same prefix:
git pull
packaging/install.sh --prefix ~/.local
Your apps and data are kept. If the new version is tested with a newer Android image, the installer says so at the end, and so do sarab start and sarab info. If Android is running, restart it to use the new version: sarab restart.
Upgrade the Android image
Each version of Sarab is tested with one pair of Android images, pinned by SHA-256. When that pair moves, sarab upgrade downloads the new one and moves Android onto it:
sarab upgrade --check # only say whether an upgrade is due
sarab upgrade # asks first, then stops and starts Android around it
The new image is extracted next to the old one and swapped in only once it is complete, so a failed upgrade leaves Android on the image it had. Your apps, accounts and settings in Android’s data are kept. --yes skips the question, for scripts.
sarab setup --latest downloads the newest published build rather than the tested one. That is untested by definition, and its checksum comes from the same server as the build.
Uninstall
packaging/install.sh uninstall --prefix ~/.local # keeps Android and its data
packaging/install.sh uninstall --prefix ~/.local --purge # deletes them too
Uninstalling removes exactly what the install created, plus the launcher entries and icons Android’s apps had, since they would run a sarab that is gone. It stops before removing anything if Android is running.
It never touches systemd or AppArmor, which it did not change; it prints the commands for those instead:
systemctl --user disable --now sarab && systemctl --user daemon-reload
sudo apparmor_parser -R /etc/apparmor.d/sarab-ns && sudo rm /etc/apparmor.d/sarab-ns
Delete only Android
With Sarab still installed, sarab purge deletes the Android image and Android’s data, after asking. Android must be stopped first.
sarab stop
sarab purge # the image and all data
sarab purge --data-only # apps, accounts and settings; keeps the image
Android’s files belong to your sub-ids, not to your user, so a plain rm -rf cannot remove them all. sarab purge deletes them from inside Android’s namespace.