Reference
Files and directories
Where Sarab keeps Android's image and data, its logs and its launcher entries, and how to move the data elsewhere.
Sarab keeps everything in the usual places under your home directory. sarab info prints every path in use:
Directories
mode installed
data /home/you/.local/share/sarab/android
overlay /home/you/.local/share/sarab/overlay (ok)
state /home/you/.local/state/sarab
runtime /run/user/1000/sarab
icons /home/you/.local/share/sarab/icons
sarab-ns /home/you/.local/lib/sarab/sarab-ns
sarab-hostd /home/you/.local/lib/sarab/sarab-hostd
Where things are
Sarab follows the XDG base directories:
| What | Where |
|---|---|
| The Android image, Android’s data, and the files Sarab generates for it | $XDG_DATA_HOME/sarab/android, usually ~/.local/share/sarab/android, or the directory you chose with --data-dir |
| Logs | $XDG_STATE_HOME/sarab, usually ~/.local/state/sarab |
| The FIFO for Android’s kernel log, the start lock | $XDG_RUNTIME_DIR/sarab |
| Sarab’s own overlay files for the image | <prefix>/share/sarab/overlay |
sarab-ns, sarab-hostd |
<prefix>/lib/sarab |
| Launcher entries for Android’s apps | ~/.local/share/applications/sarab.<package>.desktop |
| Their icons | ~/.local/share/sarab/icons |
| The saved data directory, if you chose one | ~/.config/sarab/data-dir |
Set XDG_DATA_HOME or XDG_STATE_HOME in ~/.config/environment.d, not only in your shell’s startup file, or the systemd unit and your shell will use different directories.
Moving Android’s data
Choose where Android lives before the first download:
sarab setup --data-dir /mnt/big-disk/sarab
Sarab remembers the directory. It needs about 5 GB there, and checks the free space before it downloads anything. Changing the directory later only changes where Sarab looks: Android’s existing data is not moved with it yet.
Who owns Android’s files
Most of Android’s files belong to your sub-ids, 100000 and up, rather than to your own user: that is how Android’s many users map onto your one. It is also why a plain rm -rf cannot delete Android’s data. Use sarab purge, which deletes it from inside Android’s namespace.