def extractXML(apk_location,config_location):
"""
@param project_dir:
@param apk_location:
@return:
"""
with working_directory("/tmp"):
subprocess.call(["apktool", "d", apk_location])
config = ConfigParser.ConfigParser()
config.read(config_location)
app_name = "app-external-release"
temp = config.get("APP_NAME","app_flavor_name")
if temp != None:
app_name = temp
with working_directory("/tmp/" + app_name):
with open("AndroidManifest.xml") as fd:
obj_file = xmltodict.parse(fd.read())
return ast.literal_eval(json.dumps(obj_file))
评论列表
文章目录