| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655 |
- # coding:utf8
- __author__ = 'dong'
- import os
- import logging
- import xml.dom.minidom
- import re
- import shutil
- import glob
- import distutils.dir_util
- import os
- import gw_apk_tool
- import gw_data_center
- def script(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
- # if channelSdkInfo['id'] == '597':
- # gw_data_center.pack_small = True
- return
- def script_second(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
- return
- def script(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
- # logging.info('------------channelSdkInfo:' + str(channelSdkInfo))
- # if channelSdkInfo['id'] == '597':
- # logging.info("remove_navigate")
- # remove_navigate(decompileDir)
- return
- def script_last(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
- logging.info('------------channelSdkInfo:' + str(channelSdkInfo))
- if channelSdkInfo['id'] == '597':
- return
- else:
- move_224_bytedance(decompileDir)
- def move(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes10/com")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com")
- list_package = ["facebook"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes11/com")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com")
- list_package = ["facebook", "feiyu", "google", "hermes"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes11/com")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com")
- list_package = ["sedna", "service", "sina"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes11/com")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com")
- list_package = ["heytap", "huawei", "hw", "ixigua", "just", "loc", "luck"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes11/com")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com")
- list_package = ["squareup", "ss", "swmansion"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes12/androidx")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "androidx")
- list_package = ["activity", "annotation", "appcompat", "arch", "asynclayoutinflater", "cardview", "collection",
- "concurrent", "constraintlayout", "coordinatorlayout"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes12/androidx")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "androidx")
- list_package = ["print", "room", "sqlite", "tracing", "versionedparcelable", "viewpager2", "recyclerview",
- "savedstate", "startup", "transition", "viewbinding", "window", "resourceinspection",
- "slidingpanelayout", "swiperefreshlayout", "vectordrawable", "viewpager"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes12/androidx")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "androidx")
- list_package = ["core", "customview", "drawerlayout", "emoji2", "fragment", "legacy", "loader", "media",
- "navigation", "cursoradapter", "documentfile", "dynamicanimation", "exifinterface", "interpolator",
- "lifecycle", "localbroadcastmanager", "multidex"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes2", "com")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com")
- list_package = ["swmansion", "sxd3", "taptap", "tds", "tencent", "ttnet", "unicom", "unity3d", "uodis", "vivo",
- "volcengine", "vv", "weibo", "xiaomi", "xm", "yqritc"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def remove_navigate(decompileDir):
- tmp_res = os.path.join(decompileDir, "res", "navigation")
- tmp_public_xml = os.path.join(decompileDir, "res", "values", "public.xml")
- if os.path.exists(tmp_res):
- distutils.dir_util.remove_tree(tmp_res)
- if os.path.exists(tmp_public_xml):
- os.remove(tmp_public_xml)
- def move_10_bytedance(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes10/com/bytedance")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance")
- list_package = ["ttgame"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes10/com/bytedance")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance")
- list_package = ["ttnet"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes10/com/bytedance")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance")
- list_package = ["ug"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes10/com/bytedance")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance")
- list_package = ["unbridge"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes10/com/bytedance")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance")
- list_package = ["usergrowth"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes10/com/bytedance")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance")
- list_package = ["watson"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes19/com")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com")
- list_package = ["ixigua", "just", "loc", "luck"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_11_bytedance(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes10/com/bytedance")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance")
- list_package = ["rocketapi", "wrapper_account", "wrapper_alog", "wrapper_appcloud", "wrapper_applog"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes10/com/bytedance")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance")
- list_package = ["wrapper_download", "wrapper_encrypt", "wrapper_jsbridge", "wrapper_librarian", "wrapper_net"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes10/com/bytedance")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance")
- 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)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes10/com/bytedance")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance")
- list_package = ["wrapper_share", "wrapper_smartrouter", "wrapper_utility"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_4_bytedance(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes4/com/bytedance")
- list_b = ["android", "apm6", "article", "bdinstall", "boost_multidex", "cloudplay", "crash", "ttgame",
- "apkidentity", "apmsdk", "bdauditsdk", "bdlocation", "boringssl", "common", "crashthanos", "apm",
- "applog", "bdauditsdkbase", "bdturing", "channelmigrator", "constants2", "frameworks"]
- for a in list_b:
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance")
- list_package = [a]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_5_bytedance(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes5/com/bytedance")
- list_b = ["frameworks", "gamerecord", "lynx", "perf", "reader_apk", "shadowhook", "thanos", "framwork", "geckox",
- "mira", "permissions", "remote", "share_channel_douyin", "tpssdk", "frankie", "grecorder", "monitor",
- "pipeline", "retrofit2", "share_channel_weibo", "tracing", "frankie_sohotfix_util", "gumiho", "mpaas",
- "platform", "robust", "share_image_token", "ttgame", "frankie_sohotfix_util_emulator", "hidden_watermark",
- "msgsdk", "praisedialoglib", "router", "share_qq", "fresco", "ies", "news", "push", "sdk", "share_ui",
- "game", "keva", "notification", "react", "security", "share_wechat", "gameprotect", "librarian", "pangle",
- "reactnative", "services", "sync"]
- for a in list_b:
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance")
- list_package = [a]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_6_bytedance(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes6/com/bytedance/ttgame")
- list_b = ["account", "base", "core", "framework", "glog", "gsdk_base_common_ui", "gsdk_base_utils", "library",
- "module", "audio", "channel", "engine", "gecko", "gsdk", "gsdk_base_sdk_config", "gsdksync", "main"]
- for a in list_b:
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame")
- list_package = [a]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_60_ss(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes60/com/ss/android")
- list_b = ["account", "applog", "bytedcert", "deviceregister", "downloadad", "downloadlib", "newmedia",
- "push_3rd_module", "pushmanager", "token", "ug", "agilelogger", "article", "common", "download",
- "downloadapi", "message", "push", "push_common_lib", "socialbase", "ttmd5", "ugc"]
- for a in list_b:
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/ss/android")
- list_package = [a]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_64_bytedance(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes64/com/bytedance/ttgame")
- list_b = ["rocket", "rocketapi", "sdk", "tps", "unity"]
- for a in list_b:
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame")
- list_package = [a]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_7_bytedance(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes7/com/bytedance/ttgame/module")
- list_b = ["compliance", "crash", "deeplink", "download", "fileupload", "gameinfo", "gameprotect", "compress",
- "database", "demo", "dynamic", "friendchain", "gamelivesdk"]
- for a in list_b:
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/module")
- list_package = [a]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_8_bytedance(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes8/com/bytedance/ttgame/module")
- list_b = ["location", "log", "mediaupload", "netdiagnose", "pay", "push", "rn", "rnengine", "screenrecord",
- "loccom", "main", "monitor", "notice", "privacy", "rating", "rncore"]
- for a in list_b:
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/module")
- list_package = [a]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_9_bytedance(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes9/com/bytedance/ttgame/module")
- list_b = ["screenrecord", "share", "thanos", "unitelive"]
- for a in list_b:
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/module")
- list_package = [a]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_37_bytedance(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes37/com/bytedance/apm6")
- list_b = ["foundation", "hub", "memory", "monitor", "perf", "service", "util"]
- # for a in list_b:
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/apm6")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_49_bytedance(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes49/com/bytedance/common")
- list_b = ["perf_block", "process", "profilesdk", "push", "support", "util", "utility", "wschannel"]
- # for a in list_b:
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/common")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_103_bytedance(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes103/com/bytedance/sdk")
- list_b = ["bridge", "account", "open", "openadsdk"]
- for a in list_b:
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/sdk")
- list_package = [a]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_125_bytedance(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes125/com/bytedance/ttgame/module")
- list_b = ["abtest", "account", "apimonitor", "asr", "boost", "bridge", "cdkey", "cloud", "cloudgame", "common",
- "compliance", "gpm", "location"]
- for a in list_b:
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/module")
- list_package = [a]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_158_bytedance(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes158/com/bytedance/ttgame/sdk/module")
- list_b = ["entity", "location", "pojo", "skin", "ui", "utils"]
- # for a in list_b:
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/sdk/module")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes158/com/bytedance/ttgame/sdk/module")
- list_b = ["account", "bridge"]
- # for a in list_b:
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/sdk/module")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes161/com/bytedance/ttgame/module/compliance")
- list_b = ["bridge"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/module/compliance")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes190/com/bytedance/ttgame/module/screenrecord")
- list_b = ["bridge", "download", "impl", "interceptor", "lib", "log", "net"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/module/screenrecord")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes191/com/bytedance/ttgame/module/share")
- list_b = ["bridge", "api", "impl"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/module/share")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes197/com/bytedance/sdk/account")
- list_b = ["api", "bpea", "constants", "extra"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/sdk/account")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes197/com/bytedance/sdk/account")
- list_b = ["impl", "information", "mobile", "network"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/sdk/account")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes197/com/bytedance/sdk/account")
- list_b = ["save", "sso", "user", "bdopen", "common"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/sdk/account")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes197/com/bytedance/sdk/account")
- list_b = ["execute", "helper", "induce", "job", "monitor"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/sdk/account")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes197/com/bytedance/sdk/account")
- list_b = ["response", "special", "third", "utils"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/sdk/account")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes197/com/bytedance/sdk/account")
- list_b = ["param", "platform_china"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/sdk/account")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes197/com/bytedance/sdk/account")
- list_b = ["platform", "open"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/sdk/account")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes210/com/bytedance/ttgame/module/compliance")
- list_b = ["bridge"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/module/compliance")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes214/com/bytedance/ttgame/sdk/module/account")
- list_b = ["api", "login"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/sdk/module/account")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes214/com/bytedance/ttgame/sdk/module/account")
- list_b = ["pojo"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/sdk/module/account")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes214/com/bytedance/ttgame/sdk/module/account")
- list_b = ["platform"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/sdk/module/account")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes216/com/bytedance/ttgame/module/screenrecord")
- list_b = ["bridge"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/module/screenrecord")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes217/com/bytedance/ttgame/module/share")
- list_b = ["bridge"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/module/share")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes217/com/bytedance/ttgame/module/share")
- list_b = ["api"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/module/share")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes228/com/bytedance/ttgame/sdk/module/account/platform")
- list_b = ["api", "douyin", "huoshan", "onekey"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame/sdk/module/account/platform")
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_224_bytedance(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes2")
- list_b = ["androidx"]
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new)
- list_package = list_b
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def move_2(decompileDir):
- s1 = os.path.join(decompileDir, "smali_classes23/com")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com")
- list_package = ["ixigua", "just", "loc", "luck"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes24/com/ss")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/ss")
- list_package = ["bduploader", "cgpa", "mediakit"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes24/com/ss")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/ss")
- list_package = ["android"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes26/androidx")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/androidx")
- list_package = ["tracing", "transition", "vectordrawable", "versionedparcelable", "viewbinding", "viewpager",
- "viewpager2", "window"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes27/androidx")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/androidx")
- list_package = ["interpolator", "legacy", "lifecycle", "loader"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes27/androidx")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/androidx")
- list_package = ["localbroadcastmanager", "media", "multidex", "navigation"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- s1 = os.path.join(decompileDir, "smali_classes29/com/bytedance/ttgame")
- smali_classes_new = gw_apk_tool.create_mutil_smali(decompileDir)
- s3 = os.path.join(decompileDir, smali_classes_new, "com/bytedance/ttgame")
- list_package = ["rocket", "rocketapi", "sdk", "tps", "unity"]
- if not os.path.exists(s3):
- distutils.dir_util.mkpath(s3)
- gw_apk_tool.move_package(s1, s3, list_package)
- def handle_public_xml(public_xml_path, remove_node):
- if not os.path.exists(public_xml_path):
- logging.info('public_xml is null: ' + public_xml_path)
- return
- new_lines = []
- with open(public_xml_path, 'r+') as f:
- for line in f.readlines():
- # l = line.strip()
- if line.find(remove_node) > -1:
- continue
- new_lines.append(line)
- f.seek(0)
- f.truncate()
- f.writelines(new_lines)
- return
- if __name__ == '__main__':
- # del_qihoo("C:\\Users\\Administrator\\Desktop\\zt")
- remove_navigate("G:\\autopack2.0_kuaifa\\tool\\workspace\\lrs360\\13651\\extract")
|