script.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. s1 = os.path.join(decompileDir, "smali_classes3", "androidx")
  17. smali_classes2_dir = gw_apk_tool.create_mutil_smali(decompileDir)
  18. s3 = os.path.join(smali_classes2_dir, "androidx")
  19. list_package = ["activity","arch","constraintlayout","cursoradapter","drawerlayout","legacy","annotation","asynclayoutinflater","coordinatorlayout","customview","fragment","lifecycle","appcompat","collection","core","documentfile","interpolator"]
  20. if not os.path.exists(s3):
  21. distutils.dir_util.mkpath(s3)
  22. gw_apk_tool.move_package(s1, s3, list_package)
  23. def move_smallsheep(decompileDir):
  24. ""
  25. if __name__ == "__main__":
  26. ""