

These are highly dependant on phone model you have - I copied them over from desktop linux system with same number of cores as my phone. So, the most interesting part hides inside /fakeproc - these are the files needed for chrooted apps to function properly. # uncomment the following line to mount /sdcard directly to /Ĭommand+=" -b /storage/emulated/0:/internalStorage"Ĭommand+=" -b /data/data/com.termux/files/home/storage/external-1:/externalStorage"Ĭommand+=" PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/games:/usr/local/games" #command+=" -b /data/data/com.termux/files/home:/root" # uncomment the following line to have access to the home directory of termux # command+=" -b $(pwd)/fakeproc/self/oom_score_adj:/proc/self/oom_score_adj" # unset LD_PRELOAD in case termux-exec is installedĬommand+=" -b $(pwd)/fakeproc/uptime:/proc/uptime"Ĭommand+=" -b $(pwd)/fakeproc/stat:/proc/stat"Ĭommand+=" -b $(pwd)/fakeproc/version:/proc/version"Ĭommamd+=" -b $(pwd)/fakeproc/filesystems:/proc/filesystems" #!/data/data/com.termux/files/usr/bin/bash My startup file for ubuntu 18.04 looks like this (added some extra comments too) Link to Pastebin $ cat start-ubuntu.sh In the end, this strategy succeeded to some extent. But if system does not provide you one (and we don't want to force it by rooting device), why don't we just make our own fake CPU descriptors and other missing data? Many Linux apps, including java ones (libreoffice etc.) requires CPU info to be present. So, I started to solve the problems one after another. However, if you are user, all files (including the ones inside /bin etc.) will have owner `user:user`.

Also, inside a chroot (proot implementation), the filesystem mocks owner and group of file: if you are root, all files appears to be `root:root`.
#UBUNTU ON BOCHS ANDROID ANDROID#
Chroot does not magically allow access to devices/system information (starting from Android 9, even CPU usage info access requires system app privileges). I used termux (terminal emulator + some binaries needed for later steps) + AnLinux (this app contains commands to run in termux for chroot setup). There are many apps which will guide trough linux setup or perform it automatically. I used termux to setup a chroot, and it works like a charm. Basically, proot creates a virtual environment (chroot), that allows root-like privileges to run basic Linux applications. There are many guides in internet, alongside with some apps that can do that. Running Linux in chroot container using proot Running any OS with any apps using quemu.Running Linux apps in chroot container using proot.These are the things possible on my current setup: My setup migrated from Android 9 to 10 without any changes. Idea was, that I do not want to root my phone or mess with system in any way.

I started my experiments on my Samsung A70 (SM-A705FN). Why should I carry a laptop with me all the time? Like: I want to attach a keyboard and mouse right to my android device, start my favorite IDE of choice and make my docker-compose run right on the phone. Since long time ago, I kept thinking that android-based phones should be convergent.
