diff --git a/Version.md b/Version.md index a45b7ade..0c668570 100755 --- a/Version.md +++ b/Version.md @@ -2,6 +2,7 @@ **Version: 1.4.5 (11-5-2026)** ++ Fix code + Fix missing img2simg and simg2img commands. **Version: 1.4.4 (6-5-2026)** diff --git a/app/build.gradle b/app/build.gradle index c477e23c..1da7f7d9 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,7 +21,7 @@ android { targetSdkVersion 28 versionCode Integer.parseInt(new java.text.SimpleDateFormat("yyMMddHH").format(new Date())) // versionCode 26021101 - versionName "1.4.5" + versionName "1.4.6" } signingConfigs { release { diff --git a/app/src/main/assets/home/bin/apkeditor_b b/app/src/main/assets/home/bin/apkeditor_b index bc132626..b9a85f29 100755 --- a/app/src/main/assets/home/bin/apkeditor_b +++ b/app/src/main/assets/home/bin/apkeditor_b @@ -92,15 +92,14 @@ if [ "$REDIVIS" == 1 ] && [ ! -f "$INPUT/.cache/redivision.log" ]; then redivision.py "$INPUT" > "$INPUT/.cache/redivision.log" fi +# xây dựng smali +if [ -f "$INPUT/dex/classes.dex" ] && [ -d "$INPUT/smali" ];then # Tạo dex for vcxs in $INPUT/smali/*; do if [ -d "$vcxs" ]; then [ -f "$INPUT/dex/${vcxs##*/}.dex" ] || touch "$INPUT/dex/${vcxs##*/}.dex" fi done - -# xây dựng smali -if [ -f "$INPUT/dex/classes.dex" ] && [ -d "$INPUT/smali" ];then API="$(dexupdater -g "$INPUT/dex/classes.dex" -printApi 2>/dev/null | awk '/API/ {print $2}')" for vkn in "$INPUT"/dex/classes*.dex; do [ -f "$vkn" ] || continue @@ -127,7 +126,6 @@ done [ -d "$INPUT/smali" ] && mv "$INPUT/smali" "$INPUT/smali_bak" fi - # xoá bak find "$INPUT" -type f -name "*.bak" -delete >/dev/null diff --git a/app/src/main/assets/home/bin/apktool_b b/app/src/main/assets/home/bin/apktool_b index a083341b..b03ccaea 100755 --- a/app/src/main/assets/home/bin/apktool_b +++ b/app/src/main/assets/home/bin/apktool_b @@ -94,6 +94,7 @@ if [ "$REDIVIS" == 1 ] && [ ! -f "$INPUT/.cache/redivision.log" ]; then redivision.py "$INPUT" > "$INPUT/.cache/redivision.log" fi +if [ -f "$INPUT/classes.dex" ] && [ -d "$INPUT/smali" ];then # Tạo dex for vcxs in $INPUT/smali_*; do if [ -d "$vcxs" ]; then @@ -101,8 +102,6 @@ ksbdhch="$(echo ${vcxs##*/} | sed 's|smali_||')" [ -f "$INPUT/$ksbdhch.dex" ] || touch "$INPUT/$ksbdhch.dex" fi done - -if [ -f "$INPUT/classes.dex" ] && [ -d "$INPUT/smali" ];then API=$(dexupdater -g "$INPUT/classes.dex" -printApi 2>/dev/null | awk '/API/ {print $2}') for vkn in "$INPUT"/classes*.dex; do [ -f "$vkn" ] || continue diff --git a/app/src/main/assets/home/etc/tool-tree.rc b/app/src/main/assets/home/etc/tool-tree.rc index d548aa51..1b0cf895 100755 --- a/app/src/main/assets/home/etc/tool-tree.rc +++ b/app/src/main/assets/home/etc/tool-tree.rc @@ -188,7 +188,7 @@ case "$menu_id" in hide) slog settadd 1 ;; xoa) slog settadd 2 ;; home) slog settadd 0 ;; - taive) echo "am:[start -a android.intent.action.VIEW -d https://zenlua.github.io/Tool-Tree/add-on/Addon.html]" ;; + taive) echo "am:[start -a android.intent.action.VIEW -d https://zenlua.github.io/Tool-Tree/website/Addon.html]" ;; file) installadd "$file" "$AON"; slog settadd 0 ;; esac @@ -304,7 +304,7 @@ case "$menu_id" in hide) slog settadd2 1 ;; xoa) slog settadd2 2 ;; home) slog settadd2 0 ;; - taive) echo "am:[start -a android.intent.action.VIEW -d https://zenlua.github.io/Tool-Tree/add-on/Apkon.html]" ;; + taive) echo "am:[start -a android.intent.action.VIEW -d https://zenlua.github.io/Tool-Tree/website/Apkon.html]" ;; file) installadd "$file" "$AOK"; slog settadd2 0 ;; esac diff --git a/app/src/main/assets/module/ZADD/patch_rom/addon.prop b/app/src/main/assets/module/ZADD/patch_rom/addon.prop index 6cebaf69..7b0377b5 100755 --- a/app/src/main/assets/module/ZADD/patch_rom/addon.prop +++ b/app/src/main/assets/module/ZADD/patch_rom/addon.prop @@ -50,6 +50,7 @@ label_fix_themes="Unlock Theme Store purchases" label_fix_appvault="Unlock PersonalAssistant purchases" label_fix_thoit="Enable AQI Weather CN" label_fix_joyose="Modify Joyose" +label_fix_gmscn="Mod Provision Gms" label_fix_mapcn="Hide CN Map in Gallery" cover_app_text_1="Convert data-app to app" cover_app_text_2="Transferring the APK file from the data-app folder to the app folder that requires APK file modification may break the signature." diff --git a/app/src/main/assets/module/ZADD/patch_rom/index.sh b/app/src/main/assets/module/ZADD/patch_rom/index.sh index 340e0dab..d77bfdc1 100755 --- a/app/src/main/assets/module/ZADD/patch_rom/index.sh +++ b/app/src/main/assets/module/ZADD/patch_rom/index.sh @@ -98,12 +98,13 @@ checktime - + + slog fix_manyo_patch_os "$FILE" '$pathsh' fixapps "$FILE" diff --git a/app/src/main/assets/module/ZADD/patch_rom/language.sh b/app/src/main/assets/module/ZADD/patch_rom/language.sh index 507896cf..e92b7cb0 100755 --- a/app/src/main/assets/module/ZADD/patch_rom/language.sh +++ b/app/src/main/assets/module/ZADD/patch_rom/language.sh @@ -39,6 +39,7 @@ label_fix_themes="Mở khóa mua hàng Chủ đề" label_fix_appvault="Mở khóa mua hàng App vault" label_fix_thoit="Mod hiện Aqi Weather CN" label_fix_joyose="Mod Joyose" +label_fix_gmscn="Mod Provision Gms" label_fix_mapcn="Mod ẩn Map CN Thư viện" cover_app_text_1="Chuyển đổi data-app sang app" cover_app_text_2="Việc chuyển đổi tệp apk ở trong data-app sang app cần can thiệp vào tệp apk có thể làm hỏng chữ ký" diff --git a/app/src/main/assets/module/ZADD/patch_rom/patch-rom.bash b/app/src/main/assets/module/ZADD/patch_rom/patch-rom.bash index 63696a73..f656639c 100755 --- a/app/src/main/assets/module/ZADD/patch_rom/patch-rom.bash +++ b/app/src/main/assets/module/ZADD/patch_rom/patch-rom.bash @@ -15,12 +15,20 @@ if [ "${vv##*/}" == "MIUIGallery.apk" ];then Thayvc 0 'method .*. checkMapAvailable()Z' $oi/smali/classes*/com/miui/gallery/map/utils/MapInitializerImpl.smali Thaythe 'Lcom/miui/gallery/util/BuildUtil;->isGlobal()Z' 'Lcom/xBuild;->isOne()Z' $oi/smali/classes*/com/miui/gallery/ui/featured/type/ItemTypeSortManager.smali fi +elif [ "${vv##*/}" == "Provision.apk" ];then + if [ "$fix_gmscn" == 1 ];then + patch_smali "$oi/smali/classes/miuix/os/xBuild.smali" + Thaycn '.method public static setGmsAppEnabledStateForCn(Landroid/content/Context;I)V' 'Lmiui/os/Build;->IS_INTERNATIONAL_BUILD:Z' 'Lcom/xBuild;->isTrue:Z' $oi/smali/classes*/com/android/provision/Utils.smali + sed -i '/setGmsAppEnabledStateForCn/,/.end method/ { /getApplicationEnabledSetting/,/if-eq/ s/if-eq/if-ne/ }' $oi/smali/classes*/com/android/provision/Utils.smali + fi elif [ "${vv##*/}" == "Joyose.apk" ];then if [ "$fix_joyose" == 1 ];then - patgpu="$(Timkiem GPUTUNER_SWITCH $oi/smali/classes)" - sed -i "`grep -nA2 GPUTUNER_SWITCH $patgpu | grep -m1 getString | cut -d- -f1`i\ const/4 v0, 0x1 \n return v0" $patgpu || about "Error: GPUTUNER_SWITCH" - sed -i "`grep -nA2 SUPPORT_UGD $patgpu | grep -m1 getString | cut -d- -f1`i\ const/4 v0, 0x1 \n return v0" $patgpu || about "Error: SUPPORT_UGD" - Thayvc -v 'method public run()V' $(Timkiem "job exist, sync local" $oi/smali) + patgpu="$(Timkiem GPUTUNER_SWITCH $oi/smali/classes)" + if [ "$patgpu" ]; then + toybox sed -i "`grep -nA2 GPUTUNER_SWITCH $patgpu | grep -m1 getString | cut -d- -f1`i\ const/4 v0, 0x1 \n return v0" $patgpu || about "Error: GPUTUNER_SWITCH" + toybox sed -i "`grep -nA2 SUPPORT_UGD $patgpu | grep -m1 getString | cut -d- -f1`i\ const/4 v0, 0x1 \n return v0" $patgpu || about "Error: SUPPORT_UGD" + #Thayvc -v '.method public run()V' $(Timkiem "job exist, sync local" $oi/smali) + fi fi elif [ "${vv##*/}" == "MIUIWeather.apk" ];then if [ "$fix_thoit" == 1 ];then @@ -215,7 +223,8 @@ if [ "${vv##*/}" == "miui-services.jar" ];then $oi/smali/classes*/com/android/server/am/ProcessManagerService.smali $oi/smali/classes*/com/android/server/am/BroadcastQueueModernStubImpl.smali" if [ "$fix_global" == 1 ];then - Thaythe 'Lmiui/os/Build;->IS_INTERNATIONAL_BUILD:Z' 'Lcom/xBuild;->isTrue:Z' "$oi/smali/classes/com/android/server/ForceDarkAppListManager.smali" + Thaythe 'Lmiui/os/Build;->IS_INTERNATIONAL_BUILD:Z' 'Lcom/xBuild;->isTrue:Z' "$oi/smali/classes/com/android/server/ForceDarkAppListManager.smali + $oi/smali/classes/com/android/server/clipboard/ClipboardServiceStubImpl.smali" fi elif [ "${vv##*/}" == "PowerKeeper.apk" ];then [ "$fix_noti" == 1 ] && Thaythe 'Lmiui/os/Build;->IS_INTERNATIONAL_BUILD:Z' 'Lcom/xBuild;->isTrue:Z' "$oi/smali/classes*/com/miui/powerkeeper/statemachine/PhoneSleepModeController\$SleepHandler.smali @@ -249,6 +258,7 @@ elif [ "${vv##*/}" == "MiuiSystemUI.apk" ];then $oi/smali/classes*/com/android/systemui/statusbar/notification/interruption/MiuiNotificationInterruptStateProviderImpl.smali" Thaythe 'Lmiui/os/Build;->IS_INTERNATIONAL_BUILD:Z' 'Lcom/xBuild;->isTrue:Z' "$oi/smali/classes*/com/miui/keyguard/biometrics/fod/MiuiGxzwQuickOpenUtil.smali $oi/smali/classes*/com/android/systemui/assist/PhoneStateMonitor.smali" + Thayvc 1 '.method .*. shouldSuppressFold()Z' $oi/smali/classes*/com/android/systemui/statusbar/notification/NotificationUtil.smali fi elif [ "${vv##*/}" == "Settings.apk" ];then if [ "$fix_global" == 1 ];then @@ -712,9 +722,13 @@ fi } Thaycn(){ +if [ "$4" ]; then urlsmali="$(find $4 -type f -print -quit 2>/dev/null)" vcv="$(echo "$1" | head -n1 | sed 's|/|\\/|g')" [ -f "$urlsmali" ] && sed -i "/$vcv/,/\.end method/ s|sget-boolean \(.*\), $2|sget-boolean \1, $3|" "$urlsmali" && echo "Patch: ${urlsmali##*/}" || about "Error: $urlsmali" +else +about "Warning: Path not found: $4" +fi } Thayme(){ @@ -727,8 +741,12 @@ done } Themme(){ +if [ "$2" ]; then urlsmali="$(find $2 -type f -print -quit 2>/dev/null)" [ -f "$urlsmali" ] && echo "$1" >> "$urlsmali" && echo "Patch: ${urlsmali##*/}" || about "Error: $urlsmali" +else +about "Warning: Path not found: $2" +fi } Thaythe(){ @@ -760,6 +778,7 @@ done } Thayivo(){ +if [ "$3" ]; then urlsmali="$(find $3 -type f -print -quit 2>/dev/null)" if [ "$1" == 1 ];then textvbs='invoke-static {}, Lcom/xBuild;->isOne()Z' @@ -767,6 +786,9 @@ else textvbs='invoke-static {}, Lcom/xBuild;->isZero()Z' fi [ -f "$urlsmali" ] && sed -i "s|${2//\[/\\[}|$textvbs|" "$urlsmali" && echo "Patch: ${urlsmali##*/}" || about "Error: $urlsmali" +else +about "Warning: Path not found: $3" +fi } # hiện tại diff --git a/app/src/main/assets/module/etc/apkeditor.jar b/app/src/main/assets/module/etc/apkeditor.jar index bb4ef33b..858a3b6f 100755 Binary files a/app/src/main/assets/module/etc/apkeditor.jar and b/app/src/main/assets/module/etc/apkeditor.jar differ diff --git a/app/src/main/assets/module/termux/py/redivision.py b/app/src/main/assets/module/termux/py/redivision.py index 1aef5fb8..3a1ced81 100755 --- a/app/src/main/assets/module/termux/py/redivision.py +++ b/app/src/main/assets/module/termux/py/redivision.py @@ -1,4 +1,4 @@ -#!/data/data/com.termux/files/usr/bin/python3 +#!/data/data/com.tool.tree/files/home/termux/bin/python import os import sys @@ -8,7 +8,7 @@ import json from concurrent.futures import ProcessPoolExecutor -DEFAULT_LIMIT = 45000 +DEFAULT_LIMIT = 50000 CLASS_DEF = re.compile(r'^\.class\b.*?\s+(L[^;\s]+;)') METHOD_DEF = re.compile(r'^\.method\b.*?\s+([^\s(]+)\(([^)]*)\)(\S+)') @@ -123,14 +123,14 @@ def parse_smali(path): if m: current_class = m.group(1) types.add(current_class) - strings.add(current_class) + # strings.add(current_class) continue m = FIELD_DEF.match(line) if m and current_class: name, ftype = m.groups() fields.add(f"{current_class}->{name}:{ftype}") - strings.add(name) + # strings.add(name) for t in extract_types(ftype): types.add(t) continue @@ -142,7 +142,7 @@ def parse_smali(path): methods.add(f"{current_class}->{name}{proto}") protos.add(proto) - strings.add(name) + # strings.add(name) for t in extract_types(params): types.add(t) diff --git a/website/Information.md b/website/Information.md index ff21f1af..5b9cbe91 100755 --- a/website/Information.md +++ b/website/Information.md @@ -6,9 +6,16 @@ + Source: [Github](https://github.com/Zenlua/Tool-Tree) ++ Techcombank Việt Nam: + + + 19034902604017 + + + Swift Code: VTCBVNVX + ++ Donate: [Paypal](https://www.paypal.com/paypalme/kakathic) + **Author** + [Kakathic](https://t.me/kakathic): develop the entire application **Thank you for visiting** -