Lines Matching refs:APK
32 can be found that match APK signatures, the filename will be
147 stored in a signed .apk)."""
170 class APK(object):
189 apk = zipfile.ZipFile(f, "r")
191 for info in apk.infolist():
194 pkcs7 = apk.read(info.filename)
243 # First read the APK certs file to figure out whether there are compressed
248 apk_extensions = ['*.apk', '*.apex']
253 apk_extensions.append('*.apk' + compressed_extension)
276 if fn.endswith(('.apk', '.apex')):
279 apk = APK(fullname, displayname)
280 self.apks[apk.filename] = apk
281 self.apks_by_basename[os.path.basename(apk.filename)] = apk
283 self.max_pkg_len = max(self.max_pkg_len, len(apk.package))
284 self.max_fn_len = max(self.max_fn_len, len(apk.filename))
290 for apk in self.apks.itervalues():
291 if apk.shared_uid:
292 apks_by_uid.setdefault(apk.shared_uid, []).append(apk)
296 for apk in apks[1:]:
297 if apk.certs != apks[0].certs:
306 for apk in apks:
307 print "%-*s [%s]" % (self.max_pkg_len, apk.package, apk.filename)
308 for cert in apk.certs:
319 apk = self.apks_by_basename[apk_filename]
320 name = ALL_CERTS.Get(apk.cert)
322 Push(apk.filename)
329 for apk in self.apks.itervalues():
330 for cert in apk.certs:
331 by_cert.setdefault(cert, []).append((apk.package, apk))
340 for _, apk in apks:
341 if apk.shared_uid:
342 print " %-*s %-*s [%s]" % (self.max_fn_len, apk.filename,
343 self.max_pkg_len, apk.package,
344 apk.shared_uid)
346 print " %-*s %s" % (self.max_fn_len, apk.filename, apk.package)
368 print "%s [%s]: new APK (not in comparison target_files)" % (
372 print "%s [%s]: removed APK (only in comparison target_files)" % (
377 Banner("APK signing differences")