Problem installing Anbox

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
Stevo
Developer
Posts: 14742
Joined: Fri Dec 15, 2006 7:07 pm

Re: Problem installing Anbox

#11 Post by Stevo »

Seems like you need to do it the Debian way and forget about snaps: https://dev.to/sbellone/how-to-install- ... ebian-1hjd

I'll see if I can backport the upstream Debian version.

User avatar
Jerry3904
Administrator
Posts: 23350
Joined: Wed Jul 19, 2006 6:13 am

Re: Problem installing Anbox

#12 Post by Jerry3904 »

We still would need the two modules (binder and ashmem) @Stevo. See above.
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
Stevo
Developer
Posts: 14742
Joined: Fri Dec 15, 2006 7:07 pm

Re: Problem installing Anbox

#13 Post by Stevo »

The Readme file says they are already included in Debian kernels since 4.17.

Code: Select all

In order to run Android system inside container, you need two kernel
modules: ashmem_linux and binder_linux. Since Debian kernel 4.17, these
two modules are enabled. You can find theme at,
/lib/modules/`uname -r`/kernel/drivers/android/binder_linux.ko and
/lib/modules/`uname -r`/kernel/drivers/staging/android/ashmem_linux.ko.
.
If your kernel doesn't have these two modules, you can follow upstream
instructions to install them with DKMS. Please see
<https://github.com/anbox/anbox-modules/>.
.
Run following commands to check if you have the kernel modules:
.
  modinfo binder_linux
  modinfo ashmem_linux
I've found that you have to precede modinfo with sudo or run it as root. Doesn't seem that the Liquorix kernels enable those, though. Since it has something mysterious to do with containers and namespaces, it may not be as simple as just copying the Debian config for those. The Readme still recommends starting with systemd for the anbox service, also.

I've almost finished the backport of Bullseye's anbox for MX 19 test..armhf version is building.
Last edited by Stevo on Tue Jun 22, 2021 4:58 pm, edited 1 time in total.

User avatar
Jerry3904
Administrator
Posts: 23350
Joined: Wed Jul 19, 2006 6:13 am

Re: Problem installing Anbox

#14 Post by Jerry3904 »

I saw that, but the app isn't seeing the modules.
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
Stevo
Developer
Posts: 14742
Joined: Fri Dec 15, 2006 7:07 pm

Re: Problem installing Anbox

#15 Post by Stevo »

Jerry3904 wrote: Tue Jun 22, 2021 4:57 pm I saw that, but the app isn't seeing the modules.
The snap version or the native Debian version? It also won't do anything without the android img file manually downloaded and installed, at least that's what the guide and Readme say.

User avatar
Jerry3904
Administrator
Posts: 23350
Joined: Wed Jul 19, 2006 6:13 am

Re: Problem installing Anbox

#16 Post by Jerry3904 »

Look at my long post above, which starts with the repo version.
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
Stevo
Developer
Posts: 14742
Joined: Fri Dec 15, 2006 7:07 pm

Re: Problem installing Anbox

#17 Post by Stevo »

I just installed and tested the test repo version on our 5.10 kernel booted with systemd, also installing the android.img file manually per the guide.

Code: Select all

⌁0% steve@msigp63:~ $  ls -1 /dev/{ashmem,binder}
ls: cannot access '/dev/ashmem': No such file or directory
ls: cannot access '/dev/binder': No such file or directory
⌁0% steve@msigp63:~ 2 $ sudo modprobe ashmem_linux
[sudo] password for steve: 
⌁0% steve@msigp63:~ $ sudo modprobe binder_linux
⌁0% steve@msigp63:~ $ ls -1 /dev/{ashmem,binder}
/dev/ashmem
/dev/binder
⌁0% steve@msigp63:~ $ 
As seen above, I also had to manually load the two modules per the guide to get them to work. After that, I restarted the service and then:

Code: Select all

anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
and got an Android desktop--the web browser even works.

IDK if our adb needs updating in order to install apks per the guide. I would appreciate if anyone else that gets it working follow the guide to try and install Fdroid.

User avatar
Stevo
Developer
Posts: 14742
Joined: Fri Dec 15, 2006 7:07 pm

Re: Problem installing Anbox

#18 Post by Stevo »

I installed the stock Buster android tools, and then followed the commands to wget the Fdroid apk file, and then abd to install it, after which it appeared in Android and I was able to use it to get and install more free android apps.

I'd like to get some feedback if others can't do the same, otherwise it can be marked solved.

User avatar
Jerry3904
Administrator
Posts: 23350
Joined: Wed Jul 19, 2006 6:13 am

Re: Problem installing Anbox

#19 Post by Jerry3904 »

I'm hoping this might go into MXPI to get all that into a script for MX-21
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
Stevo
Developer
Posts: 14742
Joined: Fri Dec 15, 2006 7:07 pm

Re: Problem installing Anbox

#20 Post by Stevo »

I rebooted to the same kernel with systemd, and this time did not have to modprobe the two modules to get Anbox to start from the menu. We may have to create our own init script to get the service to start from sysvinit, though.

I'll take a look at the PPA for those that aren't using kernels that already include the modules, too.

Post Reply

Return to “MX Help”