- add --plugin argument to make the compose activity and gradle project optional - adjust size of compose activity button - fix cross-pollution of aarch64 binaries into x86_64 bootstraps - another attempt to fix sed -i argument for Mac
1.9 KiB
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.ioby Debian/Ubuntu ordocker-ceby https://docker.com are both acceptable here. This example shows installingdocker.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
--nameand--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
--dirtyif you are troubleshooting.