|
|
@@ -14,6 +14,13 @@ import gw_apk_tool
|
|
|
import gw_file_system
|
|
|
|
|
|
|
|
|
+def script_second(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
|
|
|
+ logging.info('------------channelSdkInfo:' + str(channelSdkInfo))
|
|
|
+ if channelSdkInfo['id'] == '597':
|
|
|
+ logging.info("remove_navigate")
|
|
|
+ remove_navigate(decompileDir)
|
|
|
+
|
|
|
+
|
|
|
def script(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
|
|
|
logging.info('------------channelSdkInfo:' + str(channelSdkInfo))
|
|
|
if channelSdkInfo['id'] == '597':
|
|
|
@@ -23,7 +30,17 @@ def script(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
|
|
|
|
|
|
def script_last(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
|
|
|
logging.info('------------channelSdkInfo:' + str(channelSdkInfo))
|
|
|
- if channelSdkInfo['id'] == "549":
|
|
|
+ if channelSdkInfo['id'] == "549" or channelSdkInfo['id'] == "597":
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes11/com/bytedance")
|
|
|
+ smali_classes_new = create_mutil_smali(decompileDir)
|
|
|
+ s3 = os.path.join(decompileDir, smali_classes_new)
|
|
|
+ list_package = ["module"]
|
|
|
+ if not os.path.exists(s3):
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
+ move_package(s1, s3, list_package)
|
|
|
+
|
|
|
+ move_11_bytedance(decompileDir)
|
|
|
+
|
|
|
s1 = os.path.join(decompileDir, "smali_classes11/com")
|
|
|
smali_classes_new = create_mutil_smali(decompileDir)
|
|
|
s3 = os.path.join(decompileDir, smali_classes_new)
|
|
|
@@ -32,10 +49,27 @@ def script_last(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameIn
|
|
|
distutils.dir_util.mkpath(s3)
|
|
|
move_package(s1, s3, list_package)
|
|
|
|
|
|
+
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes11/com/huawei")
|
|
|
+ smali_classes_new = create_mutil_smali(decompileDir)
|
|
|
+ s3 = os.path.join(decompileDir, smali_classes_new)
|
|
|
+ list_package = ["hms"]
|
|
|
+ if not os.path.exists(s3):
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
+ move_package(s1, s3, list_package)
|
|
|
+
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes11/com")
|
|
|
+ smali_classes_new = create_mutil_smali(decompileDir)
|
|
|
+ s3 = os.path.join(decompileDir, smali_classes_new)
|
|
|
+ list_package = ["huawei","hermes","google"]
|
|
|
+ if not os.path.exists(s3):
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
+ move_package(s1, s3, list_package)
|
|
|
+
|
|
|
s1 = os.path.join(decompileDir, "smali_classes17/com/bytedance/ttgame/module")
|
|
|
smali_classes_new = create_mutil_smali(decompileDir)
|
|
|
s3 = os.path.join(decompileDir, smali_classes_new)
|
|
|
- list_package = ["usercenter","voice","vtranslate","webview"]
|
|
|
+ list_package = ["usercenter", "voice", "vtranslate", "webview"]
|
|
|
if not os.path.exists(s3):
|
|
|
distutils.dir_util.mkpath(s3)
|
|
|
move_package(s1, s3, list_package)
|
|
|
@@ -48,6 +82,7 @@ def script_last(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameIn
|
|
|
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)
|
|
|
@@ -56,6 +91,39 @@ def move_package(s1, s3, list_package):
|
|
|
distutils.dir_util.copy_tree(src, dst)
|
|
|
distutils.dir_util.remove_tree(src)
|
|
|
|
|
|
+def move_11_bytedance(decompileDir):
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes11/com/bytedance")
|
|
|
+ smali_classes_new = create_mutil_smali(decompileDir)
|
|
|
+ s3 = os.path.join(decompileDir, smali_classes_new)
|
|
|
+ list_package = ["rocketapi","wrapper_account","wrapper_alog","wrapper_appcloud","wrapper_applog"]
|
|
|
+ if not os.path.exists(s3):
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
+ move_package(s1, s3, list_package)
|
|
|
+
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes11/com/bytedance")
|
|
|
+ smali_classes_new = create_mutil_smali(decompileDir)
|
|
|
+ s3 = os.path.join(decompileDir, smali_classes_new)
|
|
|
+ list_package = ["wrapper_download","wrapper_encrypt","wrapper_jsbridge","wrapper_librarian","wrapper_net"]
|
|
|
+ if not os.path.exists(s3):
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
+ move_package(s1, s3, list_package)
|
|
|
+
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes11/com/bytedance")
|
|
|
+ smali_classes_new = create_mutil_smali(decompileDir)
|
|
|
+ s3 = os.path.join(decompileDir, smali_classes_new)
|
|
|
+ list_package = ["wrapper_pangolinsdk","wrapper_push","wrapper_sdk_monitor","wrapper_service_manager","wrapper_setting_manager"]
|
|
|
+ if not os.path.exists(s3):
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
+ move_package(s1, s3, list_package)
|
|
|
+
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes11/com/bytedance")
|
|
|
+ smali_classes_new = create_mutil_smali(decompileDir)
|
|
|
+ s3 = os.path.join(decompileDir, smali_classes_new)
|
|
|
+ list_package = ["wrapper_share","wrapper_smartrouter","wrapper_utility"]
|
|
|
+ if not os.path.exists(s3):
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
+ move_package(s1, s3, list_package)
|
|
|
+
|
|
|
|
|
|
def create_mutil_smali(decompileDir):
|
|
|
f_idx = 2
|