mirror of
https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root.git
synced 2025-12-06 16:17:40 +00:00
Split architectures APKs file size reduce
From now use a fork from inotia00 revanced cli to splitting architectures (source code: https://github.com/FiorenMas/revanced-cli). It can reduce APKs file size about 10% by using --rip-lib res and --rip-lib classes to remove unnecessary things
This commit is contained in:
@@ -31,11 +31,12 @@ patch "youtube-music-armeabi-v7a" "revanced"
|
|||||||
|
|
||||||
# Split architecture:
|
# Split architecture:
|
||||||
rm -f revanced-cli* revanced-patches*.jar patches.json
|
rm -f revanced-cli* revanced-patches*.jar patches.json
|
||||||
dl_gh "revanced-cli" "inotia00" "latest"
|
dl_gh "revanced-cli" "FiorenMas" "latest"
|
||||||
dl_gh "revanced-patches" "inotia00" "latest"
|
dl_gh "revanced-patches" "inotia00" "latest"
|
||||||
# Split architecture Youtube:
|
# Split architecture Youtube:
|
||||||
|
get_patches_key "youtube-revanced"
|
||||||
for i in {0..3}; do
|
for i in {0..3}; do
|
||||||
split_arch "youtube-revanced" "youtube-${archs[i]}-revanced" "$(gen_rip_libs ${libs[i]})"
|
split_arch "youtube" "youtube-${archs[i]}-revanced" "$(gen_rip_libs ${libs[i]})"
|
||||||
done
|
done
|
||||||
|
|
||||||
#################################################
|
#################################################
|
||||||
|
|||||||
@@ -20,11 +20,12 @@ patch "youtube" "revanced-extended-android-5"
|
|||||||
|
|
||||||
# Split architecture:
|
# Split architecture:
|
||||||
rm -f revanced-cli* revanced-patches*.jar patches.json
|
rm -f revanced-cli* revanced-patches*.jar patches.json
|
||||||
dl_gh "revanced-cli" "inotia00" "latest"
|
dl_gh "revanced-cli" "FiorenMas" "latest"
|
||||||
dl_gh "revanced-patches" "inotia00" "latest"
|
dl_gh "revanced-patches" "inotia00" "latest"
|
||||||
# Split architecture Youtube:
|
# Split architecture Youtube:
|
||||||
|
get_patches_key "youtube-revanced-extended-5"
|
||||||
for i in {0..3}; do
|
for i in {0..3}; do
|
||||||
split_arch "youtube-revanced-extended-android-5" "youtube-${archs[i]}-revanced-extended-android-5" "$(gen_rip_libs ${libs[i]})"
|
split_arch "youtube" "youtube-${archs[i]}-revanced-extended-android-5" "$(gen_rip_libs ${libs[i]})"
|
||||||
done
|
done
|
||||||
|
|
||||||
#################################################
|
#################################################
|
||||||
@@ -20,11 +20,12 @@ patch "youtube" "revanced-extended-android-6-7"
|
|||||||
|
|
||||||
# Split architecture:
|
# Split architecture:
|
||||||
rm -f revanced-cli* revanced-patches*.jar patches.json
|
rm -f revanced-cli* revanced-patches*.jar patches.json
|
||||||
dl_gh "revanced-cli" "inotia00" "latest"
|
dl_gh "revanced-cli" "FiorenMas" "latest"
|
||||||
dl_gh "revanced-patches" "inotia00" "latest"
|
dl_gh "revanced-patches" "inotia00" "latest"
|
||||||
# Split architecture Youtube:
|
# Split architecture Youtube:
|
||||||
|
get_patches_key "youtube-revanced-extended-6-7"
|
||||||
for i in {0..3}; do
|
for i in {0..3}; do
|
||||||
split_arch "youtube-revanced-extended-android-6-7" "youtube-${archs[i]}-revanced-extended-android-6-7" "$(gen_rip_libs ${libs[i]})"
|
split_arch "youtube" "youtube-${archs[i]}-revanced-extended-android-6-7" "$(gen_rip_libs ${libs[i]})"
|
||||||
done
|
done
|
||||||
|
|
||||||
#################################################
|
#################################################
|
||||||
@@ -36,9 +36,12 @@ patch "reddit" "revanced-extended" "inotia"
|
|||||||
|
|
||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
|
rm -f revanced-cli*
|
||||||
|
dl_gh "revanced-cli" "FiorenMas" "latest"
|
||||||
# Split architecture Youtube:
|
# Split architecture Youtube:
|
||||||
|
get_patches_key "youtube-revanced-extended"
|
||||||
for i in {0..3}; do
|
for i in {0..3}; do
|
||||||
split_arch "youtube-revanced-extended" "youtube-${archs[i]}-revanced-extended" "$(gen_rip_libs ${libs[i]})"
|
split_arch "youtube" "youtube-${archs[i]}-revanced-extended" "$(gen_rip_libs ${libs[i]})"
|
||||||
done
|
done
|
||||||
|
|
||||||
#################################################
|
#################################################
|
||||||
@@ -142,13 +142,7 @@ patch() {
|
|||||||
elif [ $num -eq 2 ]; then
|
elif [ $num -eq 2 ]; then
|
||||||
p="" b="-b" m="-m" a="-a " ks="_ks" pu="--clean"
|
p="" b="-b" m="-m" a="-a " ks="_ks" pu="--clean"
|
||||||
echo "Patching with Revanced-cli version 2"
|
echo "Patching with Revanced-cli version 2"
|
||||||
else
|
|
||||||
red_log "[-] Revanced-cli not supported"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
red_log "[-] Revanced-cli not supported"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
eval java -jar revanced-cli*.jar $p\
|
eval java -jar revanced-cli*.jar $p\
|
||||||
@@ -161,9 +155,6 @@ patch() {
|
|||||||
--keystore=./src/$ks.keystore \
|
--keystore=./src/$ks.keystore \
|
||||||
$pu \
|
$pu \
|
||||||
$a$1.apk
|
$a$1.apk
|
||||||
unset version
|
|
||||||
unset excludePatches
|
|
||||||
unset includePatches
|
|
||||||
else
|
else
|
||||||
red_log "[-] Not found $1.apk"
|
red_log "[-] Not found $1.apk"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -174,21 +165,27 @@ patch() {
|
|||||||
|
|
||||||
# Split architectures using Revanced CLI, created by j-hc or inotia00
|
# Split architectures using Revanced CLI, created by j-hc or inotia00
|
||||||
archs=("arm64-v8a" "armeabi-v7a" "x86_64" "x86")
|
archs=("arm64-v8a" "armeabi-v7a" "x86_64" "x86")
|
||||||
libs=("x86_64 x86 armeabi-v7a" "x86_64 x86 arm64-v8a" "x86 armeabi-v7a arm64-v8a" "x86_64 armeabi-v7a arm64-v8a")
|
libs=("lib/armeabi-v7a lib/x86_64 lib/x86" "lib/arm64-v8a lib/x86_64 lib/x86" "lib/armeabi-v7a lib/arm64-v8a lib/x86" "lib/armeabi-v7a lib/arm64-v8a lib/x86_64")
|
||||||
gen_rip_libs() {
|
gen_rip_libs() {
|
||||||
for lib in $@; do
|
for lib in $@; do
|
||||||
echo -n "--rip-lib $lib "
|
echo -n "--rip-lib "$lib" "
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
split_arch() {
|
split_arch() {
|
||||||
green_log "[+] Splitting $1 to ${archs[i]}:"
|
green_log "[+] Splitting $1 to ${archs[i]}:"
|
||||||
if [ -f "./release/$1.apk" ]; then
|
if [ -f "$1.apk" ]; then
|
||||||
eval java -jar revanced-cli*.jar patch \
|
eval java -jar revanced-cli*.jar patch \
|
||||||
--patch-bundle revanced-patches*.jar \
|
--patch-bundle revanced-patches*.jar \
|
||||||
$3 \
|
--merge revanced-integrations*.apk\
|
||||||
|
$excludePatches\
|
||||||
|
$includePatches \
|
||||||
|
--rip-lib res \
|
||||||
|
--rip-lib classes \
|
||||||
|
$3\
|
||||||
|
--options=./src/options/$2.json \
|
||||||
--keystore=./src/_ks.keystore \
|
--keystore=./src/_ks.keystore \
|
||||||
--out=./release/$2.apk\
|
--out=./release/$2.apk\
|
||||||
./release/$1.apk
|
$1.apk
|
||||||
else
|
else
|
||||||
red_log "[-] Not found $1.apk"
|
red_log "[-] Not found $1.apk"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user