Does anyone here successfully Anbox/Waydroid on qubes 4.1? Cant make it happen here.
I belief the answer you seek you can find through this link:
Iâve tried a couple of weeks ago without success this week Iâll try the below link.
Otherwise you could also look at alternatives.
https://alternativeto.net/software/anbox/?platform=linux
Hope itâs helpfull
I have already tried everything on that link and it doesnt work(anbox), when i try to start a debian-11 appvm in HVM and kernel=none, it doesnt even boot so, cant open the terminal to install anbox. i appreciate if you could try to do it and pass the instructions on how you did it, thank you.
Well if was planning to try it again anyway and I have a couple of possible solution in mind.
Iâm using Qubes-os for 1.5 year and it is my first experience with Linux, Iâve learned you can do pretty much the same as on a windows machine, I would be surprised if it wasnât possible.
So Iâll give you a update within 3 day otherwise asap.
Ok, i made some other tests, created a standalone debian11 and installed
sudo apt install software-properties-common dkms linux-image-amd64 linux-headers-amd64 qubes-kernel-vm-support grub2 android-tools-adb anbox && sudo apt update && sudo apt upgrade && sudo grub-install /dev/xvda && sudo update-initramfs -u
then i download the anbox modules
git clone https://github.com/choff/anbox-modules
then i tried to install the modules using the script /anbox-modules/INSTALL.sh and it returned ashmem successfully installed but got an error when trying to install binder
thats my problem, without this i cant run anbox properly
when i try to run anbox i get stucked on this screen:
and after some seconds the window get closed with this error in terminal:
just to complement, i have moved the android.img to /var/lib/anbox as required in whonix docs
when i check if anbox systemd service is functional. using: sudo systemctl status anbox-container-manager.service
i receive this:
this damn binder_linux, is getting me crazy, someone give the light? thanks
here is the make.log
DKMS make.log for anbox-binder-1 for kernel 5.10.104-3.fc32.qubes.x86_64 (x86_64)
Sat 23 Apr 2022 04:18:58 PM -03
make -C /lib/modules/5.10.104-3.fc32.qubes.x86_64/build V=0 M=$PWD
make[1]: Entering directory '/usr/lib/modules/5.10.104-3.fc32.qubes.x86_64/build'
CC [M] /var/lib/dkms/anbox-binder/1/build/deps.o
CC [M] /var/lib/dkms/anbox-binder/1/build/binder.o
/var/lib/dkms/anbox-binder/1/build/binder.c: In function âbinder_update_page_rangeâ:
/var/lib/dkms/anbox-binder/1/build/binder.c:633:19: error: âstruct mm_structâ has no member named âmmap_semâ; did you mean âmmap_baseâ?
633 | down_write(&mm->mmap_sem);
| ^~~~~~~~
| mmap_base
/var/lib/dkms/anbox-binder/1/build/binder.c:683:17: error: âstruct mm_structâ has no member named âmmap_semâ; did you mean âmmap_baseâ?
683 | up_write(&mm->mmap_sem);
| ^~~~~~~~
| mmap_base
/var/lib/dkms/anbox-binder/1/build/binder.c:710:17: error: âstruct mm_structâ has no member named âmmap_semâ; did you mean âmmap_baseâ?
710 | up_write(&mm->mmap_sem);
| ^~~~~~~~
| mmap_base
/var/lib/dkms/anbox-binder/1/build/binder.c: In function âbinder_translate_binderâ:
/var/lib/dkms/anbox-binder/1/build/binder.c:1626:42: error: passing argument 1 of âsecurity_binder_transfer_binderâ from incompatible pointer type [-Werror=incompatible-pointer-types]
1626 | if (security_binder_transfer_binder(proc->tsk, target_proc->tsk))
| ~~~~^~~~~
| |
| struct task_struct *
In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48:
./include/linux/security.h:260:56: note: expected âconst struct cred *â but argument is of type âstruct task_struct *â
260 | int security_binder_transfer_binder(const struct cred *from,
| ~~~~~~~~~~~~~~~~~~~^~~~
/var/lib/dkms/anbox-binder/1/build/binder.c:1626:60: error: passing argument 2 of âsecurity_binder_transfer_binderâ from incompatible pointer type [-Werror=incompatible-pointer-types]
1626 | if (security_binder_transfer_binder(proc->tsk, target_proc->tsk))
| ~~~~~~~~~~~^~~~~
| |
| struct task_struct *
In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48:
./include/linux/security.h:261:28: note: expected âconst struct cred *â but argument is of type âstruct task_struct *â
261 | const struct cred *to);
| ~~~~~~~~~~~~~~~~~~~^~
/var/lib/dkms/anbox-binder/1/build/binder.c: In function âbinder_translate_handleâ:
/var/lib/dkms/anbox-binder/1/build/binder.c:1668:42: error: passing argument 1 of âsecurity_binder_transfer_binderâ from incompatible pointer type [-Werror=incompatible-pointer-types]
1668 | if (security_binder_transfer_binder(proc->tsk, target_proc->tsk))
| ~~~~^~~~~
| |
| struct task_struct *
In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48:
./include/linux/security.h:260:56: note: expected âconst struct cred *â but argument is of type âstruct task_struct *â
260 | int security_binder_transfer_binder(const struct cred *from,
| ~~~~~~~~~~~~~~~~~~~^~~~
/var/lib/dkms/anbox-binder/1/build/binder.c:1668:60: error: passing argument 2 of âsecurity_binder_transfer_binderâ from incompatible pointer type [-Werror=incompatible-pointer-types]
1668 | if (security_binder_transfer_binder(proc->tsk, target_proc->tsk))
| ~~~~~~~~~~~^~~~~
| |
| struct task_struct *
In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48:
./include/linux/security.h:261:28: note: expected âconst struct cred *â but argument is of type âstruct task_struct *â
261 | const struct cred *to);
| ~~~~~~~~~~~~~~~~~~~^~
/var/lib/dkms/anbox-binder/1/build/binder.c: In function âbinder_translate_fdâ:
/var/lib/dkms/anbox-binder/1/build/binder.c:1740:42: error: passing argument 1 of âsecurity_binder_transfer_fileâ from incompatible pointer type [-Werror=incompatible-pointer-types]
1740 | ret = security_binder_transfer_file(proc->tsk, target_proc->tsk, file);
| ~~~~^~~~~
| |
| struct task_struct *
In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48:
./include/linux/security.h:262:54: note: expected âconst struct cred *â but argument is of type âstruct task_struct *â
262 | int security_binder_transfer_file(const struct cred *from,
| ~~~~~~~~~~~~~~~~~~~^~~~
/var/lib/dkms/anbox-binder/1/build/binder.c:1740:60: error: passing argument 2 of âsecurity_binder_transfer_fileâ from incompatible pointer type [-Werror=incompatible-pointer-types]
1740 | ret = security_binder_transfer_file(proc->tsk, target_proc->tsk, file);
| ~~~~~~~~~~~^~~~~
| |
| struct task_struct *
In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48:
./include/linux/security.h:263:26: note: expected âconst struct cred *â but argument is of type âstruct task_struct *â
263 | const struct cred *to, struct file *file);
| ~~~~~~~~~~~~~~~~~~~^~
/var/lib/dkms/anbox-binder/1/build/binder.c: In function âbinder_transactionâ:
/var/lib/dkms/anbox-binder/1/build/binder.c:1967:39: error: passing argument 1 of âsecurity_binder_transactionâ from incompatible pointer type [-Werror=incompatible-pointer-types]
1967 | if (security_binder_transaction(proc->tsk,
| ~~~~^~~~~
| |
| struct task_struct *
In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48:
./include/linux/security.h:258:52: note: expected âconst struct cred *â but argument is of type âstruct task_struct *â
258 | int security_binder_transaction(const struct cred *from,
| ~~~~~~~~~~~~~~~~~~~^~~~
/var/lib/dkms/anbox-binder/1/build/binder.c:1968:18: error: passing argument 2 of âsecurity_binder_transactionâ from incompatible pointer type [-Werror=incompatible-pointer-types]
1968 | target_proc->tsk) < 0) {
| ~~~~~~~~~~~^~~~~
| |
| struct task_struct *
In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48:
./include/linux/security.h:259:24: note: expected âconst struct cred *â but argument is of type âstruct task_struct *â
259 | const struct cred *to);
| ~~~~~~~~~~~~~~~~~~~^~
/var/lib/dkms/anbox-binder/1/build/binder.c: In function âbinder_ioctl_set_ctx_mgrâ:
/var/lib/dkms/anbox-binder/1/build/binder.c:3262:44: error: passing argument 1 of âsecurity_binder_set_context_mgrâ from incompatible pointer type [-Werror=incompatible-pointer-types]
3262 | ret = security_binder_set_context_mgr(proc->tsk);
| ~~~~^~~~~
| |
| struct task_struct *
In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48:
./include/linux/security.h:257:56: note: expected âconst struct cred *â but argument is of type âstruct task_struct *â
257 | int security_binder_set_context_mgr(const struct cred *mgr);
| ~~~~~~~~~~~~~~~~~~~^~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:280: /var/lib/dkms/anbox-binder/1/build/binder.o] Error 1
make[1]: *** [Makefile:1822: /var/lib/dkms/anbox-binder/1/build] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.10.104-3.fc32.qubes.x86_64/build'
make: *** [Makefile:8: all] Error 2
Building the modules should be unnecessary. Iâm on R4.0 but the in-VM Debian kernel should be the same since itâs pulled from Debian 11 repos, not Qubes OS repos:
user@deb11hvm:~$ cat /etc/debian_version
11.3
user@deb11hvm:~$ apt list --installed linux-image*
Listing... Done
linux-image-5.10.0-11-amd64/stable-security,now 5.10.92-2 amd64 [installed,auto-removable]
linux-image-5.10.0-12-amd64/stable-security,now 5.10.103-1 amd64 [installed,automatic]
linux-image-5.10.0-13-amd64/stable,now 5.10.106-1 amd64 [installed,automatic]
linux-image-amd64/stable,now 5.10.106-1 amd64 [installed]
user@deb11hvm:~$ find /lib/modules -name binder_linux.ko -o -name ashmem_linux.ko
/lib/modules/5.10.0-11-amd64/kernel/drivers/staging/android/ashmem_linux.ko
/lib/modules/5.10.0-11-amd64/kernel/drivers/android/binder_linux.ko
/lib/modules/5.10.0-12-amd64/kernel/drivers/staging/android/ashmem_linux.ko
/lib/modules/5.10.0-12-amd64/kernel/drivers/android/binder_linux.ko
/lib/modules/5.10.0-13-amd64/kernel/drivers/staging/android/ashmem_linux.ko
/lib/modules/5.10.0-13-amd64/kernel/drivers/android/binder_linux.ko
Make sure youâre doing the following for HVM qubes:
- Setting kernel to â(none)â
- Setting virtualization mode to âHVMâ
- Excluding from memory balancing
- Supplying a decent amount of memory. On R4.0 I have no issue with the in-VM Debian 11 5.10.0-13 kernel and 400MB.
it worked here now i boot normal, the problem was that i didnt exclude from the memory balance.
let me try install anbox or/and waydroid to see what happensâŚ
Iâve been trying the whole day and got stuck severale times on the anbox startup screen, I even tried to use docker which gave me the same result.
Glad to see you have it working, can you describe the steps that made it work for you?
just create a standalone vm without kernel and HVM mode and exclude it from memory balancing, but now im having another problem, waydroid is installed but i get stucked on this:
- started the container with
sudo waydroid container start
- started the session with
waydroid session start
but android doesnt boot, if i check the status it shows that container and session is running but no wayland display, any idea how to fix it @icequbes1?
waydroid-logcat.log (259.2 KB)
i tried to enable wayland by editing /etc/gdm3/daemon.conf and uncomment âWayLandEnable=Trueâ but no success too
Iâve followed these steps in order, I skipped the git clone GitHub - choff/anbox-modules: Anbox kernel modules part because @icequbes1 said it was unnecessary.
I still get the freeze starting screen from Anbox, am I missing a step?
Iâm on QubesOs 4.1
- sudo apt install software-properties-common dkms linux-image-amd64 linux-headers-amd64 qubes-kernel-vm-support grub2 android-tools-adb anbox && sudo apt update && sudo apt upgrade && sudo grub-install /dev/xvda && sudo update-initramfs -u
- sudo modprobe ashmem_linux
- sudo modprobe binder_linux
- ls -1 /dev/{ashmem,binder}
- apt list --installed linux-image*
- anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
user@cc:~$ sudo systemctl status anbox-container-manager.service
â anbox-container-manager.service - Anbox Container Manager
Loaded: loaded (/lib/systemd/system/anbox-container-manager.service; enabled; vendor preset: ena>
Active: inactive (dead)
Condition: start condition failed at Sun 2022-04-24 04:11:50 EDT; 6min ago
ââ ConditionPathExists=/var/lib/anbox/android.img was not met
Docs: man:anbox(1)
Apr 24 04:11:50 cc systemd[1]: Condition check resulted in Anbox Container Manager being skipped.
For other people interested in the solution, the steps below worked for me.
create New qube
Name and label: anbox-qube
Type: Standalone VM
Template: debian
Networking: sys-firewall
Launch setting after creation
under tab Basic
I gave it 15 GB diskspace
under tab Advanced
/section/Memory/CPU
initial memory: 800 mb
VCPUs:
exclude in memory balancing (tick off the box)
/section/Kernel/
none
/section/Virtualization
Mode: HVM (current)
apply - ok
user@anboxqube:~$ sudo add-apt-repository ppa:morphis/anbox-support
enter
user@anboxqube:~$ sudo apt install software-properties-common
user@anboxqube:~$ sudo modprobe ashmem_linux
user@anboxqube:~$ sudo modprobe binder_linux
user@anboxqube:~$ ls -1 /dev/{ashmem,binder}
user@anboxqube:~$ snap install --devmode --beta anbox
user@anboxqube:~$ sudo apt update
user@anboxqube:~$ anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
Good luck!
Hello, here is how i did it:
- Create a new qube StandAloneVM (Fully persistent) with Debian-11 template and check âLaunch settings after creationâ
- On Settings window, go to âAdvancedâ, uncheck âInclude in memory balancingâ, set your initial memory.
2.1 On kernel, set it to (none).
2.2 On Virtualization, set HVM.
-
Run the vm, open the terminal to update the package list and upgrade the system to install adb, fastboot and anbox:
sudo apt update && sudo apt full-upgrade && sudo apt install adb fastboot anbox
-
Download the Anbox Android Image and the sha256sum file
wget https://build.anbox.io/android-images/2018/07/19/android_amd64.img.sha256sum && wget https://build.anbox.io/android-images/2018/07/19/android_amd64.img
- Verify the image and move/rename to /var/lib/anbox/android.img
- Restart vm, open the terminal, check adb devices and start anbox, wait some seconds, if you have done eveything right, it will run fine.
adb devices && anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
Depending on the kernel in your debian template, installation of the anbox drivers may be necessary.
I see this thread has went the direction of Anbox.
After looking further into Waydroid, it runs under Wayland. Qubes OS uses X11.
It might be possible to run the weston
compositor within a qube (e.g., nested under X11), start a shell within weston, and then run waydroid.
Nice try, but they server is DOWN
can you share a file?)
I donât have the âNoneâ option. Am I missing something?
In the GUI it is Settings->Advanced->Kernel - (provided by qube)