termux / proot

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

libc.so not found #238

Closed imxade closed 2 years ago

imxade commented 2 years ago

how the rootfs was created?

curl -OL https://codeberg.org/zz/strap/raw/branch/master/pacstrap.sh
proot --link2symlink sh pacstrap.sh dir

project wiki link https://codeberg.org/zz/strap/wiki

proot

termux-info

termux-info
Termux Variables:
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=23425
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.librehat.com/apt/termux-main/ stable main
Updatable packages:
All packages up to date
termux-tools version:
1.19
Android version:
11
Kernel build information:
Linux localhost 4.14.186-perf-gc17a8df7b768 #1 SMP PREEMPT Fri Apr 15 21:33:01 CST 2022 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
M2103K19PI
sylirre commented 2 years ago

qemu-system-x86_64: -U: invalid option

That's because you are using QEMU system mode variant. Proot doesn't support it. You need user mode variant which runs executables directly without emulating hardware.

pkg install qemu-user-x86-64
unset LD_PRELOAD
proot -q qemu-user-x86_64 --link2symlink -b /data -b /proc -b /system -b /dev -b /sys -b /apex -r dir /usr/bin/bash