game_script.py 717 B

123456789101112131415161718192021
  1. import file_utils
  2. import common_utils
  3. import xml_utils
  4. import os.path
  5. import xml.etree.ElementTree as ET
  6. namespaces = {'android' : 'http://schemas.android.com/apk/res/android'}
  7. encoding = 'UTF-8'
  8. def execute(game, sdk, config):
  9. print('execute %s game script...' % game)
  10. subChannel = config['subChannel']
  11. decompliePath = file_utils.get_decompile_path(game, sdk, subChannel, config['cache'])
  12. manifest = os.path.join(decompliePath, 'AndroidManifest.xml')
  13. activityName = 'com.tencent.android.tpush.XGPushActivity'
  14. #删除Activity
  15. xml_utils.delete_activity_by_name(manifest, activityName)
  16. file_utils.copy_game_smali_code(game, sdk, subChannel, config)
  17. return 0