Building your own Termux with a custom package name

1. Downloading the Termux Source

git clone https://github.com/termux/termux-app
task downloadBootstraps() {
return;
doLast {
def version = "2021.06.30-r1"
downloadBootstrap("aarch64", "ce56ce9a4e8845bd1d35cc2695bbdd636c72625ee10ce21c9b98ab38ebbee5ab", version)
downloadBootstrap("arm", "537e81951c7d3d3f3def9ce6778e1032457488e21edb2c037a1e0e680c39e747", version)
downloadBootstrap("i686", "3c2ca858c0225671c00c44ac182e31819ffa93ec624e95e02824e7d6d30ca1b4", version)
downloadBootstrap("x86_64", "93c50d36b45bca42bb014395e8e184e5b540adcad5d4e215f7e64ebf0d655d2b", version)
}
}

2. Building our bootstrap-{arch}.zip

git clone https://github.com/termux/termux-packages.git
wget https://gist.github.com/seeya/a9ce074cf560aa7113043859360b7bfc/raw/206b5f4755b65569cf4af8d92b2481258c134b74/build-bootstrap.sh
TERMUX_APP_PACKAGE="com.mytermux"
./scripts/run-docker.sh
builder@533f0f18e289:~/termux-packages
./build-package.sh -a arm vim
./scripts/build-bootstrap.sh --architectures arm
  ...  
adding: var/lib/dpkg/info/findutils.md5sums (deflated 62%)
adding: var/lib/dpkg/info/docbook-xml.list (deflated 95%)
adding: var/lib/dpkg/info/findutils.list (deflated 85%)
adding: var/lib/dpkg/info/tmux.md5sums (deflated 53%)
adding: var/lib/dpkg/info/xsltproc.list (deflated 79%)
adding: var/lib/dpkg/info/ca-certificates-java.md5sums (stored 0%)
adding: var/lib/dpkg/alternatives/ (stored 0%)
adding: var/log/ (stored 0%)
adding: var/log/apt/ (stored 0%)
adding: var/service/ (stored 0%)
adding: var/service/sshd/ (stored 0%)
adding: var/service/sshd/down (stored 0%)
adding: var/service/sshd/run (deflated 5%)
adding: var/service/sshd/log/ (stored 0%)
adding: var/service/tor/ (stored 0%)
adding: var/service/tor/down (stored 0%)
adding: var/service/tor/run (deflated 5%)
adding: var/service/tor/log/ (stored 0%)
[*] Finished successfully (arm).
builder@533f0f18e289:~/termux-packages$ ll
total 77664
drwxrwxr-x 11 builder builder 4096 Dec 8 17:18 ./
drwxr-xr-x 1 builder builder 4096 Dec 8 09:54 ../
-rw-rw-r-- 1 builder builder 245 Dec 8 08:03 BACKERS.md
-rw-r--r-- 1 builder builder 79365148 Dec 8 17:18 bootstrap-arm.zip
-rwxrwxr-x 1 builder builder 2632 Dec 8 08:03 build-all.sh*
-rwxrwxr-x 1 builder builder 19809 Dec 8 08:03 build-package.sh*
-rwxrwxr-x 1 builder builder 1254 Dec 8 08:03 clean.sh*
-rw-rw-r-- 1 builder builder 5391 Dec 8 08:03 CODEOWNERS
-rw-rw-r-- 1 builder builder 12134 Dec 8 08:03 CONTRIBUTING.md
drwxr-xr-x 2 builder builder 4096 Dec 8 09:12 debs/
drwxrwxr-x 38 builder builder 4096 Dec 8 08:03 disabled-packages/
drwxrwxr-x 8 builder builder 4096 Dec 8 08:03 .git/
-rw-rw-r-- 1 builder builder 404 Dec 8 08:03 .gitattributes
drwxrwxr-x 5 builder builder 4096 Dec 8 08:03 .github/
-rw-rw-r-- 1 builder builder 249 Dec 8 08:03 .gitignore
-rw-rw-r-- 1 builder builder 503 Dec 8 08:03 LICENSE.md
drwxrwxr-x 2 builder builder 4096 Dec 8 08:03 ndk-patches/
drwxr-xr-x 2 builder builder 12288 Dec 8 14:11 output/
drwxrwxr-x 1109 builder builder 32768 Dec 8 08:03 packages/
-rw-rw-r-- 1 builder builder 1932 Dec 8 08:03 README.md
drwxrwxr-x 2 builder builder 4096 Dec 8 08:03 sample/
drwxrwxr-x 4 builder builder 4096 Dec 8 17:13 scripts/

3. Building the Termux App

Notes

  1. ./scripts/generate-bootstraps.sh — used when you want to go the apt route to install packages.
  2. /scripts/build-bootstraps.sh — is not found in the official repository. It’s gotten from https://github.com/termux/termux-app/issues/1983#issuecomment-812965326. With a slight modification to fix the output path of the debs being built.
  3. In order to use Termux:Boot, use the same signingConfigs on both application.
  4. https://gitter.im/termux/dev — very helpful community. Special thanks to agnostic-apollo who helped me along the way.

programmer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Giving great bug reports

Codebase Knowledge Graph

Dart is a Static or Dynamic typed Programming Language

Welcome to my profile

The A,B,C of my tech journey

Uploading photos/videos/files to AWS S3 using Swift 4

與陣列相似的字典集合 小練習

URGeo: Android Application to Fight Against Covid19

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
hc

hc

programmer

More from Medium

Announcing Laika+ with fully-integrated audits!

SOC 2 Powered by Laika

Indoor Location Positioning Using iBeacons

Winja CTF 2021 Writeup |c0c0 2021

Ozonetel Telephony Integration with Zoho CRM