dongguoliang@kuaifazs.com лет назад: 2
Родитель
Сommit
91968d4978
2 измененных файлов с 86 добавлено и 2 удалено
  1. 5 2
      十万个冷笑话2022酷派/script.py
  2. 81 0
      英雄来当家酷派/script.py

+ 5 - 2
十万个冷笑话2022酷派/script.py

@@ -16,10 +16,12 @@ import gw_data_center
 
 ANDROID_NS = 'http://schemas.android.com/apk/res/android'
 
+
 def script_init(workspace_sdk_dir, extract_dir, channel_sdk_info, new_game_channel_info, game_info):
     # gw_data_center.pack_small=True
     return
 
+
 def script_second(workspace_sdk_dir, extract_dir, channel_sdk_info, new_game_channel_info, game_info):
     logging.info('script_second: ' + str(channel_sdk_info))
     # 逆向渠道id
@@ -122,8 +124,7 @@ def script(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
 
 
 def script_last(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
-
-   return
+    return
 
 
 def create_mutil_smali(decompileDir):
@@ -201,6 +202,7 @@ def modify_manifest(decompileDir, removeKey):
 
     root_node.write(xmlparse, 'utf-8')
 
+
 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)
@@ -217,6 +219,7 @@ def handle_public_xml(public_xml_path, remove_node):
         f.writelines(new_lines)
     return
 
+
 if __name__ == '__main__':
     # replace_super_application("D:\work\wzdq")
     modify_manifest("E:\\apk\\youhua\\youhua.zip.out", "requestLegacyExternalStorage")

+ 81 - 0
英雄来当家酷派/script.py

@@ -0,0 +1,81 @@
+# coding:utf8
+
+__author__ = 'dong'
+
+import os
+import logging
+import xml.dom.minidom
+import re
+import shutil
+import glob
+from xml.etree.ElementTree import ElementTree, Element
+import distutils.dir_util
+from xml.etree import ElementTree as ET
+import gw_file_system
+import gw_data_center
+
+ANDROID_NS = 'http://schemas.android.com/apk/res/android'
+
+
+def script_init(workspace_sdk_dir, extract_dir, channel_sdk_info, new_game_channel_info, game_info):
+    # gw_data_center.pack_small=True
+    return
+
+
+def script_second(workspace_sdk_dir, extract_dir, channel_sdk_info, new_game_channel_info, game_info):
+    logging.info('script_second: ' + str(channel_sdk_info))
+    # 逆向渠道id
+    if channel_sdk_info['id'] == '549':
+
+        public_xml = os.path.join(extract_dir, "../sdk/smallsheep/ForRes/drawable/abc_item_background_holo_light.xml")
+        if os.path.exists(public_xml):
+            os.remove(public_xml)
+
+        public_xml = os.path.join(extract_dir,
+                                  "../sdk/smallsheep/ForRes/drawable-xhdpi/abc_ic_commit_search_api_mtrl_alpha.png")
+        if os.path.exists(public_xml):
+            os.remove(public_xml)
+
+        public_xml = os.path.join(extract_dir,
+                                  "../sdk/smallsheep/ForRes/drawable-xhdpi/abc_popup_background_mtrl_mult.9.png")
+        if os.path.exists(public_xml):
+            os.remove(public_xml)
+
+        public_xml = os.path.join(extract_dir,
+                                  "../sdk/smallsheep/ForRes/drawable-xxhdpi/abc_ab_share_pack_mtrl_alpha.9.png")
+        if os.path.exists(public_xml):
+            os.remove(public_xml)
+
+        public_xml = os.path.join(extract_dir,
+                                  "../sdk/smallsheep/ForRes/layout/abc_alert_dialog_material.xml")
+        if os.path.exists(public_xml):
+            os.remove(public_xml)
+
+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
+
+
+def script(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
+    logging.info("-----debug-----")
+
+
+def script_last(SDK, decompileDir, channelSdkInfo, new_game_channel_info, gameInfo):
+    return
+
+
+if __name__ == '__main__':
+    # replace_super_application("D:\work\wzdq")
+    ""