Open sja45uk opened 2 years ago
NO ERROR, BUT NOT CONVINCED THAT IT IS WORKING PROPERLY, AS NO OUTPUT
$ modprobe ashmem_linux
NO ERROR, BUT NOT CONVINCED THAT IT IS WORKING PROPERLY, AS NO OUTPUT
$ modprobe ashmem_linux
It should work properly. I have used a patch from choff anbox modules for building ASHMEM as a module specifically for kernel 6.x
SO HOW DO I TEST IF BINDER IS WORKING, IF MOST COMMANDS ARE IRRELEVANT IF IT IS BUILT IN?
Can you do this command:
sudo dmesg | grep ashmem
SO HOW DO I TEST IF BINDER IS WORKING, IF MOST COMMANDS ARE IRRELEVANT IF IT IS BUILT IN?
This is it already:
ls -alh /dev/binder /dev/ashmem
also you can read more about it here: https://docs.kernel.org/admin-guide/binderfs.html
HERE YOU ARE
sudo dmesg | grep ashmem [ 4.664742] ashmem_linux: loading out-of-tree module taints kernel. [ 4.664766] ashmem_linux: module verification failed: signature and/or required key missing - tainting kernel
$ ls -alh /dev/binder /dev/ashmem ls: cannot access '/dev/binder': No such file or directory crw------- 1 root root 10, 121 Oct 24 14:43 /dev/ashmem
HERE YOU ARE
sudo dmesg | grep ashmem [ 4.664742] ashmem_linux: loading out-of-tree module taints kernel. [ 4.664766] ashmem_linux: module verification failed: signature and/or required key missing - tainting kernel
It means ASHMEM is loaded and the warning comes from the loaded ashmem module. This is totally fine ASHMEM seems to work but is not using correct signature - that is no problem with our custom kernel
$ ls -alh /dev/binder /dev/ashmem ls: cannot access '/dev/binder': No such file or directory crw------- 1 root root 10, 121 Oct 24 14:43 /dev/ashmem
Did you reboot and the binder mount point and ashmem module load vanished?
If yes try it manually again till we fix that on reboot part.
sudo mkdir /dev/binder sudo mkdir /dev/binderfs sudo mount -t binder binder /dev/binder sudo mount -t binder binder /dev/binderfs
And then do it again: sudo ls -alh /dev/binder /dev/ashmem
$ sudo mkdir /dev/binder
$ sudo mount -t binder binder /dev/binder
$ ls -alh /dev/binder total 0 drwxr-xr-x 3 root root 0 Oct 24 19:40 . drwxr-xr-x 24 root root 6.5K Oct 24 19:39 .. crw------- 1 root root 239, 6 Oct 24 19:40 binder crw------- 1 root root 239, 5 Oct 24 19:40 binder-control crw------- 1 root root 239, 9 Oct 24 19:40 binderfs drwxr-xr-x 2 root root 0 Oct 24 19:40 features crw------- 1 root root 239, 7 Oct 24 19:40 hwbinder crw------- 1 root root 239, 8 Oct 24 19:40 vndbinder
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.
$ anbox session-manager --software-rendering [ 2022-10-24 18:47:21] [daemon.cpp:61@Run] Failed to connect to socket /run/anbox-container.socket: No such file or directory
SO NONE OF THE TESTS I HAVE READ ABOUT SEEM TO WORK
Yes that seems correct now. At least the ashmem and binder part. Seems like there is some work to do to add/keep ashmem and binder active on reboot.
For the other part we need to investigate about the android_amd64.img and the container manager
$ sudo mkdir /dev/binder sudo mkdir /dev/binderfs sudo mount -t binder binder /dev/binder sudo mount -t binder binder /dev/binderfs mkdir: cannot create directory ‘/dev/binder’: File exists mkdir: cannot create directory ‘/dev/binderfs’: File exists steve@DELL:~/Downloads $ sudo ls -alh /dev/binder /dev/ashmem crw------- 1 root root 10, 121 Oct 24 14:43 /dev/ashmem
/dev/binder: total 0 drwxr-xr-x 3 root root 0 Oct 24 19:49 . drwxr-xr-x 24 root root 6.5K Oct 24 19:39 .. crw------- 1 root root 239, 11 Oct 24 19:49 binder crw------- 1 root root 239, 10 Oct 24 19:49 binder-control crw------- 1 root root 239, 14 Oct 24 19:49 binderfs drwxr-xr-x 2 root root 0 Oct 24 19:49 features crw------- 1 root root 239, 12 Oct 24 19:49 hwbinder crw------- 1 root root 239, 13 Oct 24 19:49 vndbinder
SO NO ASHMEM
Ashmem is there, read the output again:
$ sudo ls -alh /dev/binder /dev/ashmem crw------- 1 root root 10, 121 Oct 24 14:43 /dev/ashmem
For ashmem you wont see much output than that.
OR RATHER THE OUTPUT FROM ASHMEM IS VERY DIFFERENT FROM BINDER & BINDERFS
$ sudo ls -alh /dev/binderfs total 0 drwxr-xr-x 3 root root 0 Oct 24 19:49 . drwxr-xr-x 24 root root 6.5K Oct 24 19:39 .. crw------- 1 root root 239, 16 Oct 24 19:49 binder crw------- 1 root root 239, 15 Oct 24 19:49 binder-control crw------- 1 root root 239, 19 Oct 24 19:49 binderfs drwxr-xr-x 2 root root 0 Oct 24 19:49 features crw------- 1 root root 239, 17 Oct 24 19:49 hwbinder crw------- 1 root root 239, 18 Oct 24 19:49 vndbinder
Yes it's different 👍
I JUST WANT TO SEE ANBOX START PROPERLY, ALTHOUGH I HAVE NEVER USED IT. SOMETIMES IT TRIES TO START BUT NOT VERY SUCCESSFULLY.
HOW FAR ARE WE AWAY FROM GETTING SOMETHING USEFUL RUNNING?
I think we just need the anbox Android image and the container manager running.
NOT SURE WHAT THIS MEANS, BUT AT LEAST IT IS A TEST THAT IT PASSES
$ cat /dev/binderfs/features/oneway_spam_detection 1
Sure. I'm a bit lost yet due to not at home actually to make tests myself for the socket error. Maybe this script can help to fix it (testing on own risk) I used it to add ARM apps support and possibility to use play store but it might fix some permission troubles or the android.img trouble as it extracts it from anbox-work adds houdini (arm to x86_64 translation library) and playstore capabilities and then repack it and adds overlay support which makes the anbox file system kind of accessible outside.
https://github.com/geeks-r-us/anbox-playstore-installer/blob/master/install-playstore.sh
I want to add a note for you:
If you want to use Android 10+ you may be interested in the successor of Anbox called Waydroid. I am not far into it actually but i may test it heartly in some days.
Anbox can only support Android up to version 7.
The biggest difference from Waydroid is that it does use BINDER but does NOT use ASHMEM but MEMFD (MEMFD is already part of any newer kernels actually...) instead. ASHMEM support will be dropped in the near future with any new kernel and MEMFD will be the only option. As long as some Anbox users will make ASHMEM patches to be able to use ASHMEM again with newer kernels we are able to use Anbox on newer kernels.
Waydroid is the newer one. Just in case you have not heared about it yet:
Sure. I'm a bit lost yet due to not at home actually to make tests myself for the socket error. Maybe this script can help to fix it (testing on own risk) I used it to add ARM apps support and possibility to use play store but it might fix some permission troubles or the android.img trouble as it extracts it from anbox-work adds houdini (arm to x86_64 translation library) and playstore capabilities and then repack it and adds overlay support which makes the anbox file system kind of accessible outside.
https://github.com/geeks-r-us/anbox-playstore-installer/blob/master/install-playstore.sh
Watdroid-Linux is only a beta, although Anbox is obviously not much better off.
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.
I still haven't found the opportunity to test your fix out, but I hope to do so in the next couple of days.
I am not sure what instruction from you i was following, but my last overnight compilation (about 3 days ago) failed because it ran out of disk space. With all this compiling and installation of kernels, I was down to only 10% free space of the 250 GB available to Ubuntu before starting the overnight build. I investigated the third-party Clean Ubuntu utility, but that open-source python application contains significant warnings and errors when running on my Ubuntu 22.04. I need some way of safely removing all of the unnecessary kernels that I have got installed, if I can work out how best to free up significant disk space but the dependencies left me worried about making my installation unstable.
Hey Steve, to uninstall unneeded kernels you can just use apt to do it:
sudo apt remove
linux-headers-versionnumber-android linux-image-versionnumber-android linux-image-versionnumber-android-dbg
Start typing sudo apt remove linux- and double TAB-key to see available installed packages.
Also you may want to remove the kernel folder inside your downloads folder - this contains the source code and when build, the compiled source code takes also up to around 25 to 35gb.
Also you can backup the.deb-files from working kernel builds to be able to install them later on again if you like to.
Another note:
If you are using timeshift for making shadowing backups for your linux make sure you delete the backup points that includes the kernel source code folder. Otherwise you may wonder yourself why the disk space isn't freed yet. Happened to me some time ago 😁
Thanks, I will give it a whirl, as I guess apt remove will stop me going too far and breaking dependencies.
Sent from my iPad
On 27 Oct 2022, at 20:58, Soul Inferno DE @.***> wrote:
Hey Steve, to uninstall unneeded kernels you can just use apt to do it:
sudo apt remove linux-headers-versionnumber-android linux-image-versionnumber-android linux-image-versionnumber-android-dbg
Start typing sudo apt remove linux- and double TAP-key to see available installed packages.
Also you may want to remove the kernel folder inside your downloads folder - this contains the source code and when build the compiled source code which takes also up to around 25 to 35gb.
Also you can backup the.deb-files from working kernel builds to be able to install them later on again if you like to.
— Reply to this email directly, view it on GitHubhttps://github.com/SoulInfernoDE/compile-kernel-from-source/issues/2#issuecomment-1293999636, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAW2QP76X67DGHKXC3RRDTLWFLNE7ANCNFSM6AAAAAARI6ORX4. You are receiving this because you authored the thread.Message ID: @.***>
Yes i guess it's the simplest method. Did the removal work for you?
It allowed me to build the kernel, but when
That's a bug by design to keep the builded deb files for copying / backup. Im not sure if i should add a delete argument before the script exection in case the user compiled the source for another kernel version and didn't backed up the deb files yet..
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 :