|
@@ -11,6 +11,7 @@ import glob
|
|
|
import distutils.dir_util
|
|
import distutils.dir_util
|
|
|
import gw_file_system
|
|
import gw_file_system
|
|
|
import gw_data_center
|
|
import gw_data_center
|
|
|
|
|
+import gw_apk_tool
|
|
|
|
|
|
|
|
|
|
|
|
|
def script_init(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
|
|
def script_init(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
|
|
@@ -46,7 +47,6 @@ def script(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
|
|
|
if not os.path.exists(s3):
|
|
if not os.path.exists(s3):
|
|
|
distutils.dir_util.mkpath(s3)
|
|
distutils.dir_util.mkpath(s3)
|
|
|
move_package(s1, s3, list_package)
|
|
move_package(s1, s3, list_package)
|
|
|
-
|
|
|
|
|
logging.info("-----debug-----")
|
|
logging.info("-----debug-----")
|
|
|
|
|
|
|
|
|
|
|
|
@@ -60,23 +60,114 @@ def move_package(s1, s3, list_package):
|
|
|
|
|
|
|
|
|
|
|
|
|
def script_last(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
|
|
def script_last(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
|
|
|
- # logging.info('------------SDK:'+SDK)
|
|
|
|
|
- # logging.info('------------decompileDir:'+decompileDir)
|
|
|
|
|
- # logging.info('------------channelSdkInfo:'+str(channelSdkInfo))
|
|
|
|
|
- # logging.info('------------new_game_channel_info:'+str(new_game_channel_info))
|
|
|
|
|
- # logging.info('------------gameInfo:'+str(gameInfo))
|
|
|
|
|
- # logging.info("------rm baidu smali------")
|
|
|
|
|
- # restdir = decompileDir+"/"+"smali_classes2/com/baidu/gamesdk"
|
|
|
|
|
- # if os.path.exists(restdir):
|
|
|
|
|
- # shutil.rmtree(restdir)
|
|
|
|
|
-
|
|
|
|
|
- # s3 = decompileDir + "/smali_classes3"
|
|
|
|
|
-
|
|
|
|
|
logging.info('------------channelSdkInfo:' + str(channelSdkInfo))
|
|
logging.info('------------channelSdkInfo:' + str(channelSdkInfo))
|
|
|
if channelSdkInfo['id'] == '549' or channelSdkInfo['id'] == '413' or channelSdkInfo['SDKName'] == 'ludashi':
|
|
if channelSdkInfo['id'] == '549' or channelSdkInfo['id'] == '413' or channelSdkInfo['SDKName'] == 'ludashi':
|
|
|
del_hjr(decompileDir)
|
|
del_hjr(decompileDir)
|
|
|
add_do_not_compress(decompileDir)
|
|
add_do_not_compress(decompileDir)
|
|
|
|
|
|
|
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes5")
|
|
|
|
|
+ smali_classes2_dir = gw_apk_tool.create_mutil_smali(decompileDir)
|
|
|
|
|
+ s3 = smali_classes2_dir
|
|
|
|
|
+ list_package = ["com"]
|
|
|
|
|
+ if not os.path.exists(s3):
|
|
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
|
|
+ gw_apk_tool.move_package(s1, s3, list_package)
|
|
|
|
|
+ logging.info("script move smali_classe5")
|
|
|
|
|
+ logging.info(smali_classes2_dir)
|
|
|
|
|
+
|
|
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes6", "com")
|
|
|
|
|
+ smali_classes2_dir = gw_apk_tool.create_mutil_smali(decompileDir)
|
|
|
|
|
+ s3 = os.path.join(smali_classes2_dir, "com")
|
|
|
|
|
+ list_package = ["netease", "nineoldandroids", "noah", "nostra13", "orhanobut", "rxjava", "squareup", "ta",
|
|
|
|
|
+ "tencent", "webank", "weibo", "yulong"]
|
|
|
|
|
+ if not os.path.exists(s3):
|
|
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
|
|
+ gw_apk_tool.move_package(s1, s3, list_package)
|
|
|
|
|
+ logging.info("script move smali_classe6")
|
|
|
|
|
+ logging.info(list_package)
|
|
|
|
|
+ logging.info(smali_classes2_dir)
|
|
|
|
|
+
|
|
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes6", "com")
|
|
|
|
|
+ smali_classes2_dir = gw_apk_tool.create_mutil_smali(decompileDir)
|
|
|
|
|
+ s3 = os.path.join(smali_classes2_dir, "com")
|
|
|
|
|
+ list_package = ["huya", "huyaudb", "huyaudbunify", "hy"]
|
|
|
|
|
+ if not os.path.exists(s3):
|
|
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
|
|
+ gw_apk_tool.move_package(s1, s3, list_package)
|
|
|
|
|
+ logging.info("script move smali_classe6")
|
|
|
|
|
+ logging.info(list_package)
|
|
|
|
|
+ logging.info(smali_classes2_dir)
|
|
|
|
|
+
|
|
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes7", "com")
|
|
|
|
|
+ smali_classes2_dir = gw_apk_tool.create_mutil_smali(decompileDir)
|
|
|
|
|
+ s3 = os.path.join(smali_classes2_dir, "com")
|
|
|
|
|
+ list_package = ["alibaba", "douyu", "facebook", "huyaudb", "JavaWebsocket", "noah", "sina", "tencent", "aspsine",
|
|
|
|
|
+ "duowan", "geetest", "huyaudbunify", "mcxiaoke", "nostra13", "squareup", "ut", "bumptech", "dy",
|
|
|
|
|
+ "getkeepsafe", "ishumei", "netease", "random", "sun", "webank", "coolcloud", "example", "google",
|
|
|
|
|
+ "j256", "nineoldandroids", "samsung", "ta", "yulong"]
|
|
|
|
|
+ if not os.path.exists(s3):
|
|
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
|
|
+ gw_apk_tool.move_package(s1, s3, list_package)
|
|
|
|
|
+ logging.info("script move smali_classe7")
|
|
|
|
|
+ logging.info(list_package)
|
|
|
|
|
+ logging.info(smali_classes2_dir)
|
|
|
|
|
+
|
|
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes7", "com/huya")
|
|
|
|
|
+ smali_classes2_dir = gw_apk_tool.create_mutil_smali(decompileDir)
|
|
|
|
|
+ s3 = os.path.join(smali_classes2_dir, "com/huya")
|
|
|
|
|
+ list_package = ["android", "ciku", "data", "hyhttpdns", "hysignal", "live", "statistics", "berry", "component",
|
|
|
|
|
+ "force", "hyquic", "hyssl", "livestatistics"]
|
|
|
|
|
+ if not os.path.exists(s3):
|
|
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
|
|
+ gw_apk_tool.move_package(s1, s3, list_package)
|
|
|
|
|
+ logging.info("script move smali_classe7")
|
|
|
|
|
+ logging.info(list_package)
|
|
|
|
|
+ logging.info(smali_classes2_dir)
|
|
|
|
|
+
|
|
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes7", "com/huya")
|
|
|
|
|
+ smali_classes2_dir = gw_apk_tool.create_mutil_smali(decompileDir)
|
|
|
|
|
+ s3 = os.path.join(smali_classes2_dir, "com/huya")
|
|
|
|
|
+ list_package = ["mtp"]
|
|
|
|
|
+ if not os.path.exists(s3):
|
|
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
|
|
+ gw_apk_tool.move_package(s1, s3, list_package)
|
|
|
|
|
+ logging.info("script move smali_classe7")
|
|
|
|
|
+ logging.info(list_package)
|
|
|
|
|
+ logging.info(smali_classes2_dir)
|
|
|
|
|
+
|
|
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes8", "com/netease")
|
|
|
|
|
+ smali_classes2_dir = gw_apk_tool.create_mutil_smali(decompileDir)
|
|
|
|
|
+ s3 = os.path.join(smali_classes2_dir, "com/netease")
|
|
|
|
|
+ list_package = ["ntunisdk"]
|
|
|
|
|
+ if not os.path.exists(s3):
|
|
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
|
|
+ gw_apk_tool.move_package(s1, s3, list_package)
|
|
|
|
|
+ logging.info("script move smali_classe8")
|
|
|
|
|
+ logging.info(list_package)
|
|
|
|
|
+ logging.info(smali_classes2_dir)
|
|
|
|
|
+
|
|
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes6", "com")
|
|
|
|
|
+ smali_classes2_dir = gw_apk_tool.create_mutil_smali(decompileDir)
|
|
|
|
|
+ s3 = os.path.join(smali_classes2_dir, "com")
|
|
|
|
|
+ list_package = ["douyu", "duowan", "example", "huya"]
|
|
|
|
|
+ if not os.path.exists(s3):
|
|
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
|
|
+ gw_apk_tool.move_package(s1, s3, list_package)
|
|
|
|
|
+ logging.info("script move smali_classe6")
|
|
|
|
|
+ logging.info(list_package)
|
|
|
|
|
+ logging.info(smali_classes2_dir)
|
|
|
|
|
+
|
|
|
|
|
+ s1 = os.path.join(decompileDir, "smali_classes10", "com/huya/berry")
|
|
|
|
|
+ smali_classes2_dir = gw_apk_tool.create_mutil_smali(decompileDir)
|
|
|
|
|
+ s3 = os.path.join(smali_classes2_dir, "com/huya/berry")
|
|
|
|
|
+ list_package = ["client", "endlive", "forcelive", "gamesdk", "login", "modifynickname", "modifytitle"]
|
|
|
|
|
+ if not os.path.exists(s3):
|
|
|
|
|
+ distutils.dir_util.mkpath(s3)
|
|
|
|
|
+ gw_apk_tool.move_package(s1, s3, list_package)
|
|
|
|
|
+ logging.info("script move smali_classe10")
|
|
|
|
|
+ logging.info(list_package)
|
|
|
|
|
+ logging.info(smali_classes2_dir)
|
|
|
|
|
+
|
|
|
|
|
|
|
|
def add_do_not_compress(extract_dir):
|
|
def add_do_not_compress(extract_dir):
|
|
|
goal_file = os.path.join(extract_dir, 'apktool.yml')
|
|
goal_file = os.path.join(extract_dir, 'apktool.yml')
|