History log of /frameworks/base/core/java/android/content/pm/Signature.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d68b87cdd402d46013170d9316a31c82be4e4816 12-Nov-2014 Jeff Sharkey <jsharkey@android.com> Recover apps with malformed certificates.

There was a window of time in Lollipop where we persisted certificates
after they had passed through a decode/encode cycle. The well-written
OpenSSL library was liberal when decoding (allowing slightly malformed
certs to be parsed), but then strict when encoding, giving us
different bytes for effectively the same certificate.

A related libcore change (0c990ab4a90b8a5492a67b2b728ac9a4a1ccfa1b)
now returns the original bytes verbatim, fixing both pre-Lollipop
installs and installs after that change.

This change recovers any apps that had been installed during the
window of time described above by doing a one-time check to see if
the certs are effectively equal.

Bug: 18228011
Change-Id: Ib82bd6db718d0490d7a26c9c1014b7c8457a7f2d
/frameworks/base/core/java/android/content/pm/Signature.java
ec55ef0934b8e0d1bb705434947de817f7be57f1 08-Jul-2014 Jeff Sharkey <jsharkey@android.com> Extend pm to support sessions and split APKs.

Separate commands to create an install session, stream files into the
staging area, and then commit the install. Streaming can accept data
from stdin across adb, avoiding extra copy from push.

Extend FileBridge to support blocking close(). Always destroy
session regardless of result.

Bug: 14975160
Change-Id: Ic3f462e7d1901079b785e210228950cdfa676466
/frameworks/base/core/java/android/content/pm/Signature.java
3a44f3f1b446315ef894e01d2ab9b5388c2bd8c4 29-Apr-2014 Jeff Sharkey <jsharkey@android.com> Initial support for split APKs, PackageInstaller.

Defines a new PackageInstaller class that will be used for installing
and upgrading packages. An application desiring to install an
application creates a session, stages one or more package files in
that session, and then kicks off the install.

Previously, PackageManager would always make its own copy of a package
before inspecting it, to ensure the data could be trusted. This new
session concept allows the installer to write package data directly to
its final resting place on disk, reducing disk I/O and footprint
requirements. Writes are directed through an intermediate pipe
to ensure we can prevent mutations once an install has been initiated.
Also uses fallocate() internally to support optimal ext4 block
allocation using extents to reduce fragmentation.

Sessions are also the way we support installing multiple "split" APKs
in a single atomic operation. For a set of packages to form a valid
application, they must have exactly the same package name, version
code, and certificates. A session can also be used to add a small
handful of splits to an application by inheriting existing packages
when not performing a full install.

Add PackageParser support for extracting split names and certificates.

Bug: 14975160
Change-Id: I23d1bf4fbeb9f99a8c83be0c458900a0f0d1bccc
/frameworks/base/core/java/android/content/pm/Signature.java
a8e65fd82a323e6065ae9ae6cc8eaa130d3c1efd 24-Apr-2014 Kenny Root <kroot@google.com> Only remember the signer certificates for Signatures

Previously we would use the JarEntry#getCertificates API which would
return a flattened array of all the signers and their certificate chain.
Since this isn't what was intended, switch to reading the certificate
chains and only paying attention to the signer certificate.

In order to migrate during upgrades of the platform, we'll scan on boot
with a compatibility mode which will check the stores signatures in the
old format by flattening the chains of the scanned packages then
comparing the two sets.

Bug: 13678484
Change-Id: I02a5c53121d8d6f70a51d7e3b98168a41e11482e
/frameworks/base/core/java/android/content/pm/Signature.java
94c91dca55de9ffdbe072fcc5dd6dbf1efe5e4c1 07-Mar-2013 Jeff Sharkey <jsharkey@android.com> ArrayUtils.indexOf(), containsAll() with tests.

Change-Id: I040164d4e45126e4a6c1df54bd114f47951da560
/frameworks/base/core/java/android/content/pm/Signature.java
05ca4c90644921df9193d92b2abdc81ef77e4a62 15-Sep-2011 Kenny Root <kroot@google.com> Allow non-required package verifiers

* Verifiers can be specified in the AndroidManifest.xml

* Those verifiers can respond to the new Intent action

* PackageManager API for those verifiers: verifyPendingInstall

Change-Id: I4892bce2e6984871e6e93c60a1ca0dae145f5df5
/frameworks/base/core/java/android/content/pm/Signature.java
1137341885d8dc451dddc2e01319fb0fab00bbc3 29-Jul-2011 Kenny Root <kroot@google.com> Throw exception on odd length Signatures

The old version of this code would silently truncate odd-length
Signatures. However, this masks some bugs. Add a throw of
IllegalArgumentException so users can easily see where they're getting
bad input for Signatures.

Also, go through the existing code and catch this exception or
pre-check the input strings so system_server doesn't crash later.

Bug: 5092338
Change-Id: I8c672c5eaeb738a92c4581ce0df09baf719980ef
/frameworks/base/core/java/android/content/pm/Signature.java
d21d444426911d93c507a929a8223ebf63258954 23-Jul-2011 Kenny Root <kroot@google.com> Stop using charAt for Signatures

Simply getting the byte array and operating on that instead of using
String.charAt() repeatedly speeds up Signature initializer calls during
bootup from 150ms to 9ms (1700% faster).

Change-Id: I85ef17ef63477927e0181d5f49a1d521b7b0d98b
/frameworks/base/core/java/android/content/pm/Signature.java
de0ff63700c1836771d797e6c7340b18cb814484 04-Sep-2010 Kenny Root <kroot@google.com> Reduce footprint of Signature from ~7000 to ~1448

Signature had lazy initialization of the mString member when needed, but
it would stick around forever when initialized. Each package had one or
more Signatures that would be ~7000 bytes each. At a couple hundred
packages, that's over 1.3MB just for signatures.

Whenever packages.xml was written out, it would write the Signature for
each program as well which happens at boot thereby initializing the
mString member pretty much immediately.

Change-Id: Idb882ffeca2861b3e87437fc83f001710d6c0441
/frameworks/base/core/java/android/content/pm/Signature.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/content/pm/Signature.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/content/pm/Signature.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/content/pm/Signature.java