Skip to content

Commit a73f2e1

Browse files
committed
Update
1 parent 7beccf6 commit a73f2e1

7 files changed

Lines changed: 19 additions & 12 deletions

File tree

app/src/main/assets/home/bin/apkeditor_b

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,14 @@ if [ "$REDIVIS" == 1 ] && [ ! -f "$INPUT/.cache/redivision.log" ]; then
9292
redivision.py "$INPUT" > "$INPUT/.cache/redivision.log"
9393
fi
9494

95+
# xây dựng smali
96+
if [ -f "$INPUT/dex/classes.dex" ] && [ -d "$INPUT/smali" ];then
9597
# Tạo dex
9698
for vcxs in $INPUT/smali/*; do
9799
if [ -d "$vcxs" ]; then
98100
[ -f "$INPUT/dex/${vcxs##*/}.dex" ] || touch "$INPUT/dex/${vcxs##*/}.dex"
99101
fi
100102
done
101-
102-
# xây dựng smali
103-
if [ -f "$INPUT/dex/classes.dex" ] && [ -d "$INPUT/smali" ];then
104103
API="$(dexupdater -g "$INPUT/dex/classes.dex" -printApi 2>/dev/null | awk '/API/ {print $2}')"
105104
for vkn in "$INPUT"/dex/classes*.dex; do
106105
[ -f "$vkn" ] || continue
@@ -127,7 +126,6 @@ done
127126
[ -d "$INPUT/smali" ] && mv "$INPUT/smali" "$INPUT/smali_bak"
128127
fi
129128

130-
131129
# xoá bak
132130
find "$INPUT" -type f -name "*.bak" -delete >/dev/null
133131

app/src/main/assets/home/bin/apktool_b

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,14 @@ if [ "$REDIVIS" == 1 ] && [ ! -f "$INPUT/.cache/redivision.log" ]; then
9494
redivision.py "$INPUT" > "$INPUT/.cache/redivision.log"
9595
fi
9696

97+
if [ -f "$INPUT/classes.dex" ] && [ -d "$INPUT/smali" ];then
9798
# Tạo dex
9899
for vcxs in $INPUT/smali_*; do
99100
if [ -d "$vcxs" ]; then
100101
ksbdhch="$(echo ${vcxs##*/} | sed 's|smali_||')"
101102
[ -f "$INPUT/$ksbdhch.dex" ] || touch "$INPUT/$ksbdhch.dex"
102103
fi
103104
done
104-
105-
if [ -f "$INPUT/classes.dex" ] && [ -d "$INPUT/smali" ];then
106105
API=$(dexupdater -g "$INPUT/classes.dex" -printApi 2>/dev/null | awk '/API/ {print $2}')
107106
for vkn in "$INPUT"/classes*.dex; do
108107
[ -f "$vkn" ] || continue

app/src/main/assets/module/ZADD/patch_rom/addon.prop

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ label_fix_themes="Unlock Theme Store purchases"
5050
label_fix_appvault="Unlock PersonalAssistant purchases"
5151
label_fix_thoit="Enable AQI Weather CN"
5252
label_fix_joyose="Modify Joyose"
53+
label_fix_gmscn="Mod Provision Gms"
5354
label_fix_mapcn="Hide CN Map in Gallery"
5455
cover_app_text_1="Convert data-app to app"
5556
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."

app/src/main/assets/module/ZADD/patch_rom/index.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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>
108109
slog fix_manyo_patch_os "$FILE"
109110
'$pathsh' fixapps "$FILE"

app/src/main/assets/module/ZADD/patch_rom/language.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ label_fix_themes="Mở khóa mua hàng Chủ đề"
3939
label_fix_appvault="Mở khóa mua hàng App vault"
4040
label_fix_thoit="Mod hiện Aqi Weather CN"
4141
label_fix_joyose="Mod Joyose"
42+
label_fix_gmscn="Mod Provision Gms"
4243
label_fix_mapcn="Mod ẩn Map CN Thư viện"
4344
cover_app_text_1="Chuyển đổi data-app sang app"
4445
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ý"

app/src/main/assets/module/ZADD/patch_rom/patch-rom.bash

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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
1824
elif [ "${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
253260
elif [ "${vv##*/}" == "Settings.apk" ];then
254261
if [ "$fix_global" == 1 ];then

app/src/main/assets/module/termux/py/redivision.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/data/data/com.termux/files/usr/bin/python3
1+
#!/data/data/com.tool.tree/files/home/termux/bin/python
22

33
import os
44
import sys
@@ -8,7 +8,7 @@
88
import json
99
from concurrent.futures import ProcessPoolExecutor
1010

11-
DEFAULT_LIMIT = 45000
11+
DEFAULT_LIMIT = 50000
1212

1313
CLASS_DEF = re.compile(r'^\.class\b.*?\s+(L[^;\s]+;)')
1414
METHOD_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)

0 commit comments

Comments
 (0)