Note: These instructions may be outdated, use them at your own discretion.
See below the updated instructions for installing Anbox, as of kernel version 5.7.
Derived from
the original post. Thanks, @
nas
- Consider installing SSH to ease installation
Code:
sudo apt -y install openssh-server
- The client may refuse to connect, if so...
Code:
sudo systemctl enable ssh.service && sudo systemctl start ssh.service
- Determine the PinePhone's IP address
Code:
ip a s dev wlan0 | grep -oP 'inet .*' | cut -d ' ' -f 2
- Connect from the client, optionally entering the PinePhone's IP address to the hosts file and copying the client's public cryptographic key
Code:
printf '%b' '\n192.168.0.10\tmobian\n' | sudo tee -a /etc/hosts
ssh-copy-id mobian@mobian
ssh mobian@mobian
Influenced by
LINMOBnet's video on Anbox.
Code:
rsync --progress ~/Downloads/anbox-image-working.tar.gz mobian@mobian:/home/mobian/Downloads
- Append contrib to the default SourcesList
Code:
printf '%b' 'deb http://deb.debian.org/debian bullseye main contrib\n' | sudo tee /etc/apt/sources.list
- Install the requisite packages
Code:
sudo apt -y install anbox adb
- Unpack the Android archive
Code:
tar xf ~/Downloads/anbox-image-working.tar.gz
sudo mv ~/Download/anbox-image/android.img /var/lib/anbox
- Create a unit file for binderfs
Code:
printf '%b' "[Unit]\nDescription=binderfs\n\n[Mount]\nWhat=binder\nWhere=/dev/binderfs\nType=binder\n\n[Install]\n" \
"WantedBy=anbox-container-manager.service\n" | sudo tee /etc/systemd/system/dev-binderfs.mount
- Edit the anbox-container-manager.service unit file
Code:
sudo sed -i 's/After=network.target/After=network.target dev-binderfs.mount/' /lib/systemd/system/anbox-container-manager.service
sudo sed -i '6i Requires=dev-binderfs.mount' /lib/systemd/system/anbox-container-manager.service
sudo sed -i '\_^ExecStartPre=/sbin/modprobe_s_^_#_' /lib/systemd/system/anbox-container-manager.service
Code:
sudo systemctl daemon-reload
sudo systemctl restart anbox-container-manager.service && systemctl --user restart anbox-session-manager.service
The Anbox workaround originates from
Mobian Issue #63. Thanks Djhg2000
- Anbox must be open to allow installation of APKs via adb
Code:
anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
- Download and install an APK - APKMirror is a trustworthy source
Code:
adb install InsertAppName.apk
Android applications can be launched from the Phosh launcher (as .desktop files), or from the Anbox Application Manager.
Experimental: Implementing IP routing (for internet connectivity) and installation of MicroG is covered in
the original post.