Skip to content

Willie169/termux-sh

Repository files navigation

termux-sh

This repository contains setup Shell scripts and related files 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 All

Prerequisites

  • Approximately 30GB of storage space.
  • Internet connection for packages and scripts download and setup.
  • It is recommended to turn off the battery optimization of Termux.
  • It is recommended to hold wakelock. You can do so by opening Termux, pulling down the notification bar, and tapping "Acquire wakelock".
  • It is recommended to prevent the Process completed (signal 9) - press Enter error. You may encounter the Process completed (signal 9) - press Enter Error during the Termux Setup All or 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 tutorial, but don't know how to connect to ADB or want to connect to your Android device's ADB without another device, please read another section of my tutorial about Shizuku.

Main Script

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-all.sh

This script invokes termux-setup-all.sh, which install essential packages, configures shortcuts, and sets up proot environments.

Follow the screen guide to complete it. If you see a dancing parrot (provided 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: Installs tools for development, runtime environments, and utilities for C/C++, Python, Java, Node.js, Rust, Go, Ruby, Perl, QEMU, proot, GitHub, GitLab, SSL, SSH, JQ, FFMPEG, Maven, Termux-X11, TigerVNC, XFCE4, Zsh, and more on Termux.
  2. Shortcut configuration: Copies shortcuts from DOTshortcuts into .shortcuts and the home directory (~) and appends the DOTbashrc to ~/.bashrc.
  3. Termux property adjustments: Enables external app access via termux.properties.
  4. Termux proot environment: Installs Yonle's termux-proot with termux-proot.sh.
  5. Audio setup: Configures audio output using Andronix's setup-audio.sh.
  6. Fabric installation: Installs fabric, a modular AI framework.
  7. Node.js library installation: Installs node-html-markdown, showdown, and jsdom.
  8. Font setup: Downloads msyh.ttc as ~/.termux/font.ttc.
  9. Andronix Debian environments: Creates three Debian Buster ARM64 proot environments (~/debian1, ~/debian2, and ~/debian3) with respective scripts from Andronix.
  10. Proot-distro Debian environments: Configures two Debian Bookworm ARM64 instances with default alias debian and overridden alias debianbox respectively.
  11. Proot-distro Ubuntu environments: Configures an Ubuntu 24.04 ARM64 instance with default alias ubuntu.
  12. Environments setup scripts: Executes specific configuration scripts for each proot or proot-distro instance. See below Setup Script section for more information.

Setup Scripts

These scripts are parts of Termux Setup All.

  • proot-install-debianbox.sh: Installs a proot-distro Debian Bookworm ARM64 environment with an overriden alias debianbox.
  • debian-dev.sh: Installs developer tools 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. Used for the debian1 proot in Termux Setup All.
  • debian-texlive.sh: Installs texlive-full and pandoc. Used for the debian2 proot in Termux Setup All.
  • debian-xfce-mod.sh: Modified version of Andronix's debian-xfce.sh. Install and configures Debian Buster ARM64 proot with XFCE GUI support and related tools. Used for the debian3 proot in Termux Setup All.
  • ubuntu-24-04.sh: Installs developer tools for Ubuntu 24.04 VMs, 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. Used for the proot-distro Ubuntu 24.04 with the default alias ubuntu in Termux Setup All.
  • debian-bookworm.sh: Installs developer tools for Debian Bookworm VMs, including development tools, runtime environments, and utilities for C/C++, Python3, Java 17, Node.js, Rust, Go, Ruby, Perl, GitHub, SSL, SSH, Maven, NumPy SymPy Matplotlib, Selenium, Jupyter Notebook, Pandas, Meson, Ninja, and more. It is compatible with both QEMU and Proot setups. Used for the proot-distro Debian Bookworm with the default alias debian in Termux Setup All.
  • box64-wine64-winetricks.sh: Installs box64, wine64, and winetricks for running x86_64 Linux and Windows applications on ARM64 Linux. Used for the proot-distro Debian Bookworm with the overriden alias debianbox in Termux Setup All.

Shortcuts

All shortcuts are located in DOTshortcuts, except for DOTbashrc, which is in the repository's root directory. Some of them are for things not installed or configured in the Termux Setup All.

Boot VM Scripts

Utility Scripts

  • DOTbashrc: Customized .bashrc for Termux with pre-defined aliases, functions, and environment variables.
  • 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 main setup workflow and can be installed with xmrig-install.sh. Change the wallet 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.
  • termux-backup-bz2.sh: Creates a compressed backup with the highest compression level of BZIP2 of the Termux home and user directories, then splits the resulting archive into smaller parts, each 4000MB in size.
  • start-audio.sh: pulseaudio --start. Configured in Main Setup Workflow according to https://docs.andronix.app/troubleshoot/sound.

Additional Scripts and Instructions

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


To-do List

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

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages