-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for termux #26
Comments
Thank you for contacting me. Have you tried simply compiling Lxroot inside of Termux? If yes, did Lxroot compile successfully? If yes, did Lxroot run? If yes, did Lxroot run successfully? My expectation is that Lxroot will, very probably, compile and run as-is (i.e. without modification) on any reasonably recent Linux kernel. So the first thing I would try is just compiling and running Lxroot inside of Termux. If you want me to try to compile and run Lxroot inside of Termux, then do you know if I can run Termux in QEMU? If yes, is there a guide to running Termux in QEMU? |
@parke thx for quick reply. I guess it's because termux is bionic based i also noticed unistd.h is from android modified not normal Linux . Run termux in QEMU? No you can't you need to emulate whole android system BlueStacks for windows and waydroid for linux. |
Btw other tools like bwrap,unshare,uchroot,rootlesskit compiled successfully and run but not successfully. unshare and bwrap is a pre built pkg in termux but needs root |
(Musl libc must provide them both, as I regularly build Lxroot in an Alpine Linux userland.) So basically, I would (or you would) need to either (a) "port" Lxroot to the Bionic C library, or (b) statically compile Lxroot on a different system (this would avoid using Bionic altogether). Both are possible.
Interesting. If The below link might help you investigate if unprivileged namespaces are disabled. If unprivileged namespaces are disabled, then here is another option. I could modify Lxroot to work as a suid binary. Non-root users would run Lxroot. Lxroot would run as root (via the suid bit). Lxroot would create and enter its chroot-environment. Then, Lxroot would drop root privileges and run the specified command inside the chroot-environment. I've thought about modifying Lxroot to support this use-case, and I do believe this modification would be possible. But I have never needed it myself. Another question: If unprivileged namespaces are disabled in Android, and if Termux is running as non-root, then how does Termux itself perform a chroot? (Or does Termux itself run as root?) |
If I download a |
@parke sorry for late reply My kernel version is 5.10 so there's not. I used strace with all tools i tried, unshare fails in I built lxroot static anyway inside proot alpine and transfer it to termux home it run and gives the help but when i try to do anything. I am not sure about the suid trick but you can try i think we should focus on this weird problem with unshare. |
Can you send me the
All versions of Ubuntu use glibc. (Ubuntu 18.04 happened to have the codename "Bionic Beaver", but that is pure coincidence.)
Try For example, I get:
The above is Lxroot reporting that the call to
Focusing on |
@parke this is what i got if i run your example in termux and my chroot ubuntu as none root user and root user execve("/usr/bin/unshare", ["unshare", "-Ur", "true"], 0x7fd6db4f90 /* 18 vars */) = 0 |
bwrap is in another repo root-repo they put any pkgs that use root there it fails before doing anything |
Maybe Android or Termux is installing seccomp filters that block certain system calls? Similar to this: I'm not an expert on Android, nor on Termux. So there may not be anything else I can do to help you learn why the call to |
Ok thx for your time |
Hello i hope you are doing well.
I am interested in your project and want to say can you port it to termux (Linux terminal for Android)? we are using chroot/proot from a long time chroot for root users works well and proot for non root users but it is really slow compared to chroot if you can port lxroot to termux it will be a game changer
Don't worry about fakeroot pkg we have it
Cheers
The text was updated successfully, but these errors were encountered: