To emulate termux inside termux, Use the first version of termux-proot.
(Execute this outside termux-proot environment)
# Download the file of 1st version of termux-proot
curl -sLo ~/termux-proot.sh https://github.com/Yonle/termux-proot/raw/v1.0.0/termux
# Change permission
chmod +x ~/termux-proot.sh
# Start sandbox
~/termux-proot.sh
A sandboxed, 2nd termux, isolated or jailed termux environment with proot
Test something out in sandboxed environment with 0% Afraid of getting bricked in your real termux. Human is curious, Ain't we?
Also support on non-Android distro, Including Debian, Alpine, and etc.
Before installing, We need these 3 packages to be installed in your Termux:
git
to fetching Android base from termux-docker.curl
for fetching & downloading latest termux bootstrap.unzip
for unzipping Termux Bootstrap.proot
for start sandboxed environment.
These required packages should be installed in your host/system.
And finally, set up sandboxed environment:
curl -sLO git.io/termux-proot.sh
chmod +x termux-proot.sh
# Will setup by itself & start sandboxed environment
./termux-proot.sh
Uninstalling termux-proot is literally, very easy.
rm termux-proot.sh
# The command below can use for reinstalling.
proot -0 rm -rf ~/.termux-fs
# The command below can use for reinstalling/Updating Android base system.
proot -0 rm -rf ~/.android-base
termux-proot also has it's own environment variables and it's changeable. They are:
TERMUX_SANDBOX_PATH
- Path to where Termux sandbox folder located. Default is$HOME/.termux-fs
TERMUX_SANDBOX_APPPATH
- A variable that used to simulate Termux app path. Default is/data/data/com.termux
TERMUX_SANDBOX_ENV
- A variable that used to reveal a environment variable to guest. Can used likeTERMUX_SANDBOX_ENV="FOO=BAR BAR=FOO" ./termux-proot.sh
TERMUX_SANDBOX_PROOT_OPTIONS
- A variable that used to add some proot arguments. Can used likeTERMUX_SANDBOX_PROOT_OPTIONS="-b /sdcard" ./termux-proot.sh
TERMUX_ANDROID_BASE
- Path to Android base system. Default is$HOME/.android-base
- Sandboxed /system
- More secured
- DNS is static. Should using static resolver that located at
/etc/hosts
or/system/etc/hosts
. You may need toecho unresolved-domain.com >> /system/etc/static-dns-hosts.txt
and run/system/bin/update-static-dns
to get yourunresolved-domain.com
work. - Some certain thing is not available (like OpenSLES, dalvikvm, and etc).
- ARM variant may require a custom seccomp profile to remove restrictions from personality() system call. Whereas Docker Hub contains prebuilt ARM image, it is outdated and won't receive updates anymore.
- Telegram group
- Discord Server
- #yonle on libera.chat