|
|
@@ -28,8 +28,11 @@ def script_pre(workspace_sdk_dir, extract_dir, channel_sdk_info, new_game_channe
|
|
|
def script_last(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
|
|
|
logging.info('------------channelSdkInfo:' + str(channelSdkInfo))
|
|
|
|
|
|
+ # if channelSdkInfo['id'] == "597":
|
|
|
+ remove_false_string(decompileDir+"/res/values/ids.xml")
|
|
|
+
|
|
|
s1 = os.path.join(decompileDir, "smali_classes3/androidx")
|
|
|
- if channelSdkInfo['id']=="597" and os.path.exists(s1):
|
|
|
+ if channelSdkInfo['id'] == "597" and os.path.exists(s1):
|
|
|
smali_classes2_dir = create_mutil_smali(decompileDir)
|
|
|
s3 = os.path.join(smali_classes2_dir, "androidx")
|
|
|
list_package = ["preference", "print", "recyclerview", "room", "savedstate", "slidingpanelayout", "sqlite",
|
|
|
@@ -49,15 +52,17 @@ def script_last(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameIn
|
|
|
distutils.dir_util.mkpath(s3)
|
|
|
move_package(s1, s3, list_package)
|
|
|
|
|
|
- if channelSdkInfo['id']=="549" or channelSdkInfo['id']=="591":
|
|
|
+ if channelSdkInfo['id'] == "549" or channelSdkInfo['id'] == "591":
|
|
|
s1 = os.path.join(decompileDir, "smali_classes5/androidx")
|
|
|
smali_classes2_dir = create_mutil_smali(decompileDir)
|
|
|
s3 = os.path.join(smali_classes2_dir, "androidx")
|
|
|
- list_package = ["documentfile","drawerlayout","fragment","interpolator","legacy","lifecycle","loader","localbroadcastmanager","multidex"]
|
|
|
+ list_package = ["documentfile", "drawerlayout", "fragment", "interpolator", "legacy", "lifecycle", "loader",
|
|
|
+ "localbroadcastmanager", "multidex"]
|
|
|
if not os.path.exists(s3):
|
|
|
distutils.dir_util.mkpath(s3)
|
|
|
move_package(s1, s3, list_package)
|
|
|
|
|
|
+
|
|
|
def move_package(s1, s3, list_package):
|
|
|
for d in list_package:
|
|
|
src = os.path.join(s1, d)
|
|
|
@@ -134,6 +139,19 @@ def remove_navigate(decompileDir):
|
|
|
os.remove(tmp_public_xml)
|
|
|
|
|
|
|
|
|
+def remove_false_string(file_path):
|
|
|
+ # 打开文本文件并读取内容
|
|
|
+ with open(file_path, 'r') as file:
|
|
|
+ lines = file.readlines()
|
|
|
+
|
|
|
+ # 删除每一行中的指定字符串
|
|
|
+ filtered_lines = [line.replace('false', '') for line in lines]
|
|
|
+
|
|
|
+ # 打开文本文件以写入模式,将修改后的内容写回原文件
|
|
|
+ with open(file_path, 'w') as file:
|
|
|
+ file.writelines(filtered_lines)
|
|
|
+
|
|
|
+
|
|
|
if __name__ == '__main__':
|
|
|
script_last("/tmp/ss", "G:/autopack2.0_kuaifa/tool/workspace/wdajl/15957/extract/", {"id": "309"}, "", "")
|
|
|
# xml_path = "E:/apk/youhua/jingmenfengyue_216122/res/values/public.xml"
|