script.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # -*- coding:utf-8 -*-
  2. __author__ = 'ALIXie'
  3. import os
  4. import logging
  5. import distutils.dir_util
  6. import gw_apk_tool
  7. def script_init(workspace_sdk_dir, extract_dir, channelSdkInfo, new_game_channel_info, game_info):
  8. return
  9. def script_last(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
  10. logging.info('------------channelSdkInfo:' + str(channelSdkInfo))
  11. if channelSdkInfo['id'] == '597':
  12. move(decompileDir)
  13. else:
  14. move_smallsheep(decompileDir)
  15. def move(decompileDir):
  16. ""
  17. def move_smallsheep(decompileDir):
  18. s1 = os.path.join(decompileDir, "smali_classes3", "androidx")
  19. smali_classes2_dir = gw_apk_tool.create_mutil_smali(decompileDir)
  20. s3 = os.path.join(smali_classes2_dir, "androidx")
  21. list_package = ["activity","arch","constraintlayout","cursoradapter","drawerlayout","legacy","annotation","asynclayoutinflater","coordinatorlayout","customview","fragment","lifecycle","appcompat","collection","core","documentfile","interpolator"]
  22. if not os.path.exists(s3):
  23. distutils.dir_util.mkpath(s3)
  24. gw_apk_tool.move_package(s1, s3, list_package)
  25. if __name__ == "__main__":
  26. ""