mirror of
https://github.com/j-hc/revanced-magisk-module.git
synced 2025-04-29 14:14:38 +02:00
keep binaries local
This commit is contained in:
parent
64accee8d5
commit
50ac511d95
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,7 +1,5 @@
|
||||
*.jar
|
||||
*.apk
|
||||
*.zip
|
||||
/revanced-cache
|
||||
/temp
|
||||
/build
|
||||
test*
|
||||
|
BIN
bin/aapt2/aapt2-arm
Executable file
BIN
bin/aapt2/aapt2-arm
Executable file
Binary file not shown.
BIN
bin/aapt2/aapt2-arm64
Executable file
BIN
bin/aapt2/aapt2-arm64
Executable file
Binary file not shown.
BIN
bin/apksigner.jar
Normal file
BIN
bin/apksigner.jar
Normal file
Binary file not shown.
BIN
bin/htmlq/htmlq-arm
Normal file
BIN
bin/htmlq/htmlq-arm
Normal file
Binary file not shown.
BIN
bin/htmlq/htmlq-arm64
Normal file
BIN
bin/htmlq/htmlq-arm64
Normal file
Binary file not shown.
BIN
bin/htmlq/htmlq-x86_64
Executable file
BIN
bin/htmlq/htmlq-x86_64
Executable file
Binary file not shown.
28
utils.sh
28
utils.sh
@ -2,6 +2,7 @@
|
||||
|
||||
MODULE_TEMPLATE_DIR="revanced-magisk"
|
||||
TEMP_DIR="temp"
|
||||
BIN_DIR="bin"
|
||||
BUILD_DIR="build"
|
||||
|
||||
if [ "${GITHUB_TOKEN:-}" ]; then GH_HEADER="Authorization: token ${GITHUB_TOKEN}"; else GH_HEADER=; fi
|
||||
@ -91,35 +92,20 @@ get_rv_prebuilts() {
|
||||
}
|
||||
|
||||
get_prebuilts() {
|
||||
APKSIGNER="${BIN_DIR}/apksigner.jar"
|
||||
if [ "$OS" = Android ]; then
|
||||
local arch
|
||||
if [ "$(uname -m)" = aarch64 ]; then arch=arm64; else arch=arm; fi
|
||||
dl_if_dne ${TEMP_DIR}/aapt2 https://github.com/rendiix/termux-aapt/raw/d7d4b4a344cc52b94bcdab3500be244151261d8e/prebuilt-binary/${arch}/aapt2
|
||||
chmod +x "${TEMP_DIR}/aapt2"
|
||||
HTMLQ="${BIN_DIR}/htmlq-${arch}"
|
||||
AAPT2="${BIN_DIR}/aapt2-${arch}"
|
||||
else
|
||||
HTMLQ="${BIN_DIR}/htmlq-x86_64"
|
||||
fi
|
||||
mkdir -p ${MODULE_TEMPLATE_DIR}/bin/arm64 ${MODULE_TEMPLATE_DIR}/bin/arm ${MODULE_TEMPLATE_DIR}/bin/x86 ${MODULE_TEMPLATE_DIR}/bin/x64
|
||||
dl_if_dne "${MODULE_TEMPLATE_DIR}/bin/arm64/cmpr" "https://github.com/j-hc/cmpr/releases/latest/download/cmpr-arm64-v8a"
|
||||
dl_if_dne "${MODULE_TEMPLATE_DIR}/bin/arm/cmpr" "https://github.com/j-hc/cmpr/releases/latest/download/cmpr-armeabi-v7a"
|
||||
dl_if_dne "${MODULE_TEMPLATE_DIR}/bin/x86/cmpr" "https://github.com/j-hc/cmpr/releases/latest/download/cmpr-x86"
|
||||
dl_if_dne "${MODULE_TEMPLATE_DIR}/bin/x64/cmpr" "https://github.com/j-hc/cmpr/releases/latest/download/cmpr-x86_64"
|
||||
|
||||
HTMLQ="${TEMP_DIR}/htmlq"
|
||||
if [ ! -f "$HTMLQ" ]; then
|
||||
if [ "$OS" = Android ]; then
|
||||
if [ "$arch" = arm64 ]; then arch=arm64-v8a; else arch=armeabi-v7a; fi
|
||||
dl_if_dne ${TEMP_DIR}/htmlq https://github.com/j-hc/htmlq-ndk/releases/latest/download/htmlq-${arch}
|
||||
chmod +x $HTMLQ
|
||||
else
|
||||
if [ "${DRYRUN:-}" ]; then
|
||||
: >"$HTMLQ"
|
||||
else
|
||||
req "https://github.com/mgdm/htmlq/releases/latest/download/htmlq-x86_64-linux.tar.gz" "${TEMP_DIR}/htmlq.tar.gz"
|
||||
tar -xf "${TEMP_DIR}/htmlq.tar.gz" -C "$TEMP_DIR"
|
||||
rm "${TEMP_DIR}/htmlq.tar.gz"
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
config_update() {
|
||||
@ -330,7 +316,7 @@ patch_apk() {
|
||||
local stock_input=$1 patched_apk=$2 patcher_args=$3 rv_cli_jar=$4 rv_patches_jar=$5
|
||||
local cmd="java -jar $rv_cli_jar patch $stock_input -p -o $patched_apk -b $rv_patches_jar \
|
||||
--keystore=ks.keystore --keystore-entry-password=123456789 --keystore-password=123456789 --signer=jhc --alias=jhc $patcher_args --options=options.json"
|
||||
if [ "$OS" = Android ]; then cmd+=" --custom-aapt2-binary=${TEMP_DIR}/aapt2"; fi
|
||||
if [ "$OS" = Android ]; then cmd+=" --custom-aapt2-binary=${AAPT2}"; fi
|
||||
pr "$cmd"
|
||||
if [ "${DRYRUN:-}" = true ]; then
|
||||
cp -f "$stock_input" "$patched_apk"
|
||||
|
Loading…
x
Reference in New Issue
Block a user