SoulInfernoDE / compile-kernel-from-source

Script to be able to automate compiling procedures. Eg. if you need to add .config options to your kernel sources like android (ASHMEM, BINDER, etc.)
MIT License
8 stars 4 forks source link

cfs-noguimerge.sh built kernel doesn't resolve 'either binder or ashmem kernel drivers are not loaded' issue #2

Open sja45uk opened 1 year ago

sja45uk commented 1 year ago

Booting Ubuntu 22.04 with kernel 5.15.0-android doesn't change failure to run Anbox properly with --software-rendering switch. Neither does booting Ubuntu 22.04 with kernel 6.0.1 built using 'Ubuntu Mainline Kernel Installer' and doing same command. It remains to be determined if the cfs-noguimerge.sh script or either of the other two scripts is capable of generating a 6.0.1-android kernel that doesn't exhibit the same problem. See attached screenshot for result with default kernel (based on kernel 5.15) compiled and installed by cfs-noguimerge.sh :

image

SoulInfernoDE commented 1 year ago

Thanks for reporting back. Glad the script works as expected :heart:

To the trouble above, i will investigate together with you how to resolve that.

First of all, did you try the instructions here already?

https://github.com/anbox/anbox-modules/issues/49#issuecomment-798691676

sja45uk commented 1 year ago

I am afraid #49 didn't help

steve@DELL:~ $ sudo mkdir /dev/binder steve@DELL:~ $ sudo mount -t binder binder /dev/binderfs steve@DELL:~ $ anbox session-manager

DIDN'T SEEM TO DO ANYTHING, SO REPEATING SLIGHTLY DIFFERENTLY GAVE

steve@DELL:~ $ sudo mkdir /dev/binder [sudo] password for steve: mkdir: cannot create directory ‘/dev/binder’: File exists

steve@DELL:~ $ sudo mount -t binder binder /dev/binderfs mount: /dev/binderfs: mount point does not exist.

steve@DELL:~ $ anbox.appmgr anbox.appmgr: command not found

steve@DELL:~ $ anbox session-manager --software-rendering [ 2022-10-20 22:53:35] [daemon.cpp:61@Run] Failed to connect to socket /run/anbox-container.socket: No such file or directory

steve@DELL:~ $ anbox system-info version: 0.0~git20211020-2build1-Ubuntu cpu: arch: x86 brand: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz features:

SoulInfernoDE commented 1 year ago

Hey steve, thanks for reporting :heart_decoration:

I see that this command you issued first did succeed: $ sudo mkdir /dev/binder

Your linux system didn't give you an error after issuing this command at first state.

The second time you tried that command $ sudo mkdir /dev/binder it did throw a:

mkdir: cannot create directory ‘/dev/binder’: File exists

I think that it successfully created that directory which then binder is visible through that directory to Anbox:

binder: true
binderfs: false
ashmem: true

Note that: This directory will most likely be lost after rebooting your computer. To get that permanently you may need to follow these instructions also:

https://github.com/anbox/anbox-modules/issues/50#issuecomment-807979822

Is your initial error also gone i guess? (Failed to start as either binder or ashmem....) : image

If yes then it looks like it's working already but cannot connect to the anbox socket: Failed to connect to socket /run/anbox-container.socket: No such file or directory

So we need to investigate how to resolve that :smiley:

For the start i suggest to check if /dev/binder is created and then reinstall anbox. This may fix it - if not report back and i will try to assist further.

I will also make these informations that we are now collecting as an information on the readme here and may include some fixes or routines in the build script also. :sunglasses:

sja45uk commented 1 year ago

I agree with your analysis, but just have no idea how to progress this without your guidance.

SoulInfernoDE commented 1 year ago

can you try this:

sudo snap start anbox && sudo systemctl start anbox-container-manager.service && sudo systemctl enable anbox-container-manager.service && sudo snap set anbox software-rendering.enable=true && sudo snap restart anbox.container-manager

and then:

anbox.appmgr

and if not working again:

anbox session.manager

oohw - you don't have the snap version i see. Hmh we need to investigate how to start and restart the container manager i think.

can you also show/check the output of this command: ls -al /dev/binderfs/

sja45uk commented 1 year ago

I think there has been a misunderstanding as I am not running anbox within snap:

steve@DELL:~ $ anbox version anbox 0.0~git20211020-2build1-Ubuntu steve@DELL:~ $ which anbox /usr/bin/anbox steve@DELL:~ $

SoulInfernoDE commented 1 year ago

No problem. You still can use or try the commands mentioned. At least the last ones.

I have digged into your actual trouble with the socket error and it seems that the container manager is not running yet, thus missing an running anbox android.img

Anbox consists of two parts:

The session manager connects with the container manager

So i recommend to follow this article as you are using the git version:

https://github.com/anbox/anbox/blob/master/docs/runtime-setup.md

This article will point you to download an anbox android image from here: https://build.anbox.io/android-images/2018/07/19/

When downloaded please follow the official instructions for using this image with anbox:

https://github.com/anbox/anbox/blob/master/docs/build-android.md#run-anbox-with-self-build-androidimg

If you are able to get it working let me know, otherwise we will continue with your next issue if there is any 👍

best regards

sja45uk commented 1 year ago

I NOTICED THAT I MAY HAVE GOT ONE mkdir IN #49 SLIGHTLY WRONG, SO I DID A BIT MORE CAREFUL CHECKING:

$ uname -r 5.15.0-android

$ sudo modprobe ashmem_linux binder_linux modprobe: FATAL: Module ashmem_linux not found in directory /lib/modules/5.15.0-android

$ sudo mkdir /dev/binderfs $ sudo mount -t binder binder /dev/binderfs

$ anbox session-manager [ 2022-10-21 22:09:13] [daemon.cpp:61@Run] Failed to connect to socket /run/anbox-container.socket: No such file or directory

$ sudo mkdir /dev/binder $ sudo mount -t binder binder /dev/binder

$ anbox.appmgr anbox.appmgr: command not found

$ ls -l /dev/{ashmem,binder,binderfs} crw------- 1 root root 10, 122 Oct 21 22:45 /dev/ashmem

/dev/binder: total 0 crw------- 1 root root 240, 6 Oct 21 23:07 binder crw------- 1 root root 240, 5 Oct 21 23:07 binder-control crw------- 1 root root 240, 9 Oct 21 23:07 binderfs drwxr-xr-x 2 root root 0 Oct 21 23:07 features crw------- 1 root root 240, 7 Oct 21 23:07 hwbinder crw------- 1 root root 240, 8 Oct 21 23:07 vndbinder

/dev/binderfs: total 0 crw------- 1 root root 240, 11 Oct 21 23:08 binder crw------- 1 root root 240, 10 Oct 21 23:08 binder-control crw------- 1 root root 240, 14 Oct 21 23:08 binderfs drwxr-xr-x 2 root root 0 Oct 21 23:08 features crw------- 1 root root 240, 12 Oct 21 23:08 hwbinder crw------- 1 root root 240, 13 Oct 21 23:08 vndbinder

$ anbox system-info version: 0.0~git20211020-2build1-Ubuntu cpu: arch: x86 brand: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz features:

SO binder: binderfs: & ashmem: ARE ALL true

I SAW A REPORT SOMEWHERE THAT ANBOX WORKS ON Ubuntu 22.10 (with kernel 6.0.1?) SO I MAY TRY TO USE YOUR cfs_noguimerge SCRIPT TO COMPILE 6.0.1-android, SINCE I HAVE TESTED THAT Ubuntu 22.04 WORKS WITH 6.0.1

sja45uk commented 1 year ago

OK, so I tried to build kernel 6.0.1 overnight using your cfs-noguimerge.sh, but this morning the install says

dpkg-deb: building package 'linux-headers-5.15.0-android' in '../linux-headers-5.15.0-android_5.15.0-android-1_amd64.deb'. INSTALL debian/linux-libc-dev/usr/include dpkg-deb: building package 'linux-libc-dev' in '../linux-libc-dev_5.15.0-android-1_amd64.deb'. dpkg-deb: building package 'linux-image-5.15.0-android' in '../linux-image-5.15.0-android_5.15.0-android-1_amd64.deb'. dpkg-deb: building package 'linux-image-5.15.0-android-dbg' in '../linux-image-5.15.0-android-dbg_5.15.0-android-1_amd64.deb'. dpkg-genbuildinfo --build=binary -O../linux-upstream_5.15.0-android-1_amd64.buildinfo dpkg-genchanges --build=binary -O../linux-upstream_5.15.0-android-1_amd64.changes dpkg-genchanges: info: binary-only upload (no source code included) dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included)

real 62m29.857s user 67m14.627s sys 2m19.317s

###############################################################

deb-files will be installed. Do you want to continue?

- Make sure compiling finished successfully!

############################################################### (y|Y)es (n|N)o # y (Reading database ... 423189 files and directories currently installed.) Preparing to unpack .../linux-headers-5.15.0-android_5.15.0-android-1_amd64.deb ... Unpacking linux-headers-5.15.0-android (5.15.0-android-1) over (5.15.0-android-1) ... Preparing to unpack .../linux-image-5.15.0-android_5.15.0-android-1_amd64.deb ... Unpacking linux-image-5.15.0-android (5.15.0-android-1) over (5.15.0-android-1) ... Preparing to unpack .../linux-image-5.15.0-android-dbg_5.15.0-android-1_amd64.deb ... Unpacking linux-image-5.15.0-android-dbg (5.15.0-android-1) over (5.15.0-android-1) ... Preparing to unpack .../linux-libc-dev_5.15.0-android-1_amd64.deb ... Unpacking linux-libc-dev:amd64 (5.15.0-android-1) over (5.15.0-android-1) ... Setting up linux-headers-5.15.0-android (5.15.0-android-1) ... Setting up linux-image-5.15.0-android (5.15.0-android-1) ...

If the script has an error for you, please report it on github. You can leave a screenshot if you like to in the issues section

SO NOT KERNEL 6.0.1-android BUT AGAIN 5.15.0-android! SHOULD I FIND A SEPARATE .config FILE AND WHAT SHOULD IT CONTAIN TO AUTOMATICALLY BUILD 6.0.1?

$ sudo find ~ -name *.config -print|grep android /home/steve/Downloads/kernel/kernel/configs/android-base.config /home/steve/Downloads/kernel/kernel/configs/android-recommended.config /home/steve/Downloads/kernel/debian/linux-headers/usr/src/linux-headers-5.15.0-android/.config

sja45uk commented 1 year ago

HOW DO I ENSURE I GET THE CORRECT 6.0.1 KERNEL?

$ ./createscriptenv.sh Scripts environment creation v0.1a by github.com/SoulInfernoDE /home/steve/.scripts already exists. Exiting.

LOOKING AT THE ~/.scripts/cfs_noguimerge.sh SCRIPT, I THINK THAT IT DEPENDS ON

cp /boot/config-$(uname -r) ./.config # we copy your current configuration file from /boot/config to the kernel folder and rename it to .config

SO I AM GOING TO BOOT UBUNTU WITH THE 'OFFICIAL' 6.0.1 KERNEL AND TRY AGAIN

SoulInfernoDE commented 1 year ago

Hey Steve, thanks for reporting back. First of all - ashmem and binder is successfully installed and loaded on your current kernel according to your testings. What is now missing is the container manager of anbox - that is due to the error: unable to connect to anbox socket..

Secondly yes anbox should also work on kernel 6. For this please delete the kernel folder in your downloads folder before restarting my build script. For kernel 6.x you also need a second cfsnoguimerge.sh script located here:

https://raw.githubusercontent.com/SoulInfernoDE/compile-kernel-from-source/v6.x/nogui/cfs_noguimerge.sh

Download it and rename it to cfs-noguimerge6.sh for example. You can then copy it to ~./scripts also if you like to when you need to use it again. Remember to delete the kernel folder in download and move the kernel deb files out of download or delete them also every time you want to use it again. ℹ️

sja45uk commented 1 year ago

SO ANSWERING Y PRODUCES A WARNING AND NO OUTPUT AFTER 2.5 HRS, BUT THE SYSTEM MONITOR SHOWS THE CPU IS STILL RUNNING AT 100%

SoulInfernoDE commented 1 year ago

Booting with the official 6 kernel will give you the config file needed for your environment with the configuration options that have changed in between 5.x and 6.x for your computer.

To build a 6.x kernel from source you can use my compile from source no gui script ( cfs_noguimerge.sh., take the one from v6.x branch) I posted above. It seems you found a bug, I will try to fix that now. I fixed the 404 download bug. Sorry for that. Please re-download the script from last link above and try again. It should now work and build your 6.x kernel without issues. (The .config fragment file is needed for 6.x to patch ASHMEM back into the config file which did not succeed last time as you had a 404 file not found download error which i fixed now)

sja45uk commented 1 year ago

Unfortunately, we are having to talk about building the android version of two kernels (5.15.0 & 6.0.1), so I am not clear which instruction you give me applies to which build. It is not clear to me why I would need to delete the kernel in ~/Download files and to which kernel the instruction applies. I will go ahead and delete it on the assumption that it applies to both and just gives the CPU a lot more work to do!

.config-fragment 100%[===================>] 302 --.-KB/s in 0s

2022-10-22 16:02:25 (28.1 MB/s) - ‘.config-fragment’ saved [302/302]

/home/steve/.scripts/cfs_noguimerge_v6.sh: line 40: ./scripts/kconfig/merge_config.sh: No such file or directory make: *** No rule to make target 'olddefconfig'. Stop.

IS THIS OK, I AM GOING AHEAD ON THE ASSUMPTION THAT IT IS!

sja45uk commented 1 year ago

make: *** No rule to make target 'bindeb-pkg'. Stop.

real 0m0.003s user 0m0.000s sys 0m0.003s

IT DID NOTHING, AND THAT SEEMS WRONG!

sja45uk commented 1 year ago

THAT WAS AN ATTEMPT TO BUILD 6.0.1 KERNEL. IT IS NOT CLEAR TO ME WHETHER I CAN BUILD 5.15.0-android IF I AM RUNNING 6.0.1 I WILL GO AHEAD AND BOOT INTO 5.15.0 BY TRYING THE BUILD OF 5.15-0-android

SoulInfernoDE commented 1 year ago

Unfortunately, we are having to talk about building the android version of two kernels (5.15.0 & 6.0.1), so I am not clear which instruction you give me applies to which build. It is not clear to me why I would need to delete the kernel in ~/Download files and to which kernel the instruction applies. I will go ahead and delete it on the assumption that it applies to both and just gives the CPU a lot more work to do!

.config-fragment 100%[===================>] 302 --.-KB/s in 0s

2022-10-22 16:02:25 (28.1 MB/s) - ‘.config-fragment’ saved [302/302]

/home/steve/.scripts/cfs_noguimerge_v6.sh: line 40: ./scripts/kconfig/merge_config.sh: No such file or directory make: *** No rule to make target 'olddefconfig'. Stop.

IS THIS OK, I AM GOING AHEAD ON THE ASSUMPTION THAT IT IS!

Sure the instructions are the same for every kernel version. Deletion of the kernel folder is needed because: The script creates this folder and pulls the source from kernel.org in it. If you re-run the script it checks if the folder already exists. If yes you are going to compile the same kernel source again- this is due sometimes someone wants to continue with compiling when it aborts for some errors like a missing dependency. If i put some code in it to delete the folder you need to rebuild from scratch if something doesn't work immediatly. So deleting the kernel folder will create a new one and pulls the source code for the version you want to in it and then unpacks it.

About the no such file or directory error: i made a small code change - it seems your linux system is handling path environment a little else than mine. With that change it should be universally working. Can you redownload and test it again please.

SoulInfernoDE commented 1 year ago

THAT WAS AN ATTEMPT TO BUILD 6.0.1 KERNEL. IT IS NOT CLEAR TO ME WHETHER I CAN BUILD 5.15.0-android IF I AM RUNNING 6.0.1 I WILL GO AHEAD AND BOOT INTO 5.15.0 BY TRYING THE BUILD OF 5.15-0-android

You can build 6.x on a 5.x running kernel. The cleanest path is to boot into a 6.x kernel for building a 6.x kernel because of the config file. My build script otherwise copy the 5.x kernel config file and adds the missing lines and changes that were made in 6.x in it. But sometimes on your specific computer model you have some drivers or anything else that are build as module for example. If such a line is added in 6.x and was missing in 5.x the standard option for this driver will be set / selected which is often (yes) or (no) instead of (module). This normally doesn't affect your all day work with your linux mostly. But it burns the driver into the kernel instead of a loadable module. To update such a driver you need to rebuild the kernel then also because this specific driver is not a module but included in the kernel. Installing a mainline 6.x kernel on your computer will also select some decisions /yes/no/module) to the config file for your specific hardware.

Thats the only reason why i use 6.x to build a 6x kernel normally... ..but most of the time it is trivial and not needed.

sja45uk commented 1 year ago

TRYING TO BUILD kernel 5.15.0-android RESULTS IN THE SAME PROBLEM SO SOMETHING HAS GONE WRONG. I SUGGEST YOU LIST EXPLICITLY ALL THE STEPS TO DO A BUILD!

make: *** No rule to make target 'olddefconfig'. Stop. --2022-10-22 16:50:40-- https://raw.githubusercontent.com/SoulInfernoDE/compile-kernel-from-source/main/nogui/.config-fragment Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2022-10-22 16:50:41 ERROR 404: Not Found.

/home/steve/.scripts/cfs_noguimerge.sh: line 40: ./scripts/kconfig/merge_config.sh: No such file or directory make: *** No rule to make target 'olddefconfig'. Stop.

I ASSUME THAT I NEED TO DOWNLOAD SOMETHING EXTRA

SoulInfernoDE commented 1 year ago

Can you redownload the build script and try again? - I made another mistake with the last fix so sorry for that i fixed it again. I did set the wrong dot and moved it to the correct location in the script. I also added the ASHMEM module from anbox modules and a patch that fixes the dkms creation for 6.x kernels.

https://raw.githubusercontent.com/SoulInfernoDE/compile-kernel-from-source/v6.x/nogui/cfs_noguimerge.sh

sja45uk commented 1 year ago

I am afraid that whatever you have done has not resolved the problem. To try and compile/build/install the 6.01 kernel I did the following:

$ rm -rf ~/.scripts $ rm -rf ~/Downloads/kernel* $ cd ~/Documents/GitHub/compile-kernel-from-source/create_scripts_environment_for_terminal_direct_use/ $ wget https://raw.githubusercontent.com/SoulInfernoDE/compile-kernel-from-source/v6.x/nogui/cfs_noguimerge.sh $ chmod +x cfs_noguimerge.sh

I tried the following, but nothing was copied to ~/.scripts so I renamed the script and executed it in place. $ ./createscriptenv.sh

$ mv cfs_noguimerge.sh cfs_noguimerge_v6.sh $ ./cfs_noguimerge_v6.sh | tee > cfs_noguimerge_v6.log

I attach the log file for your perusal.

cfs_noguimerge_v6.log

sja45uk commented 1 year ago

It seems that another linux kernel (6.0.3) was released as stable over the weekend, and I successfully used the Ubuntu Mainline Kernel Builder to install it and rebooted. This means that my target became to build and install kernel-6.0.3-android to run Anbox with the latest kernel modules. I downloaded your latest compile-kernel-from-sources package, and made it available with create_scripts_environment_for_terminal_direct_use/enablescriptenv.sh, which I used to run cfs_noguimerge.sh and created a kernel-7.0.3-android overnight. I will check my cfs_noguimerge_v7.0.3.log soon, to see if there were any more issue and let you know that it boots and the results of running 'anbox system-info', 'anbox session-manager --software-rendering' and 'anbox.appmgr'. However, I would also appreciate your guidance on how to pare back the number of kernel installs, build files etc in my boot and Ubuntu 22.04 partitions to the latest stable 5.x and 6.x versions. Thanks Steve

sja45uk commented 1 year ago

$ anbox system-info version: 0.0~git20211020-2build1-Ubuntu cpu: arch: x86 brand: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz features:

SO I NEED TO MOUNT BINDER AND BINDERFS TO MAKE THEM TRUE

sja45uk commented 1 year ago

$ sudo mkdir /dev/binder $ sudo mount -t binder binder /dev/binder $ sudo mkdir /dev/binderfs $ sudo mount -t binder binder /dev/binderfs $ anbox system-info ... kernel: version: Linux version 6.0.3-android (steve@DELL) (gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1 SMP PREEMPT_DYNAMIC Mon Oct 24 04:14:04 BST 2022 binder: true binderfs: true ashmem: true

SO IT ALL LOOKS GOOD AS FAR AS IT GOES

sja45uk commented 1 year ago

$ anbox session-manager --software-rendering [ 2022-10-24 08:35:46] [daemon.cpp:61@Run] Failed to connect to socket /run/anbox-container.socket: No such file or directory

SO I HAVE SEEN THIS MESSAGE BEFORE BUT DON'T KNOW HOW TO FIX IT I GUESS WE NEED TO LOOK IN THE BUILD & INSTALL LOG TO LOOK FOR CLUES

cfs_noguimerge_v6.0.3.log

sja45uk commented 1 year ago

FOR COMPLETENESS

$ anbox.appmgr anbox.appmgr: command not found

sja45uk commented 1 year ago

NOTHING OBVIOUS IN THE LOGFILE

dpkg-deb: building package 'linux-libc-dev' in '../linux-libc-dev_6.0.3-android-1_amd64.deb'. dpkg-deb: building package 'linux-image-6.0.3-android' in '../linux-image-6.0.3-android_6.0.3-android-1_amd64.deb'. dpkg-deb: building package 'linux-image-6.0.3-android-dbg' in '../linux-image-6.0.3-android-dbg_6.0.3-android-1_amd64.deb'. dpkg-genchanges: info: binary-only upload (no source code included) dpkg-buildpackage: info: binary-only upload (no source included) Executing..! Selecting previously unselected package linux-headers-6.0.3-android. (Reading database ... 497251 files and directories currently installed.) Preparing to unpack .../linux-headers-6.0.3-android_6.0.3-android-1_amd64.deb ... Unpacking linux-headers-6.0.3-android (6.0.3-android-1) ... Selecting previously unselected package linux-image-6.0.3-android. Preparing to unpack .../linux-image-6.0.3-android_6.0.3-android-1_amd64.deb ... Unpacking linux-image-6.0.3-android (6.0.3-android-1) ... Selecting previously unselected package linux-image-6.0.3-android-dbg. Preparing to unpack .../linux-image-6.0.3-android-dbg_6.0.3-android-1_amd64.deb ... Unpacking linux-image-6.0.3-android-dbg (6.0.3-android-1) ... Preparing to unpack .../linux-libc-dev_6.0.3-android-1_amd64.deb ... Unpacking linux-libc-dev:amd64 (6.0.3-android-1) over (5.15.0-android-1) ... Setting up linux-headers-6.0.3-android (6.0.3-android-1) ... Setting up linux-image-6.0.3-android (6.0.3-android-1) ...

Kernel preparation unnecessary for this kernel. Skipping...

Building module: cleaning build area... make -j8 KERNELRELEASE=6.0.3-android all KERNEL_SRC=/lib/modules/6.0.3-android/build... cleaning build area...

ashmem_linux.ko: Running module version sanity check.

depmod.... ...done. Setting up linux-image-6.0.3-android-dbg (6.0.3-android-1) ... Setting up linux-libc-dev:amd64 (6.0.3-android-1) ...

If the script has an error for you, please report it on github. You can leave a screenshot if you like to in the issues section

sja45uk commented 1 year ago

THE FOLLOWING LOOKS GOOD

$ ls -al /dev/binderfs/ total 0 drwxr-xr-x 3 root root 0 Oct 24 09:24 . drwxr-xr-x 24 root root 6560 Oct 24 09:23 .. crw------- 1 root root 239, 6 Oct 24 09:24 binder crw------- 1 root root 239, 5 Oct 24 09:24 binder-control crw------- 1 root root 239, 9 Oct 24 09:24 binderfs drwxr-xr-x 2 root root 0 Oct 24 09:24 features crw------- 1 root root 239, 7 Oct 24 09:24 hwbinder crw------- 1 root root 239, 8 Oct 24 09:24 vndbinder

sja45uk commented 1 year ago

SO I TRIED THE FOLLOWING

$ systemctl start anbox-container-manager.service $ anbox session-manager --software-rendering [ 2022-10-24 09:32:15] [daemon.cpp:61@Run] Failed to connect to socket /run/anbox-container.socket: No such file or directory

$ systemctl list-units | grep anbox UNIT LOAD ACTIVE SUB DESCRIPTION >

$ sudo systemctl start anbox-container-manager.service [sudo] password for steve: steve@DELL:~/Documents/GitHub/compile-kernel-from-source/create_scripts_environment_for_terminal_direct_use $ anbox session-manager --software-rendering [ 2022-10-24 09:36:03] [daemon.cpp:61@Run] Failed to connect to socket /run/anbox-container.socket: No such file or directory

$ ls -l /etc/systemd/system|grep anbox-container-manager.service $ ls -l /lib/systemd/system|grep anbox-container-manager.service -rw-r--r-- 1 root root 485 Feb 10 2022 anbox-container-manager.service

ps -aux|grep daemon root 1553 0.0 0.0 242224 9228 ? Ssl 09:12 0:00 /usr/libexec/accounts-daemon avahi 1564 0.0 0.0 9772 5264 ? Ss 09:12 0:00 avahi-daemon: running [DELL.local] message+ 1576 0.0 0.0 13404 8456 ? Ss 09:12 0:02 @dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only root 1578 0.0 0.1 335716 20184 ? Ssl 09:12 0:01 /usr/sbin/NetworkManager --no-daemon avahi 1666 0.0 0.0 9360 516 ? S 09:12 0:00 avahi-daemon: chroot helper root 2266 0.0 0.0 4848 1328 ? Ss 09:12 0:00 /usr/lib/x86_64-linux-gnu/lxc/lxc-monitord --daemon rtkit 2662 0.0 0.0 155920 4120 ? SNsl 09:12 0:00 /usr/libexec/rtkit-daemon steve 3918 0.0 0.1 1760720 29808 ? S<sl 09:12 0:00 /usr/bin/pulseaudio --daemonize=no --log-target=journal steve 3922 0.0 0.0 314688 8200 ? Sl 09:12 0:00 /usr/bin/gnome-keyring-daemon --daemonize --login steve 3926 0.0 0.0 11828 7196 ? Ss 09:12 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only steve 4037 0.0 0.0 10480 5476 ? S 09:12 0:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 11 --address=unix:path=/run/user/1000/at-spi/bus steve 4079 0.0 0.2 561652 41408 ? SLl 09:12 0:00 /usr/libexec/goa-daemon steve 4210 0.0 0.0 2888 964 ? Ss 09:12 0:00 sh -c /usr/bin/ibus-daemon --panel disable $([ "$XDG_SESSION_TYPE" = "x11" ] && echo "--xim") steve 4213 0.1 0.0 316964 12972 ? Sl 09:12 0:07 /usr/bin/ibus-daemon --panel disable steve 4445 0.0 0.1 412420 22868 ? Ssl 09:12 0:00 /usr/libexec/gpaste/gpaste-daemon steve 8407 0.0 0.0 9212 2432 pts/0 S+ 10:43 0:00 grep --color=auto daemon

$ journalctl UNIT=anbox-container-manager.service Oct 24 10:30:41 DELL systemd[1]: Condition check resulted in Anbox Container Manager being skipped. Oct 24 10:35:56 DELL systemd[1]: Condition check resulted in Anbox Container Manager being skipped.

$ journalctl | less /anbox Oct 16 19:21:32 DELL dbus-daemon[1347]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service' requested by ':1.229' (uid=0 pid=243434 comm="sudo snap install --devmode --beta anbox " label="unconfined") Oct 16 19:21:41 DELL sudo[243434]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000) Oct 16 19:21:41 DELL snapd[3048]: api_snaps.go:319: Installing snap "anbox" revision unset

LOOK FOR ANYTHING RELEVANT TO anbox THIS LOOKS LIKE SOMETHING LEFT OVER FROM $ sudo snap install anbox

BUT I LATER REMOVED IT SO PERHAPS TOO LONG AGO TO BE RELEVANT $ sudo snap remove anbox

/24 Oct /anbox Oct 24 01:09:47 DELL sudo[7299]: steve : TTY=pts/0 ; PWD=/home/steve/Downloads ; USER=root ; COMMAND=/usr/sbin/dkms remove -m anbox-binder/1 --all Oct 24 01:09:48 DELL sudo[7335]: steve : TTY=pts/0 ; PWD=/home/steve/Downloads/anboxashmem ; USER=root ; COMMAND=/usr/bin/cp -rT /home/steve/Downloads/anboxashmem/ /usr/src/anbox-ashmem-1 Oct 24 01:09:48 DELL sudo[7338]: steve : TTY=pts/0 ; PWD=/home/steve/Downloads/anboxashmem ; USER=root ; COMMAND=/usr/bin/cp /home/steve/Downloads/anboxashmem/anbox.conf /etc/modules-load.d/ Oct 24 01:09:48 DELL sudo[7341]: steve : TTY=pts/0 ; PWD=/home/steve/Downloads/anboxashmem ; USER=root ; COMMAND=/usr/bin/cp /home/steve/Downloads/anboxashmem/99-anbox.rules /lib/udev/rules.d/ Oct 24 01:09:48 DELL sudo[7344]: steve : TTY=pts/0 ; PWD=/home/steve/Downloads/anboxashmem ; USER=root ; COMMAND=/usr/sbin/dkms install anbox-ashmem/1 Oct 24 01:09:50 DELL sudo[7762]: steve : TTY=pts/0 ; PWD=/home/steve/Downloads/anboxashmem ; USER=root ; COMMAND=/usr/sbin/modprobe ashmem_linux Oct 24 01:09:50 DELL sudo[7765]: steve : TTY=pts/0 ; PWD=/home/steve/Downloads/anboxashmem ; USER=root ; COMMAND=/usr/bin/mkdir /dev/binder Oct 24 01:09:50 DELL sudo[7768]: steve : TTY=pts/0 ; PWD=/home/steve/Downloads/anboxashmem ; USER=root ; COMMAND=/usr/bin/mount -t binder binder /dev/binder Oct 24 01:09:50 DELL sudo[7772]: steve : TTY=pts/0 ; PWD=/home/steve/Downloads/anboxashmem ; USER=root ; COMMAND=/usr/sbin/lsmod Oct 24 01:09:50 DELL sudo[7776]: steve : TTY=pts/0 ; PWD=/home/steve/Downloads/anboxashmem ; USER=root ; COMMAND=/usr/bin/ls -alh /dev/binder /dev/ashmem

JUST LOOK AT THE ACTIVE TAIL OF THE LOGGING

$ journalctl -f && sudo systemctl start anbox-container-manager.service Oct 24 11:58:51 DELL systemd[1]: Started Fingerprint Authentication Daemon. Oct 24 11:59:00 DELL sudo[9323]: steve : TTY=pts/0 ; PWD=/home/steve/Documents/GitHub/compile-kernel-from-source/create_scripts_environment_for_terminal_direct_use ; USER=root ; COMMAND=/usr/bin/systemctl start anbox-container-manager.service Oct 24 11:59:00 DELL sudo[9323]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000) Oct 24 11:59:00 DELL systemd[1]: Condition check resulted in Anbox Container Manager being skipped. Oct 24 11:59:00 DELL sudo[9323]: pam_unix(sudo:session): session closed for user root Oct 24 11:59:21 DELL systemd[1]: fprintd.service: Deactivated successfully. Oct 24 11:59:58 DELL sudo[9342]: steve : TTY=pts/0 ; PWD=/home/steve/Documents/GitHub/compile-kernel-from-source/create_scripts_environment_for_terminal_direct_use ; USER=root ; COMMAND=/usr/bin/systemctl start anbox-container-manager.service Oct 24 11:59:58 DELL sudo[9342]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000) Oct 24 11:59:58 DELL systemd[1]: Condition check resulted in Anbox Container Manager being skipped. Oct 24 11:59:58 DELL sudo[9342]: pam_unix(sudo:session): session closed for user root

sja45uk commented 1 year ago

$ sudo modprobe ashmem_linux $ sudo modprobe binder_linux $ env ANBOX_LOG_LEVEL=debug anbox session-manager [ 2022-10-24 11:10:41] [daemon.cpp:61@Run] Failed to connect to socket /run/anbox-container.socket: No such file or directory

THERE IS A RELATED PATCH, BUT IT LOOKS TOO OLD (Email: 30 Jul 2019) TO BE DIRECTLY RELEVANT

[PATCH] BUGFIX: systemd exec should be using an executable

Exec= should be followd by an executable (or an interpriatator in case of shell scripts) to be called.

this bugfix fixes "Condition check resulted in Anbox Container Manager being skipped" error when starting anbox-container-manager.service . . . create mode 100644 debian/patches/0007-serviceshouldcallbash.patch

sja45uk commented 1 year ago

THIS LOOKS OK??

$ ls -alh /dev/binder /dev/ashmem crw------- 1 root root 10, 121 Oct 24 09:12 /dev/ashmem

/dev/binder: total 0 drwxr-xr-x 3 root root 0 Oct 24 09:24 . drwxr-xr-x 24 root root 6.5K Oct 24 09:23 .. crw------- 1 root root 239, 1 Oct 24 09:24 binder crw------- 1 root root 239, 0 Oct 24 09:24 binder-control crw------- 1 root root 239, 4 Oct 24 09:24 binderfs drwxr-xr-x 2 root root 0 Oct 24 09:24 features crw------- 1 root root 239, 2 Oct 24 09:24 hwbinder crw------- 1 root root 239, 3 Oct 24 09:24 vndbinder

INSTALL LIBRARIES TO IMPROVE DEBUGGING

$ sudo apt install android-libunwind The following NEW packages will be installed android-libunwind $ sudo apt install android-libunwind-dev The following NEW packages will be installed android-libunwind-dev libbsd-dev libmd-dev

THE FOLLOWING ALSO SEEMS TO BE RELEVANT

So I checked and it seems that modern versions of systemd allow conditions to be set in the service file. If those conditions are not met, the service doesn't start. The systemd.unit man page has a whole section on this. I suggest you start by reading it, then go through the anbox service file and check what conditions it has set for running. Some systemd users here can probably take you on from there.

TRYING TO LOCATE SERVICE FILE

$ sudo find / -name anbox-container-manager.service -print /usr/lib/systemd/system/anbox-container-manager.service

$ sudo cat /usr/lib/systemd/system/anbox-container-manager.service [Unit] Description=Anbox Container Manager Documentation=man:anbox(1) After=network.target Wants=network.target ConditionPathExists=/var/lib/anbox/android.img

[Service] ExecStartPre=/sbin/modprobe ashmem_linux ExecStartPre=/sbin/modprobe binder_linux ExecStartPre=/usr/share/anbox/anbox-bridge.sh start ExecStart=/usr/bin/anbox container-manager --daemon --privileged --data-path=/var/lib/anbox ExecStopPost=/usr/share/anbox/anbox-bridge.sh stop

[Install] WantedBy=multi-user.target

$ sudo ls -l /var/lib/anbox/android.img ls: cannot access '/var/lib/anbox/android.img': No such file or directory

HUNT FOR IT IN THIS PARTITION

sudo find / -name android.img -print /home/steve/Downloads/Android_down/Anbox_214/anbox-work/android.img /home/steve/Downloads/Android_down/Anbox_214/squashfs-root/android.img /home/steve/Downloads/Android_down/Anbox_186/squashfs-root/android.img

$ ls -l /home/steve/Downloads/Android_down/Anbox_214/anbox-work/android.img -rw-r--r-- 1 steve steve 325902336 Oct 16 20:18 /home/steve/Downloads/Android_down/Anbox_214/anbox-work/android.img $ ls -l /home/steve/Downloads/Android_down/Anbox_214/squashfs-root/android.img -rw-r--r-- 1 root root 325902336 Jul 20 2018 /home/steve/Downloads/Android_down/Anbox_214/squashfs-root/android.img

SO I JUST NEED TO COPY ONE OF THE ANDROID IMAGES TO WHERE THE SERVICE FILE IS LOOKING

$ sudo cp -p /home/steve/Downloads/Android_down/Anbox_214/anbox-work/android.img /var/lib/anbox/

TRY STARTING SERVICE AGAIN, AND HOPE THE NEW ERROR MESSAGES HELP

$ sudo systemctl start anbox-container-manager.service Job for anbox-container-manager.service failed because the control process exited with error code. See "systemctl status anbox-container-manager.service" and "journalctl -xeu anbox-container-manager.service" for details.

$ sudo systemctl status anbox-container-manager.service

× anbox-container-manager.service - Anbox Container Manager Loaded: loaded (/lib/systemd/system/anbox-container-manager.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2022-10-24 13:10:50 BST; 2min 53s ago Docs: man:anbox(1) Process: 10806 ExecStartPre=/sbin/modprobe ashmem_linux (code=exited, status=0/SUCCESS) Process: 10807 ExecStartPre=/sbin/modprobe binder_linux (code=exited, status=1/FAILURE) Process: 10808 ExecStopPost=/usr/share/anbox/anbox-bridge.sh stop (code=exited, status=1/FAILURE) CPU: 16ms

Oct 24 13:10:50 DELL systemd[1]: Starting Anbox Container Manager... Oct 24 13:10:50 DELL modprobe[10807]: modprobe: FATAL: Module binder_linux not found in directory /lib/modules/6.0.3-android Oct 24 13:10:50 DELL systemd[1]: anbox-container-manager.service: Control process exited, code=exited, status=1/FAILURE Oct 24 13:10:50 DELL anbox-bridge.sh[10808]: anbox-bridge isn't running Oct 24 13:10:50 DELL systemd[1]: anbox-container-manager.service: Control process exited, code=exited, status=1/FAILURE Oct 24 13:10:50 DELL systemd[1]: anbox-container-manager.service: Failed with result 'exit-code'. Oct 24 13:10:50 DELL systemd[1]: Failed to start Anbox Container Manager.

$ sudo journalctl -xeu anbox-container-manager.service > anbox_journalctl-xeu.log

anbox_journalctl-xeu.log

NOW TO SPEND SOME TIME ANALYZING THE OUTPUT TO DETERMINE WHAT IS HAPPENING THIS SEEMS SOMETHING OBVIOUS THAT IS EASILY RECTIFIED

FATAL: Module binder_linux not found in directory /lib/modules/6.0.3-android

$ sudo find / -name binder_linux* -print

/usr/lib/modules/5.15.0-52-generic/kernel/drivers/android/binder_linux.ko

THIS IS A BLOW AS kernel/drivers/android/binder_linux.ko WAS BUILT FOR kernel 5.15.0-generic BUT NOT kernel 6.0.3-generic AND I DON'T KNOW IF THEY CAN USE THE SAME MODULE!!

I SUPPOSE THAT I COULD TRY A SYMBOLIC LINK, AND SEE IF I GET ANY FURTHER

$ sudo cp -p /usr/lib/modules/5.15.0-52-generic/kernel/drivers/android/binder_linux.ko /usr/lib/modules/6.0.3-android/kernel/drivers/android/ cp: cannot create regular file '/usr/lib/modules/6.0.3-android/kernel/drivers/android/': Not a directory

$ sudo ln -s /usr/lib/modules/5.15.0-52-generic/kernel/drivers/android/ /usr/lib/modules/6.0.3-android/kernel/drivers

$ sudo systemctl status anbox-container-manager.service × anbox-container-manager.service - Anbox Container Manager Loaded: loaded (/lib/systemd/system/anbox-container-manager.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2022-10-24 13:10:50 BST; 26min ago Docs: man:anbox(1) Process: 10806 ExecStartPre=/sbin/modprobe ashmem_linux (code=exited, status=0/SUCCESS) Process: 10807 ExecStartPre=/sbin/modprobe binder_linux (code=exited, status=1/FAILURE) Process: 10808 ExecStopPost=/usr/share/anbox/anbox-bridge.sh stop (code=exited, status=1/FAILURE) CPU: 16ms

Oct 24 13:10:50 DELL systemd[1]: Starting Anbox Container Manager... Oct 24 13:10:50 DELL modprobe[10807]: modprobe: FATAL: Module binder_linux not found in directory /lib/modules/6.0.3-android Oct 24 13:10:50 DELL systemd[1]: anbox-container-manager.service: Control process exited, code=exited, status=1/FAILURE Oct 24 13:10:50 DELL anbox-bridge.sh[10808]: anbox-bridge isn't running Oct 24 13:10:50 DELL systemd[1]: anbox-container-manager.service: Control process exited, code=exited, status=1/FAILURE Oct 24 13:10:50 DELL systemd[1]: anbox-container-manager.service: Failed with result 'exit-code'. Oct 24 13:10:50 DELL systemd[1]: Failed to start Anbox Container Manage

sja45uk commented 1 year ago

LOOK TO SEE IF ANY LINUX MODULES ARE AVAILABLE

$ lsmod | grep linux ashmem_linux 20480 0

IT APPEARS NO binder_linux.ko IS AVAILABLE IN THE KERNEL, JUST askmem_linux.ko MODULE LOADED, SO TRY A REBOOT

sja45uk commented 1 year ago

$ anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity

[ 2022-10-24 13:47:46] [launch.cpp:71@launch_session_manager_dbus] Failed to start session manager instance via dbus

sja45uk commented 1 year ago

TRY SOME MORE THINGS TO SEE IF WE CAN LEARN MORE

$ anbox container-manager [ 2022-10-24 13:59:54] [container_manager.cpp:74@operator()] You are running the container manager manually which is most likely not [ 2022-10-24 13:59:54] [container_manager.cpp:75@operator()] what you want. The container manager is normally started by systemd or [ 2022-10-24 13:59:54] [container_manager.cpp:76@operator()] another init system. If you still want to run the container-manager [ 2022-10-24 13:59:54] [container_manager.cpp:77@operator()] you can get rid of this warning by starting with the --daemon option. [ 2022-10-24 13:59:54] [container_manager.cpp:78@operator()] [ 2022-10-24 13:59:54] [container_manager.cpp:82@operator()] You are not running the container-manager as root. Generally you don't [ 2022-10-24 13:59:54] [container_manager.cpp:83@operator()] want to run the container-manager manually unless you're a developer [ 2022-10-24 13:59:54] [container_manager.cpp:84@operator()] as it is started by the init system of your operating system.

$ sudo anbox container-manager --daemon [sudo] password for steve: [ 2022-10-24 14:02:20] [container_manager.cpp:122@operator()] boost::filesystem::create_directories: Invalid argument

systemctl --user restart anbox-session-manager.service

$ anbox version anbox 0.0~git20211020-2build1-Ubuntu

$ systemctl status anbox-container-manager.service ○ anbox-container-manager.service - Anbox Container Manager Loaded: loaded (/lib/systemd/system/anbox-container-manager.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:anbox(1)

$ modprobe ashmen_linux modprobe: FATAL: Module ashmen_linux not found in directory /lib/modules/6.0.3-android

SO I NEED TO WORK OUT WHAT SHOULD MAKE THESE MODULES AVAILABLE IN THIS DIRECTORY

sja45uk commented 1 year ago

THE CLUES MIGHT BE HERE

https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0.3/ v6.0.3 Mainline Test These binary packages represent builds of Mainline Test tree at the commit below:

cod/mainline/v6.0.3 (99e61a7516cc0278a19170b46f291e1aa1903a11)

To obtain the source from which they are built fetch the commit below:

git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack cod/mainline/v6.0.3

Test amd64/build succeeded (rc=0, on=amd64, time=0:12:43, log=amd64/log) amd64/linux-headers-6.0.3-060003-generic_6.0.3-060003.202210211149_amd64.deb amd64/linux-headers-6.0.3-060003_6.0.3-060003.202210211149_all.deb amd64/linux-image-unsigned-6.0.3-060003-generic_6.0.3-060003.202210211149_amd64.deb amd64/linux-modules-6.0.3-060003-generic_6.0.3-060003.202210211149_amd64.deb

sja45uk commented 1 year ago

$ sudo apt install /home/steve/Downloads/linux-modules-6.0.3-060003-generic_6.0.3-060003.202210211149_amd64.deb

Reading package lists... Building dependency tree... Reading state information... linux-modules-6.0.3-060003-generic is already the newest version (6.0.3-060003.202210211149). 0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade. linux-modules-6.0.3_install.log (END)

sja45uk commented 1 year ago

SO I NEED TO WORK OUT HOW YOU BUILD AND INSTALL THESE EXTRA ANBOX KERNEL MODULES

$ sudo add-apt-repository ppa:morphis/anbox-support

Repository: 'deb https://ppa.launchpadcontent.net/morphis/anbox-support/ubuntu/ jammy main' More info: https://launchpad.net/~morphis/+archive/ubuntu/anbox-support Adding repository. Press [ENTER] to continue or Ctrl-c to cancel. Adding deb entry to /etc/apt/sources.list.d/morphis-ubuntu-anbox-support-jammy.list Found existing deb-src entry in /etc/apt/sources.list.d/morphis-ubuntu-anbox-support-jammy.list Adding disabled deb-src entry to /etc/apt/sources.list.d/morphis-ubuntu-anbox-support-jammy.list Adding key to /etc/apt/trusted.gpg.d/morphis-ubuntu-anbox-support.gpg with fingerprint CFD4CCDE77B82D4FA3B113E521C6044A875B67B7

Err:9 https://ppa.launchpadcontent.net/morphis/anbox-support/ubuntu jammy Release
404 Not Found [IP: 185.125.190.52 443]

Reading package lists... Done
E: The repository 'https://ppa.launchpadcontent.net/morphis/anbox-support/ubuntu jammy Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

$ sudo apt update

Reading package lists... Done E: The repository 'https://ppa.launchpadcontent.net/morphis/anbox-support/ubuntu jammy Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

$ sudo apt install linux-headers-generic anbox-modules-dkms Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package anbox-modules-dkms

SO FOR SOME REASON THERE IS NO RELEASE FILE, SO WE CAN'T INSTALL IT

SoulInfernoDE commented 1 year ago

Yes it looks okay, ashmem and binder/binderfs is there.

sja45uk commented 1 year ago

THIS INVESTIGATION CONSTITUTES A SIGNIFICANT PART OF MY CONTRIBUTION TO HACKTOBERFEST 2022. THE OBJECTIVE BEING TO ALLOW ANDROID IMAGES TO RUN ON UBUNTU 22.04 LTS, WITHOUT BEING DEPENDENT ON $ SUDO SNAP INSTALL --CLASSIC

sja45uk commented 1 year ago

Yes it looks okay, ashmem and binder/binderfs is there.

CAN YOU ENLIGHTEN ME WHAT IS THE MAJOR BLOCK AND HOW DO I OVERCOME IT??

SoulInfernoDE commented 1 year ago

Nice Steve. https://github.com/SoulInfernoDE/compile-kernel-from-source/issues/2#issuecomment-1289041856 Very nicely done here. So yes container manager needs the anbox Android image I mentioned. To the binder_linux.ko You DON'T NEED IT! If you have built your kernel including binder YOU WON'T GET A MODULE! ❤️ Only patched ASHMEM module is needed now. But remember the ppa of morphis is unmaintained. You cannot install BINDER as a module..

To make binder usable to anbox you need to sudo mkdir /dev/binder

and

sudo mount -t binder binder /dev/binder

Same for binderfs if you choose to use that instead (only with newest sources from anbox possible)

sudo mkdir /dev/binderfs sudo mount -t binder binder /dev/binderfs

sja45uk commented 1 year ago

I HAVE JUST TRIED TO PUT AN ENTRY IN /ETC/FSTAB TO MAKE THE MOUNT PERSISTENT

#

makes persistent sudo mount -t binder binder /dev/binderfs

binder /dev/binderfs binder nofail 0 0

SoulInfernoDE commented 1 year ago

I HAVE JUST TRIED TO PUT AN ENTRY IN /ETC/FSTAB TO MAKE THE MOUNT PERSISTENT

#

makes persistent sudo mount -t binder binder /dev/binderfs

binder /dev/binderfs binder nofail 0 0

Correct file, didn't check the Syntax yet for you but the way is correct. 👍

sja45uk commented 1 year ago

$ sudo mkdir /dev/binderfs $ sudo mount -t binder binder /dev/binderfs $ sudo systemctl start anbox-container-manager.service Job for anbox-container-manager.service failed because the control process exited with error code. See "systemctl status anbox-container-manager.service" and "journalctl -xeu anbox-container-manager.service" for details.

SO CLEARLY THERE IS SOMETHING STILL NOT RIGHT, AND I AM RUNNING OUT OF IDEAS

SoulInfernoDE commented 1 year ago

https://github.com/SoulInfernoDE/compile-kernel-from-source/issues/2#issuecomment-1287368513

Here is the path to the anbox Android image. According to the Readme of anbox the image is not included in the source version

SoulInfernoDE commented 1 year ago

Also a very good documented wiki is always the arch wiki from the arch Linux community here if you are interested in digging into some details:

https://wiki.archlinux.org/title/Anbox

sja45uk commented 1 year ago

Which Image?? Can you give me a link to the Readme, so I am sure that we are reading the same thing.

SoulInfernoDE commented 1 year ago

Here: https://github.com/anbox/anbox/blob/master/docs/build-android.md

and here: https://github.com/anbox/anbox/blob/master/docs/runtime-setup.md

sja45uk commented 1 year ago

$ sudo modprobe binder_linux devices=binder,hwbinder,vndbinder,anbox-binder,anbox-hwbinder,anbox-vndbinder modprobe: FATAL: Module binder_linux not found in directory /lib/modules/6.0.3-android

I STILL CAN'T GET OVER THIS PROBLEM!!

SoulInfernoDE commented 1 year ago

As I said you do not have a binder module and you wont get a binder module and YOU DO NOT NEED IT with your android kernel :-)

Binder is now PART OF YOUR KERNEL