This adds the ApkVerifier class which verifies APKs using APK
Signature Scheme v2 only. In a follow-up commit this class will be
extended to verify APKs using JAR signature scheme when necessary.
The APK verifier is designed to not just verify an APK, but also
report errors, warnings, and information about signers in a structured
way, to enable tools to surface this information to users in various
ways.
Bug: 27461702
Change-Id: I10c6ba436021d86b6dbf6d3cf44494652adacb66
LOCAL_LDLIBS was the only correct way to use NDK libraries, but few used
it correctly. It also often got confused with LOCAL_LDFLAGS, so move the
flags to the correct variable.
For binaries that weren't using the NDK (empty LOCAL_SDK_VERSION), it
was never valid to use LOCAL_LDLIBS, as dependencies would not be
properly set up, and could lead to random build failures. So convert any
-l linker flags to using LOCAL_SHARED_LIBRARIES automatically.
For binaries built using the NDK (LOCAL_SDK_VERSION set), they were
required to use LOCAL_LDLIBS for prebuilt NDK libraries, otherwise they
would get headers and dependencies to the platform versions. Any
non-prebuilt LOCAL_LDLIBS would miss dependencies. So move the NDK
prebuilt libraries to LDLIBS from SHARED_LIBRARIES, and move everything
else to SHARED_LIBRARIES.
So now, for device modules, LOCAL_SHARED_LIBRARIES should always be
used, and we'll do the right thing. LOCAL_LDLIBS should only be used for
host libraries from the system.
Change-Id: Ide34c7afdcfb6507a378d45a42471729e489a9e0
This modifies JAR signing code to produce DSA signatures which are
accepted by all Android platforms rather than only API Level 9 and
higher.
The issue is that by default Bouncy Castle uses OID 1.2.840.10040.4.3
(dsaWithSha1) in PKCS #7 CMS SignerInfo whereas Android accepts that
only since API Level 9. However, OID 1.2.840.10040.4.1 (dsa) is
accepted by all Android platforms.
Bug: 27461702
Change-Id: I24256a255bcdc2108bdb447557af7568a2c096e3
In preparation for including them in prebuilts/build-tools.
acp: We use a prebuilt in prebuilts/sdk, but it's not part of the sdk.
ijar: We use the host libstdc++ to workaround the lack of libc++ on
some unbundled branches.
ziptime: We disable this on unbundled builds, due to the lack of libc++.
Change-Id: Ib9766b1dbddd151c38ff27c529865200ab37fce1
am: ecf97649bd
* commit 'ecf97649bd4ae5b2f1084874d9e809b73d9b4095':
Drop CLANG and CLANG_CXX in the environment
Change-Id: I543ce82c8d6260724551c2b51aa7ae0aeb19c3d5
am: f03398b651
* commit 'f03398b6519e1d9695c61da450346d5a0f0f8528':
Drop CLANG and CLANG_CXX in the environment
Change-Id: I9fce3d3c203b89295529c72de4d094ff62d178fd
am: 27a55cd3c7
* commit '27a55cd3c703c190f933630e503d963ef7478183':
Drop CLANG and CLANG_CXX in the environment
Change-Id: I3850b1783fb47cda05f1a7799ff8ceddb589e033
am: 31e3dab7bb
* commit '31e3dab7bb7dd447c1043a671668d4a3987daded':
Improve efficiency of using the DataSource abstraction.
Change-Id: I4e3719cf4283b2fa93009e68394071b0a6ce6f45
am: 732b29a5c3
* commit '732b29a5c38a3a33bdffea662875e6a8dab894b3':
Improve efficiency of using the DataSource abstraction.
Change-Id: I4b2e05ffc80d59ef19a1b78c3560f0d21c5b04b2
am: 7353eabd14
* commit '7353eabd14cbfae2c123a58cae4ce1e770ee351d':
Improve efficiency of using the DataSource abstraction.
Change-Id: Ia1ab6c7d0b94c59ab6d7b41828e8e5d676c212e5