|
...
|
...
|
@@ -20,36 +20,6 @@ import sys |
|
|
|
androidNS = 'http://schemas.android.com/apk/res/android'
|
|
|
|
|
|
|
|
def execute(channel, decompileDir, packageName):
|
|
|
|
'''
|
|
|
|
sdkDir = decompileDir + '/../sdk/' + channel['sdk']
|
|
|
|
if not os.path.exists(sdkDir):
|
|
|
|
file_utils.printF("The sdk temp folder is not exists. path:"+sdkDir)
|
|
|
|
return 1
|
|
|
|
|
|
|
|
manifest = decompileDir + '/AndroidManifest.xml'
|
|
|
|
ET.register_namespace('android', androidNS)
|
|
|
|
|
|
|
|
key = '{' + androidNS + '}name'
|
|
|
|
|
|
|
|
tree = ET.parse(manifest)
|
|
|
|
root = tree.getroot()
|
|
|
|
|
|
|
|
permissionLst = root.findall('uses-permission')
|
|
|
|
|
|
|
|
if permissionLst != None:
|
|
|
|
for permissionNode in permissionLst:
|
|
|
|
value = permissionNode.get(key)
|
|
|
|
if value == 'android.permission.RECORD_AUDIO':
|
|
|
|
root.remove(permissionNode)
|
|
|
|
print("AndroidManifest remove the permission of audio ,the detail is android.permission.RECORD_AUDIO")
|
|
|
|
elif value == 'android.permission.GET_ACCOUNTS':
|
|
|
|
root.remove(permissionNode)
|
|
|
|
print("AndroidManifest remove the permission of GET_ACCOUNTS ,the detail is android.permission.GET_ACCOUNTS")
|
|
|
|
|
|
|
|
tree.write(manifest, 'UTF-8')
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
manifestPath = decompileDir + '/AndroidManifest.xml'
|
|
|
|
manifest_file = open(manifestPath, 'r+', encoding='Utf-8')
|
|
|
|
manifestContent = str(manifest_file.read())
|
...
|
...
|
|