mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-11 15:13:27 +02:00
update: handle bad XML when using androguard
repo/ch.swift.willi_417101.apk had a C/Java comment in the AndroidManifest.xml rather than an XML comment: <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26"> </uses-sdk> // Remove permissions introduced by the appsflyer library <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"> </uses-permission>
This commit is contained in:
parent
d98d8c2e52
commit
2c8008356b
@ -1264,7 +1264,10 @@ def scan_apk_androguard(apk, apkfile):
|
||||
apk['uses-permission-sdk-23'].append(permission_sdk_23)
|
||||
|
||||
for item in xml.findall('uses-feature'):
|
||||
feature = str(item.attrib['{' + xml.nsmap['android'] + '}name'])
|
||||
key = '{' + xml.nsmap['android'] + '}name'
|
||||
if key not in item.attrib:
|
||||
continue
|
||||
feature = str(item.attrib[key])
|
||||
if feature != "android.hardware.screen.portrait" \
|
||||
and feature != "android.hardware.screen.landscape":
|
||||
if feature.startswith("android.feature."):
|
||||
|
Loading…
Reference in New Issue
Block a user