This repository contains setup Shell scripts for automating the configuration of Termux, a terminal emulator for Android. The scripts facilitate the installation of essential tools, environment configurations, proot distributions, QEMU virtual machines, and related setups.
- Approximately 30GB of storage space.
- Internet connection for packages and scripts download and setup.
- It is recommended to turn off the battery optimization for Termux.
- It is recommended to hold wakelock while running these scripts. You can do so by opening Termux, pulling down the notification bar, and then tapping Acquire wakelock on the notification of Termux.
- It is recommended to prevent the
Process completed (signal 9) - press Enter
error in advance. You may encounter theProcess completed (signal 9) - press Enter
Error when using Termux, especially when running VMs. To prevent it from occuring, please read my tutorial "Android Non Root" about it for the fixes. If you want to use the ADB command line fix, i.e.Fix for QEMs like OneUI, MiUi, Samsung, etc. and other non-stock Android 12L and beyond
in the above-mentioned tutorial, please read another section of my tutorial about Shizuku.
Copy and run the following script to initialize Termux with predefined settings:
termux-setup-storage
termux-change-repo
pkg update && pkg install git -y
cd ~ && git clone https://github.com/Willie169/termux-sh.git
bash ~/termux-sh/termux-setup.sh
This script invokes termux-setup.sh
, which installs essential packages, configures shortcuts, and sets up proot environments.
Follow the screen guide to complete it. If you see a dancing parrot, powered by parrot.live, on screen, pull down the notification bar and tap exit on the notification of Termux. Now, you can restart Termux and enjoy it.
- Package installation: Install tools for development, runtime environments, and utilities for C/C++, Python, Java, Node.js, Rust, Go, Ruby, Perl, proot, GitHub, GitLab, SSL, SSH, JQ, FFMPEG, Maven, Termux-X11, TigerVNC, XFCE4, Zsh, and more on Termux.
- Shortcut configuration: Copy shortcuts from
DOTshortcuts
into.shortcuts
for Termux:Widget and the home directory (~
), and then rename thebashrc.sh
in the home directory to.bashrc
. - Termux properties adjustments: Enable external app access via
termux.properties
. - Termux proot environment: Install Yonle's termux-proot, a Termux proot environment, with
proot-termux.sh
. - Audio setup: Configure audio output using Andronix's
setup-audio.sh
. - Fabric installation: Install fabric, an open-source modular framework for augmenting humans using Al using a crowdsourced set of Al prompts.
- Node.js library installation: Install
node-html-markdown
,showdown
, andjsdom
. - Andronix Debian environments: Create three Debian Buster ARM64 proot environments,
~/debian1
, which is CLI only, and~/debian2
, which has XFCE and VNC server configured, using script from Andronix. - Proot-distro Debian environments: Configure two Debian Bookworm ARM64 proot-distro instances with default alias,
debian
, and an overridden alias,debianbox
, respectively. - Proot-distro Ubuntu environments: Configure an Ubuntu 24.04 ARM64 proot-distro instance with default alias,
ubuntu
. - Environments setup scripts: Executes specific configuration scripts for each proot or proot-distro instance. See Setup Scripts section for more information.
These scripts are invoked by Termux Setup.
proot-install-debianbox.sh
: Installs proot-distro Debian Bookworm ARM64 instance with an overriden alias,debianbox
.debian-dev.sh
: Install developer tools for Debian Buster ARM64 instance, including development tools, runtime environments, and utilities for C/C++, Python3, Java 11, Node.js, Go, Ruby, Perl, GitHub, SSL, SSH, JQ, Maven, Zsh, NumPy SymPy Matplotlib, Selenium, Jupyter Notebook, Pandas, Meson, Ninja, and more. Invoked for thedebian1
proot environment in Termux Setup.debian-xfce-mod.sh
: Modified version ofAndronix's debian-xfce.sh
, which installs and configures Debian Buster ARM64 proot environment with XFCE GUI support and related tools. Invoked for thedebian2
proot environment in Termux Setup.debian-bookworm.sh
: Install developer tools for Debian Bookworm instance, including development tools, runtime environments, and utilities for C/C++, Python3, Java 17, Node.js, Rust, Go, Ruby, Perl, GitHub, SSL, SSH, Pandoc, TeX Live, Maven, NumPy SymPy Matplotlib, Selenium, Jupyter Notebook, Pandas, Meson, Ninja, Noto Sans CJK, STIX Two Math, and more. It can be used for both QEMU and Proot Debian Bookworm setups. The installation of fonts is compatible with the LaTeX-ToolKit I made, which boasts a comprehensive and customizable LaTeX template, template.tex, which is designed for article or report documentclass, TC (Traditional Chinese Taiwan), SC (Simplified Chinese), HK (Traditional Chinese Hong Kong), JP (Japanese), KR (Korean), and Latin-script languages, and with many commands and shorthands defined. Invoked for the Debian Bookworm ARM64 proot-distro instance with the default alias,debian
, in Termux Setup.box64-wine64-winetricks.sh
: Installbox64
,wine64
, andwinetricks
for running x86_64 Linux and Windows applications on an ARM64 Linux instance. Invoked for the Debian Bookworm ARM64 proot-distro instance with the overriden alias,debianbox
, in Termux Setup.ubuntu-24-04.sh
: Install developer tools for Ubuntu 24.04 instance, including development tools, runtime environments, and utilities for C/C++, Python3, Java 17, Node.js, Rust, Go, Ruby, Perl, GitHub, SSL, SSH, JQ, Maven, NumPy SymPy Matplotlib, Selenium, Jupyter Notebook, Pandas, Meson, Ninja, and more. Invoked for the Ubuntu 24.04 ARM64 proot-distro instance with the default alias,ubuntu
, in Termux Setup.
Shortcuts are located in DOTshortcuts
. Some of them are intended for tools that is not installed or configured in the Termux Setup, such as QEMU. Some related scripts and instructions are in Additional Scripts and Instructions.
debian1.sh
,debian2.sh
: Boot respective Debian Buster ARM64 proot environments.qemu-alpine-aarch64.sh
,qemu-alpine-aarch64-vnc.sh
,qemu-alpine-x86_64.sh
,qemu-alpine-x86_64-vnc.sh
,qemu-debian-aarch64.sh
,qemu-debian-aarch64-vnc.sh
,qemu-alpine-amd64.sh
,qemu-debian-amd64-vnc.sh
,qemu-bliss-vnc.sh
: Boot respective QEMU system emulation VMs with-netdev user,id=n1,dns=8.8.8.8,hostfwd=tcp::2222-:22 -device virtio-net,netdev=n1
option, where files with-vnc
in their names start VNC server at the host'slocalhost:0
and others are-nographic
. Those VMs can be installed withqemu-alpine-aarch64-install.sh
,qemu-alpine-x86_64-install.sh
,qemu-debian-arm64-install.sh
,qemu-debian-amd64-install.sh
, andqemu-bliss-install.sh
respectively. See Additional Scripts and Instructions for details.proot-debian.sh
,proot-debianbox.sh
: Boot respective Debian Bookworm ARM64 proot-distro instances withisolated
andfix-low-ports
options.nethunter.sh
: Boot the Kali Nethunter proot-distro instance with the aliaskali-default
as userkali
withisolated
andfix-low-ports
options.proot-termux.sh
: Boot the Termux proot.
bashrc.sh
: A customized.bashrc
for Termux with pre-defined aliases, functions, and environment variables for Tor, Git, Go, ANTLR4, etc.gitPull.sh
:git pull
all repositories in~/gh
.code.sh
,download.sh
:cd /storage/emulated/0/Documents/code
andcd /storage/emulated/0/Download
respectively.xmrig.sh
: Mine XMR to the repository owner's wallet,48j6iQDeCSDeH46gw4dPJnMsa6TQzPa6WJaYbBS9JJucKqg9Mkt5EDe9nSkES3b8u7V6XJfL8neAPAtbEpmV2f4XC7bdbkv
, using xmrig, which is not installed in the Termux Setup and can be installed withxmrig-install.sh
. Change the wallet address and other configurations if you need.shizuku.sh
:cd shizuku
andsh rish
. This is a shortcuts for Shizuku, which is not configured in the scripts in this repository. Please read the section of my tutorial about Shizuku for more information.termux-backup-bz.sh
: Create a compressed backup with the highest compression level of BZIP2 of the/data/data/com.termux/files/home
and/data/data/com.termux/files/usr
, then splits the resulting archive into parts, each 4000MB in size.android-backup-bz.sh
: Create a compressed backup with the highest compression level of BZIP2 of the/storage/emulated/0/Files
,/storage/emulated/0/DCIM
,/storage/emulated/0/Pictures
,/storage/emulated/0/Alarms
, and/storage/emulated/0/Documents
, then splits the resulting archive into parts, each 4000MB in size.start-audio.sh
: Start sound output from Termux. Configured in Termux Setup according to https://docs.andronix.app/troubleshoot/sound.
These scripts are not invoked by Termux Setup. Run it separately if you need it.
qemu-alpine-aarch64-install.sh
,qemu-alpine-x86_64-install.sh
,qemu-debian-arm64-install.sh
,qemu-debian-amd64-install.sh
,qemu-bliss-install.sh
: Setup amd boot the respective QEMU system emulation VMs with-netdev user,id=n1,dns=8.8.8.8,hostfwd=tcp::2222-:22 -device virtio-net,netdev=n1
option, where the Alpine VMs are created from Virt 3.21.0 ISO images and the Debian VMs are pre-created Bookworm QCOW2 images.qemu-bliss-install.sh
starts VNC server at the host'slocalhost:0
and others are-nographic
. Remember tosetup-alpine
in Alpine VMs and resize disk in Debian VMs. Bliss OS is an Android-based open source OS for x86_64 architecture that incorporates many optimizations, features, and that supports many more devices.qemu-resize.md
: Provide instructions and scripts for resizing QEMU images.alpine-docker.sh
: Install Docker on an Alpine machine and run hello-world.debian-waydroid.sh
: Install Waydroid on Debian derivatives such as the QEMU Debian VMs. Waydroid is a container-based approach to boot a full Android system in a Linux namespace on a GNU/Linux-based platform.xmrig-install.sh
: Clone and compile xmrig, an open source Monero (XMR) miner.proot-install-nethunter.sh
: Install the Kali Nethunter ARM64 proot-distro instance from https://github.com/sagar040/proot-distro-nethunter. Follow the screen guide and enter wanted Build ID to install. For example,KBDEXKMTE
for everything, which occupies about 34GB, andKBDEXKMTD
for default, which occupies about 13GB. Boot it with<build id> [
USER]
orproot-distro login <build id> [
USER]
. Open GUI after logged in withsudo kgui
. Please go to https://github.com/sagar040/proot-distro-nethunter for more information.
- Migrate to
config.json
to make this project more customizable. - Modularize scripts for flexibility and reusability.
- Expand VMs and development tools support.
This repository is licensed under GNU General Public License General Public License, see LICENSE.md for details.
- https://alpinelinux.org.
- https://andronix.app.
- https://blissos.org.
- https://github.com/AndronixApp/AndronixOrigin.
- https://github.com/cyberkernelofficial/docker-in-termux.
- https://github.com/diogok/termux-qemu-alpine-docker.
- https://github.com/hugomd/parrot.live.
- https://github.com/notofonts/noto-cjk.
- https://github.com/sagar040/proot-distro-nethunter.
- https://github.com/stipub/stixfonts.
- https://github.com/termux/proot-distro.
- https://github.com/termux/termux-app.
- https://github.com/termux/termux-widget.
- https://github.com/willie169/Android-Non-Root.
- https://github.com/Willie169/LaTeX-ToolKit.
- https://github.com/zanjie1999/windows-fonts.
- https://ivonblog.com.
- https://ryanfortner.github.io.
- https://wiki.termux.com.
- https://willie169.github.io.
- https://www.debian.org.
- https://www.docker.com.
- https://www.qemu.org.
- https://waydro.id.