termux / proot

An chroot-like implementation using ptrace.
https://wiki.termux.com/wiki/PRoot
Other
761 stars 160 forks source link

sometime wrong when i use proot on andriod10 (huawei mate30 Pro with emui10.0.0.182) #95

Closed black-A closed 4 years ago

black-A commented 4 years ago

$apt install proot -y ...... .....

$termux-chroot proot error: execve("/usr/bin/bash"): No such file or directory proot info: It seems that termux-exec is active and is prepending /data/data/com.termux/... to executable paths If this is path is not available inside proot, please "unset LD_PRELOAD" fatal error: see proot --help. proot error: trying to remove a directory outside of '/data/data/com.termux/files/usr/tmp', please report this error. proot error: can't chmod '/data/data/com.termux/files/usr/tmp/proot-19463-v1QCNP': No such file or directory

so ,what is going on?I am just a newbie。

oxr463 commented 4 years ago

If this is path is not available inside proot, please "unset LD_PRELOAD"

Did you try this?

black-A commented 4 years ago

thanks for you help@oxr463,do you mean just Enter this command (unset LD_PRELOAD)directly? I just tried it ,and Now it looks like this:

$ unset LD_PRELOAD $ $ $ termux-chroot proot error: execve("/usr/bin/bash"): Function not implemented proot info: possible causes:

if I did someting wrong?thanks again!

fornwall commented 4 years ago

Is this a general problem with running proot under Android 10? Reproduced by me on a Mate 20 pro, by @Grimler91 on a samsung device and also by me on an Android 10 emulator.

Seems to be -ARGS="$ARGS -r $PREFIX/.. which is not working?

Using this diff: https://gist.github.com/fornwall/e2cb15e77f49d3ff176ab5f2fb8b4caa, termux-chroot starts to work somewhat (no /bin folder, and / cannot be listed as it's the root of the Android file system).

@michalbednarski Any idea what is going on?

haimn commented 4 years ago

Happens to me too on Galaxy s9+ Android 10, clean install.

michalbednarski commented 4 years ago

On Android 10 /system/bin/linker (which is neccessary to execute dynamically linked executables) has became symlink to /apex/com.android.runtime/bin/linker, it will be neccessary to add /apex to bind mounts.

haimn commented 4 years ago

@michalbednarski I can confirm adding: ARGS="$ARGS -b /apex:/apex" to termux-chroot fixed the problem, thanks!

azadlaw11 commented 4 years ago

@michalbednarski can u explain i dont understand

RalfWerner commented 4 years ago

it will be neccessary to add /apex to bind mounts

@michalbednarski -b /apex solves the problem of termux with compileSdkVersion 28 but not with 29 or android-R on a Q10/R11 device. Has anyone successfully checked this yet?