Skip to content

Termux setup and utility scripts for development tools, proot, QEMU, box86, and more.

License

Notifications You must be signed in to change notification settings

Willie169/termux-sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

termux-sh

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.


Termux Setup

Prerequisites

  • 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 the Process 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.

Execution

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.

Key features

  1. 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.
  2. Shortcut configuration: Copy shortcuts from DOTshortcuts into .shortcuts for Termux:Widget and the home directory (~), and then rename the bashrc.sh in the home directory to .bashrc.
  3. Termux properties adjustments: Enable external app access via termux.properties.
  4. Termux proot environment: Install Yonle's termux-proot, a Termux proot environment, with proot-termux.sh.
  5. Audio setup: Configure audio output using Andronix's setup-audio.sh.
  6. Fabric installation: Install fabric, an open-source modular framework for augmenting humans using Al using a crowdsourced set of Al prompts.
  7. Node.js library installation: Install node-html-markdown, showdown, and jsdom.
  8. 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.
  9. Proot-distro Debian environments: Configure two Debian Bookworm ARM64 proot-distro instances with default alias, debian, and an overridden alias, debianbox, respectively.
  10. Proot-distro Ubuntu environments: Configure an Ubuntu 24.04 ARM64 proot-distro instance with default alias, ubuntu.
  11. Environments setup scripts: Executes specific configuration scripts for each proot or proot-distro instance. See Setup Scripts section for more information.

Setup Scripts

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 the debian1 proot environment in Termux Setup.
  • debian-xfce-mod.sh: Modified version of Andronix's debian-xfce.sh, which installs and configures Debian Buster ARM64 proot environment with XFCE GUI support and related tools. Invoked for the debian2 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: Install box64, wine64, and winetricks 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

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.

Boot VM Scripts

Utility Scripts

  • 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 and cd /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 with xmrig-install.sh. Change the wallet address and other configurations if you need.
  • shizuku.sh: cd shizuku and sh 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.

Additional Scripts and Instructions

These scripts are not invoked by Termux Setup. Run it separately if you need it.


TODO

  • Migrate to config.json to make this project more customizable.
  • Modularize scripts for flexibility and reusability.
  • Expand VMs and development tools support.

License

This repository is licensed under GNU General Public License General Public License, see LICENSE.md for details.


References

About

Termux setup and utility scripts for development tools, proot, QEMU, box86, and more.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages