update: fix running without androguard

Soon, we can rip out all the aapt parsing stuff, but not yet!
This commit is contained in:
Hans-Christoph Steiner 2019-02-01 14:45:22 +01:00
parent 5d39a97ab8
commit 17dc231dc9
2 changed files with 8 additions and 4 deletions

View file

@ -2528,7 +2528,7 @@ def get_first_signer_certificate(apkpath):
elif len(cert_files) == 1:
cert_encoded = get_certificate(apk.read(cert_files[0]))
if not cert_encoded:
if not cert_encoded and use_androguard():
apkobject = _get_androguard_APK(apkpath)
certs = apkobject.get_certificates_der_v2()
if len(certs) > 0: