File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,15 +92,14 @@ if [ "$REDIVIS" == 1 ] && [ ! -f "$INPUT/.cache/redivision.log" ]; then
9292redivision.py " $INPUT " > " $INPUT /.cache/redivision.log"
9393fi
9494
95+ # xây dựng smali
96+ if [ -f " $INPUT /dex/classes.dex" ] && [ -d " $INPUT /smali" ]; then
9597# Tạo dex
9698for vcxs in $INPUT /smali/* ; do
9799if [ -d " $vcxs " ]; then
98100[ -f " $INPUT /dex/${vcxs##*/ } .dex" ] || touch " $INPUT /dex/${vcxs##*/ } .dex"
99101fi
100102done
101-
102- # xây dựng smali
103- if [ -f " $INPUT /dex/classes.dex" ] && [ -d " $INPUT /smali" ]; then
104103API=" $( dexupdater -g " $INPUT /dex/classes.dex" -printApi 2> /dev/null | awk ' /API/ {print $2}' ) "
105104for vkn in " $INPUT " /dex/classes* .dex; do
106105 [ -f " $vkn " ] || continue
127126[ -d " $INPUT /smali" ] && mv " $INPUT /smali" " $INPUT /smali_bak"
128127fi
129128
130-
131129# xoá bak
132130find " $INPUT " -type f -name " *.bak" -delete > /dev/null
133131
Original file line number Diff line number Diff line change @@ -94,15 +94,14 @@ if [ "$REDIVIS" == 1 ] && [ ! -f "$INPUT/.cache/redivision.log" ]; then
9494redivision.py " $INPUT " > " $INPUT /.cache/redivision.log"
9595fi
9696
97+ if [ -f " $INPUT /classes.dex" ] && [ -d " $INPUT /smali" ]; then
9798# Tạo dex
9899for vcxs in $INPUT /smali_* ; do
99100if [ -d " $vcxs " ]; then
100101ksbdhch=" $( echo ${vcxs##*/ } | sed ' s|smali_||' ) "
101102[ -f " $INPUT /$ksbdhch .dex" ] || touch " $INPUT /$ksbdhch .dex"
102103fi
103104done
104-
105- if [ -f " $INPUT /classes.dex" ] && [ -d " $INPUT /smali" ]; then
106105API=$( dexupdater -g " $INPUT /classes.dex" -printApi 2> /dev/null | awk ' /API/ {print $2}' )
107106for vkn in " $INPUT " /classes* .dex; do
108107 [ -f " $vkn " ] || continue
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ label_fix_themes="Unlock Theme Store purchases"
5050label_fix_appvault="Unlock PersonalAssistant purchases"
5151label_fix_thoit="Enable AQI Weather CN"
5252label_fix_joyose="Modify Joyose"
53+ label_fix_gmscn="Mod Provision Gms"
5354label_fix_mapcn="Hide CN Map in Gallery"
5455cover_app_text_1="Convert data-app to app"
5556cover_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."
Original file line number Diff line number Diff line change @@ -98,12 +98,13 @@ checktime
9898</action>
9999
100100<action title="' $title_app_patch ' " summary="Xiaomi">
101- <param name="FILE" option-sh="' $pathsh ' search *PersonalAssistant*.apk MIUIWeather.apk Joyose.apk MIUIGallery.apk *ThemeManager.apk" value-sh="glog fix_manyo_patch_os" multiple="true" desc="' $string_text_1 ' : ' $PTSH ' /***, /sdcard/TREE/APK" required="true"/>
101+ <param name="FILE" option-sh="' $pathsh ' search *PersonalAssistant*.apk MIUIWeather.apk Joyose.apk Provision.apk MIUIGallery.apk *ThemeManager.apk" value-sh="glog fix_manyo_patch_os" multiple="true" desc="' $string_text_1 ' : ' $PTSH ' /***, /sdcard/TREE/APK" required="true"/>
102102<param name="fix_themes" label="' $label_fix_themes ' " desc="' $required_files_text ' : ThemeManager.apk" type="bool" />
103103<param name="fix_appvault" label="' $label_fix_appvault ' " desc="' $required_files_text ' : PersonalAssistant.apk" type="bool" />
104104<param name="fix_thoit" label="' $label_fix_thoit ' " desc="' $required_files_text ' : MIUIWeather.apk" type="bool" />
105105<param name="fix_joyose" label="' $label_fix_joyose ' " desc="' $required_files_text ' : Joyose.apk" type="bool" />
106106<param name="fix_mapcn" label="' $label_fix_mapcn ' " desc="' $required_files_text ' : MIUIGallery.apk" type="bool" />
107+ <param name="fix_gmscn" label="' $label_fix_gmscn ' " desc="' $required_files_text ' : Provision.apk" type="bool" />
107108<set>
108109slog fix_manyo_patch_os "$FILE"
109110' $pathsh ' fixapps "$FILE"
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ label_fix_themes="Mở khóa mua hàng Chủ đề"
3939label_fix_appvault=" Mở khóa mua hàng App vault"
4040label_fix_thoit=" Mod hiện Aqi Weather CN"
4141label_fix_joyose=" Mod Joyose"
42+ label_fix_gmscn=" Mod Provision Gms"
4243label_fix_mapcn=" Mod ẩn Map CN Thư viện"
4344cover_app_text_1=" Chuyển đổi data-app sang app"
4445cover_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ý"
Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ if [ "${vv##*/}" == "MIUIGallery.apk" ];then
1515 Thayvc 0 ' method .*. checkMapAvailable()Z' $oi /smali/classes* /com/miui/gallery/map/utils/MapInitializerImpl.smali
1616 Thaythe ' Lcom/miui/gallery/util/BuildUtil;->isGlobal()Z' ' Lcom/xBuild;->isOne()Z' $oi /smali/classes* /com/miui/gallery/ui/featured/type/ItemTypeSortManager.smali
1717 fi
18+ elif [ " ${vv##*/ } " == " Provision.apk" ]; then
19+ if [ " $fix_gmscn " == 1 ]; then
20+ patch_smali " $oi /smali/classes/miuix/os/xBuild.smali"
21+ 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
22+ sed -i ' /setGmsAppEnabledStateForCn/,/.end method/ { /getApplicationEnabledSetting/,/if-eq/ s/if-eq/if-ne/ }' $oi /smali/classes* /com/android/provision/Utils.smali
23+ fi
1824elif [ " ${vv##*/ } " == " Joyose.apk" ]; then
1925 if [ " $fix_joyose " == 1 ]; then
2026 patgpu=" $( Timkiem GPUTUNER_SWITCH $oi /smali/classes) "
@@ -249,6 +255,7 @@ elif [ "${vv##*/}" == "MiuiSystemUI.apk" ];then
249255 $oi /smali/classes*/com/android/systemui/statusbar/notification/interruption/MiuiNotificationInterruptStateProviderImpl.smali"
250256 Thaythe ' Lmiui/os/Build;->IS_INTERNATIONAL_BUILD:Z' ' Lcom/xBuild;->isTrue:Z' " $oi /smali/classes*/com/miui/keyguard/biometrics/fod/MiuiGxzwQuickOpenUtil.smali
251257 $oi /smali/classes*/com/android/systemui/assist/PhoneStateMonitor.smali"
258+ Thayvc 1 ' .method .*. shouldSuppressFold()Z' $oi /smali/classes* /com/android/systemui/statusbar/notification/NotificationUtil.smali
252259 fi
253260elif [ " ${vv##*/ } " == " Settings.apk" ]; then
254261 if [ " $fix_global " == 1 ]; then
Original file line number Diff line number Diff line change 1- #!/data/data/com.termux /files/usr/ bin/python3
1+ #!/data/data/com.tool.tree /files/home/termux/ bin/python
22
33import os
44import sys
88import json
99from concurrent .futures import ProcessPoolExecutor
1010
11- DEFAULT_LIMIT = 45000
11+ DEFAULT_LIMIT = 50000
1212
1313CLASS_DEF = re .compile (r'^\.class\b.*?\s+(L[^;\s]+;)' )
1414METHOD_DEF = re .compile (r'^\.method\b.*?\s+([^\s(]+)\(([^)]*)\)(\S+)' )
@@ -123,14 +123,14 @@ def parse_smali(path):
123123 if m :
124124 current_class = m .group (1 )
125125 types .add (current_class )
126- strings .add (current_class )
126+ # strings.add(current_class)
127127 continue
128128
129129 m = FIELD_DEF .match (line )
130130 if m and current_class :
131131 name , ftype = m .groups ()
132132 fields .add (f"{ current_class } ->{ name } :{ ftype } " )
133- strings .add (name )
133+ # strings.add(name)
134134 for t in extract_types (ftype ):
135135 types .add (t )
136136 continue
@@ -142,7 +142,7 @@ def parse_smali(path):
142142
143143 methods .add (f"{ current_class } ->{ name } { proto } " )
144144 protos .add (proto )
145- strings .add (name )
145+ # strings.add(name)
146146
147147 for t in extract_types (params ):
148148 types .add (t )
You can’t perform that action at this time.
0 commit comments