History log of /frameworks/base/core/java/android/util/jar/StrictJarFile.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9b59bc459b4cb5415909641bd1e981100bfafb2b 24-Mar-2016 Alex Klyubin <klyubin@google.com> Ignore signature stripping protection for preinstalled APKs.

The current build process may currently strip APK Signature Scheme v2
signatures from prebuilt APKs to be installed on the system or vendor
partitions. However, it leaves intact the signature scheme rollback
protections introduced by APK Signature Scheme v2. Due to a bug, when
the system extracts signer certificates from preinstalled APKs, it
encounters the rollback protection and aborts the extraction process.
This manifests itself as some preinstalled packages not appearing as
installed.

This change makes the system ignore signature scheme rollback
protections when extracting certificates from preinstalled APKs. This
is fine because the process of extracting certificates from
preinstalled APKs does not care about validity/integrity of signatures
and the APKs. It only cares about extracting signer certificates.

Bug: 27829513
Change-Id: I3bed463e776b057e93a0fce915db4014946be1f9
/frameworks/base/core/java/android/util/jar/StrictJarFile.java
e415718502897a4e5385af47d3bbe8c8257c2e5d 05-Jan-2016 Alex Klyubin <klyubin@google.com> Verify APKs using APK Signature Scheme v2.

This makes Package Manager check whether an APK is signed using APK
Signature Scheme v2 and, if it is, verify the APK's signatures using
that scheme rather than the usual JAR signature scheme.

APK Signature Scheme v2 is a whole-file signature scheme which aims
to protect every single bit of the APK as opposed to the JAR signature
scheme which protects only the names and uncompressed contents of ZIP
entries.

The two main goals of APK Signature Scheme v2 are:
1. Detect any unauthorized modifications to the APK. This is achieved
by making the signature cover every byte of the APK being signed.
2. Enable much faster signature and integrity verification. This is
achieved by requiring only a minimal amount of APK parsing before
the signature is verified, thus completely bypassing ZIP entry
decompression and by making integrity verification parallelizable
by employing a hash tree.

Bug: 25794543
Change-Id: If59fe013f2e62bac7677bb20e65f6061b91eec2e
/frameworks/base/core/java/android/util/jar/StrictJarFile.java
8a7c1606d88873c5a1b5764c16cb046b6f2275b2 03-Nov-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> Move StrictJarFile from libcore to framework

Bug: 25337946
Change-Id: Ib4fac6fa9f534b8654e5ca158bbaedb2393772ba
(cherrypicked from 43ea2cc2a81926a6b2ca13d41f4eab089640129e)
/frameworks/base/core/java/android/util/jar/StrictJarFile.java