Commit 0cb39380 authored by 周振烽's avatar 周振烽
Browse files

增加dealProxy 进打包流程

parent c352d8bd
......@@ -394,6 +394,7 @@ class apkTool(object):
apk_path = cpath.chandir(self.cname, self.fname)
self._deCompileApk(apk_path, self.CBuildDir())
self.dealFile()
self.dealProxy()
self.dealRes()
self.dealManifest()
self.dealSpecial()
......
......@@ -2,7 +2,6 @@
from functools import partial
import os
from xml.dom.minidom import parse
from xml.dom.minidom import parseString
......@@ -14,7 +13,7 @@ import datetime
apkDir = os.path.join(os.getcwd(), 'apks') # 渠道APK , chan(cname, fname)
killDir = os.path.join(os.getcwd(), 'demoChannel') # 反编译
templetDir = os.path.join(os.getcwd(), 'templet') # CP母包目录
templetDir = os.path.join(os.getcwd(), 'templet') # CP母包目录
resultDir = os.path.join(os.getcwd(), 'result') # 编译结果
configDir = os.path.join(os.getcwd(), 'channelconfig') # 后期存入MongoDB
specialDir = os.path.join(os.getcwd(), 'special')
......@@ -87,11 +86,9 @@ def copyTree(src, dst, force=False):
def dealFile(apk, force='null'):
print("开始处理文件:" + apk)
killPath = os.path.join(killDir, apk)
copyTree(os.path.join(templetDir, "assets"), killPath)
libsDir = os.path.join(templetDir, "lib")
......@@ -233,8 +230,11 @@ def xmlToJson(xml, aleradyContent):
return jsonStr
except Exception:
pass
rea
def jsonToXml(jsDict):
convertXml = ''
try:
......@@ -644,14 +644,14 @@ if __name__ == '__main__':
version = args.targetSDKVersion # 版本的模板
targetapk = args.targetApk # 目标apk 名
if targetapk:
channelName = targetapk[:targetapk.index('demo')] # channel 渠道名称接出来
channelName = targetapk[:targetapk.index('demo')] # channel 渠道名称接出来
if version != None and targetapk != None:
templetDir = templetDir + '_' + version
configFile = os.path.join(configDir, channelName + '.config')
with open(configFile, 'r') as f:
content = str(f.read())
CONFIG = dict(json.loads(content)) # 从 cache 中读出
CONFIG = dict(json.loads(content)) # 从 cache 中读出
deCompileApk(targetapk)
dealFile(targetapk)
......
......@@ -5,5 +5,5 @@
"ZKFX_PACKID": "40",
"ZKFX_CHLID": "11",
"ZK_AGENT_KEY": "a83daf18-4260-4eff-b3e5-ff8ce6d5fc19",
"ZK_AGNET_APPID": "100454",
"ZK_AGNET_APPID": "100454"
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment