Skip to content

Commit 2e6810d

Browse files
committed
chore: remove Termux support
1 parent af62133 commit 2e6810d

File tree

10 files changed

+5
-43
lines changed

10 files changed

+5
-43
lines changed

bin/aapt2/aapt2-arm

-5.06 MB
Binary file not shown.

bin/aapt2/aapt2-arm64

-5.89 MB
Binary file not shown.
File renamed without changes.

bin/htmlq/htmlq-arm

-1.44 MB
Binary file not shown.

bin/htmlq/htmlq-arm64

-2.28 MB
Binary file not shown.

bin/toml/tq-arm

-3.06 MB
Binary file not shown.

bin/toml/tq-arm64

-3.18 MB
Binary file not shown.
File renamed without changes.

build.sh

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,16 @@ if [ "${1-}" = "separate-config" ] || [ "${1-}" = "combine-logs" ] || [ "${1-}"
2121
exit 0
2222
fi
2323

24-
if [ "$OS" = Android ]; then
25-
if ! [ -d "$HOME/storage" ]; then
26-
pr "Requesting Termux storage permission..."
27-
pr "Please allow storage access in the popup"
28-
sleep 5
29-
termux-setup-storage
30-
fi
31-
OUTPUT_DIR="/sdcard/Download/uni-output"
32-
mkdir -p "$OUTPUT_DIR"
33-
else
34-
OUTPUT_DIR="$BUILD_DIR"
35-
fi
36-
3724
install_pkg jq
38-
if [ "$OS" = Android ]; then
39-
install_pkg java openjdk-21
40-
else
41-
install_pkg java openjdk-21-jdk
42-
fi
25+
install_pkg java openjdk-21-jdk
4326
install_pkg zip
4427

4528
vtf() { if ! isoneof "${1}" "true" "false"; then abort "ERROR: '${1}' is not a valid option for '${2}': only true or false is allowed"; fi; }
4629

4730
# -- Main config --
4831
toml_prep "${1:-config.toml}" || abort "could not find config file '${1:-config.toml}'\n\tUsage: $0 <config.toml>"
4932
main_config_t=$(toml_get_table_main)
50-
if ! PARALLEL_JOBS=$(toml_get "$main_config_t" parallel-jobs); then
51-
if [ "$OS" = Android ]; then PARALLEL_JOBS=1; else PARALLEL_JOBS=$(nproc); fi
52-
fi
33+
PARALLEL_JOBS=$(toml_get "$main_config_t" parallel-jobs) || PARALLEL_JOBS=$(nproc)
5334
DEF_PATCHES_VER=$(toml_get "$main_config_t" patches-version) || DEF_PATCHES_VER="latest"
5435
DEF_CLI_VER=$(toml_get "$main_config_t" cli-version) || DEF_CLI_VER="latest"
5536
DEF_PATCHES_SRC=$(toml_get "$main_config_t" patches-source) || DEF_PATCHES_SRC="MorpheApp/morphe-patches"
@@ -148,17 +129,6 @@ wait
148129
rm -rf temp/tmp.*
149130
if [ -z "$(ls -A1 "${BUILD_DIR}")" ]; then abort "All builds failed."; fi
150131

151-
if [ "$OS" = Android ]; then
152-
pr "Moving outputs to /sdcard/Download/uni-output"
153-
for apk in "${BUILD_DIR}"/*; do
154-
if [ -f "$apk" ]; then
155-
mv -f "$apk" "$OUTPUT_DIR/"
156-
pr "$(basename "$apk")"
157-
fi
158-
done
159-
am start -a android.intent.action.VIEW -d "file:///sdcard/Download/uni-output" -t resource/folder >/dev/null 2>&1 || :
160-
fi
161-
162132
log "\n- ▶️ » Install [MicroG-RE](https://github.com/MorpheApp/MicroG-RE/releases) for YouTube and YT Music APKs\n"
163133
log "$(cat "$TEMP_DIR"/*/changelog.md)"
164134

utils.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ BIN_DIR="bin"
66
BUILD_DIR="build"
77

88
if [ "${GITHUB_TOKEN-}" ]; then GH_HEADER="Authorization: token ${GITHUB_TOKEN}"; else GH_HEADER=; fi
9-
OS=$(uname -o)
109

1110
toml_prep() {
1211
if [ ! -f "$1" ]; then return 1; fi
@@ -56,9 +55,7 @@ install_pkg() {
5655
fi
5756
pr "Installing $pkg..."
5857

59-
if command -v pkg >/dev/null 2>&1; then
60-
pkg install -y "$pkg"
61-
elif command -v apt-get >/dev/null 2>&1; then
58+
if command -v apt-get >/dev/null 2>&1; then
6259
sudo apt-get install -y "$pkg"
6360
elif command -v dnf >/dev/null 2>&1; then
6461
sudo dnf install -y "$pkg"
@@ -150,12 +147,8 @@ get_prebuilts() {
150147

151148
set_prebuilts() {
152149
APKSIGNER="${BIN_DIR}/apksigner.jar"
153-
local arch
154-
arch=$(uname -m)
155-
if [ "$arch" = aarch64 ]; then arch=arm64; elif [ "${arch:0:5}" = "armv7" ]; then arch=arm; fi
156-
HTMLQ="${BIN_DIR}/htmlq/htmlq-${arch}"
157-
AAPT2="${BIN_DIR}/aapt2/aapt2-${arch}"
158-
TOML="${BIN_DIR}/toml/tq-${arch}"
150+
HTMLQ="${BIN_DIR}/htmlq"
151+
TOML="${BIN_DIR}/tq"
159152
}
160153

161154
_req() {
@@ -439,7 +432,6 @@ patch_apk() {
439432
local stock_input=$1 patched_apk=$2 patcher_args=$3 cli_jar=$4 patches_jar=$5
440433
local cmd="java -jar '$cli_jar' patch '$stock_input' --purge -o '$patched_apk' -p '$patches_jar' --keystore=ks.keystore \
441434
--keystore-entry-password=r4nD0M.paS4W0rD --keystore-password=r4nD0M.paS4W0rD --signer=krvstek --keystore-entry-alias=krvstek $patcher_args"
442-
if [ "$OS" = Android ]; then cmd+=" --custom-aapt2-binary='${AAPT2}'"; fi
443435
pr "$cmd"
444436
if eval "$cmd"; then [ -f "$patched_apk" ]; else
445437
rm "$patched_apk" 2>/dev/null || :

0 commit comments

Comments
 (0)