Anbox for Debian
#21
(07-22-2020, 05:37 PM)nas Wrote: Looks like you have to add contrib to /etc/apt/sources.list for apt install to work but there appears to be a further problem with modprobe failing to find binder or ashmem in the kernel modules directory. I'm guessing there's a further step beyond enabling them in the kernel?
They're not modules anymore, so no need for modprobe now.
#22
(07-22-2020, 06:20 PM)a-wai Wrote: They're not modules anymore, so no need for modprobe now.

Seems the anbox container manager service tries to modprobe ashmem and then stops in error state.

This issue might give some clues, eg binderfs appears unset in current kernel config.
#23
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  Big Grin


  • 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
  • Reload the 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 Smile




  • 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.
#24
I followed the guide but anbox session-manager still tries to load binder/ashmem kernel drivers.
Error:
[session_manager.cpp:136@operator()] Failed to start as either binder or ashmem kernel drivers are not loaded

But the anbox container manager is running.
#25
LINMOBnet uploaded a video about Anbox on Mobian.

Interestingly, Android's soft keyboards appear to be functional, but do not render.
#26
@Transistor4acpu Please try the updated instructions with the new workaround.

Apologies for the gratuitous whitespace - the WYSIWYG editor hates code fencing.
#27
Hi,
anynbody tested anbox recently? is the keyboard still not working? I mean its working but it's invisible

I wonder which will become usable first, anbox or glodroid. whatever happens first will be my daily driver as I need whatsapp (for work). My current phone is in a desperate need for replacement, and it feels stupid buying another 150$ phone right now when pinephone is so close of being a usable device Smile
#28
I believe postmarketOS recently got Anbox working 'out of the box'.

I've not tried Anbox since updating the instructions above, so I'll add an edit to make it apparent that it may not be 'state of the art'.
#29
(09-15-2020, 03:44 AM)vanja Wrote: anynbody tested anbox recently? is the keyboard still not working? I mean its working but it's invisible

I wonder which will become usable first, anbox or glodroid. whatever happens first will be my daily driver as I need whatsapp (for work).

I wouldn't rely on anbox+whatsapp as a solution for work.

Better off waiting for a glodroid release which enables the modem - in the meanwhile, whatsapp works fine over wifi.
#30
(09-15-2020, 03:44 AM)vanja Wrote: anynbody tested anbox recently? is the keyboard still not working? I mean its working but it's invisible


I'm trying to get Anbox running in Mobian but am having trouble finding adb or android-tools-adb in the repositories. What repo is it in? I have bullseye main contrib enabled, but not found.

Code:
deb http://deb.debian.org/debian bullseye main contrib non-free


For keyboard, it seems that using virtboard instead of squeekboard should work??


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with updates: Repository 'Debian bookworm' changed its 'non-free component' Anna 7 1,911 08-31-2023, 12:38 PM
Last Post: vusra
  Debian bookworm security repo user641 2 1,476 02-17-2023, 01:12 AM
Last Post: user641
  Gnome-podcasts on Debian repos user641 4 2,850 02-06-2022, 04:58 AM
Last Post: jsch
  gnome podcasts on debian repo, dino-mobile user641 3 3,123 09-11-2021, 12:04 AM
Last Post: user641
  Best/easiest way to install minimal Debian on PinePhone? mcgee 6 5,274 07-18-2021, 09:35 AM
Last Post: swiley
  How does calls work in debian? temp0rary 4 4,137 05-31-2021, 10:44 AM
Last Post: temp0rary
  Whatsapp in Anbox scott_VYuCAbn3k1NFK 7 8,915 03-22-2021, 08:46 AM
Last Post: Skyrrd
  Debian/Mobian packaging help needed arno_nuehm 1 2,147 03-20-2021, 04:59 PM
Last Post: TRS-80
  Anbox apps listed in the launch screen mark1250 1 2,684 03-17-2021, 02:23 PM
Last Post: tvall
  Debian / mobian Pine64 - User Manual? Harry27 1 2,252 03-03-2021, 04:50 PM
Last Post: LibrePhoneUser

Forum Jump:


Users browsing this thread: 1 Guest(s)