2025-04-03 19:10:32 -04:00
2025-04-03 19:08:09 -04:00
2024-12-08 17:58:24 -06:00
2024-12-08 17:58:24 -06:00
2024-12-08 17:58:24 -06:00
2024-12-08 17:58:24 -06:00
2024-12-08 17:58:24 -06:00
2024-12-08 17:58:24 -06:00

termux-generator

This script builds a vanilla, or optionally modified with custom plugins, termux-play-store/termux-apps/termux-app from source, but allows changing the package name from com.termux to anything else with a single command.

Dependencies

  • Docker
  • Android SDK
  • OpenJDK 17
  • git
  • patch

Example

Common Dependencies

sudo apt update
sudo apt install -y openjdk-17-jdk git patch

Android SDK (Ubuntu 20.04 and 22.04)

sudo apt install -y android-sdk sdkmanager

Android SDK (Ubuntu 24.04 and 24.10)

sudo apt install -y google-android-cmdline-tools-13.0-installer

Android SDK Common Setup

echo "export ANDROID_SDK_ROOT=/usr/lib/android-sdk" >> ~/.bashrc && . ~/.bashrc
sudo chown -R $(whoami) $ANDROID_SDK_ROOT
yes | sdkmanager --licenses

Docker

Note

docker.io by Debian/Ubuntu or docker-ce by https://docker.com are both acceptable here. This example shows installing docker.io - to use Docker CE instead, visit the docker.com docs for Docker CE

sudo apt install -y docker.io
sudo usermod -aG docker $(whoami)

Note

Restart your computer or otherwise apply the group change. For me, logging out and logging in was insufficient

sudo reboot

Using termux-generator

Important

Best-case typical time to compile with no arguments: 1 hour

Best-case typical time to compile the below example with --name and --add: 3 hours

git clone https://github.com/robertkirkman/termux-generator.git
cd termux-generator
./build-termux.sh --name a.copy.of.termux.with.the.location.changed \
                  --add build-essential,cmake,python,proot-distro

Important

Running the command a second time will delete all the modified files and start over. Use --dirty if you are troubleshooting.

Description
No description provided
Readme 176 KiB
Languages
Shell 98.4%
Java 1.6%