Status Update
Comments
xa...@google.com <xa...@google.com> #2
ra...@google.com <ra...@google.com> #3
Branch: master
commit 3222d6c8a40307c4912ab80d666dcb6846840dea
Author: Alex Klyubin <klyubin@google.com>
Date: Tue May 02 14:39:54 2017
Add first batch of tests for ApkVerifier
These tests are based on Android Package Manager CTS tests. See
cts/hostsidetests/appsecurity/src/android/appsecurity/cts/PkgInstallSignatureVerificationTest.java
Test: bazel test ...
Test: gradlew test
Bug: 37137869
Change-Id: I9a077283600271a0efa0ef3e5d271918711df66c
M BUILD
M src/test/java/com/android/apksig/AllTests.java
A src/test/java/com/android/apksig/ApkVerifierTest.java
A src/test/resources/com/android/apksig/dsa-1024.pk8
A src/test/resources/com/android/apksig/dsa-1024.x509.pem
A src/test/resources/com/android/apksig/dsa-2048.pk8
A src/test/resources/com/android/apksig/dsa-2048.x509.pem
A src/test/resources/com/android/apksig/dsa-3072.pk8
A src/test/resources/com/android/apksig/dsa-3072.x509.pem
A src/test/resources/com/android/apksig/ec-p256.pk8
A src/test/resources/com/android/apksig/ec-p256.x509.pem
A src/test/resources/com/android/apksig/ec-p384.pk8
A src/test/resources/com/android/apksig/ec-p384.x509.pem
A src/test/resources/com/android/apksig/ec-p521.pk8
A src/test/resources/com/android/apksig/ec-p521.x509.pem
A src/test/resources/com/android/apksig/empty-unsigned.apk
A src/test/resources/com/android/apksig/original.apk
A src/test/resources/com/android/apksig/rsa-1024.pk8
A src/test/resources/com/android/apksig/rsa-1024.x509.pem
A src/test/resources/com/android/apksig/rsa-16384.pk8
A src/test/resources/com/android/apksig/rsa-16384.x509.pem
A src/test/resources/com/android/apksig/rsa-2048.pk8
A src/test/resources/com/android/apksig/rsa-2048.x509.pem
A src/test/resources/com/android/apksig/rsa-3072.pk8
A src/test/resources/com/android/apksig/rsa-3072.x509.pem
A src/test/resources/com/android/apksig/rsa-4096.pk8
A src/test/resources/com/android/apksig/rsa-4096.x509.pem
A src/test/resources/com/android/apksig/rsa-8192.pk8
A src/test/resources/com/android/apksig/rsa-8192.x509.pem
A src/test/resources/com/android/apksig/two-signers-second-signer-v2-broken.apk
A src/test/resources/com/android/apksig/two-signers.apk
A src/test/resources/com/android/apksig/unsigned-ephemeral.apk
A src/test/resources/com/android/apksig/v1-only-empty.apk
A src/test/resources/com/android/apksig/v1-only-ephemeral.apk
A src/test/resources/com/android/apksig/v1-only-max-sized-eocd-comment.apk
A src/test/resources/com/android/apksig/v1-only-pkcs7-cert-bag-first-cert-not-used.apk
A src/test/resources/com/android/apksig/v1-only-two-signers.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.1-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.1-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.1-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.3-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.3-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.3-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha224-1.2.840.10040.4.1-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha224-1.2.840.10040.4.1-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha224-1.2.840.10040.4.1-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha224-2.16.840.1.101.3.4.3.1-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha224-2.16.840.1.101.3.4.3.1-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha224-2.16.840.1.101.3.4.3.1-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha256-1.2.840.10040.4.1-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha256-1.2.840.10040.4.1-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha256-1.2.840.10040.4.1-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha256-2.16.840.1.101.3.4.3.2-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha256-2.16.840.1.101.3.4.3.2-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha256-2.16.840.1.101.3.4.3.2-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha384-2.16.840.1.101.3.4.3.3-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha384-2.16.840.1.101.3.4.3.3-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha384-2.16.840.1.101.3.4.3.3-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha512-2.16.840.1.101.3.4.3.4-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha512-2.16.840.1.101.3.4.3.4-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-dsa-sha512-2.16.840.1.101.3.4.3.4-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.2.1-p256.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.2.1-p384.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.2.1-p521.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.4.1-p256.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.4.1-p384.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.4.1-p521.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.2.1-p256.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.2.1-p384.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.2.1-p521.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.4.3.1-p256.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.4.3.1-p384.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.4.3.1-p521.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.2.1-p256.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.2.1-p384.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.2.1-p521.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.4.3.2-p256.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.4.3.2-p384.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.4.3.2-p521.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.2.1-p256.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.2.1-p384.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.2.1-p521.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.4.3.3-p256.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.4.3.3-p384.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.4.3.3-p521.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.2.1-p256.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.2.1-p384.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.2.1-p521.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.4.3.4-p256.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.4.3.4-p384.apk
A src/test/resources/com/android/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.4.3.4-p521.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-1024-cert-not-der.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-16384.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-4096.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-8192.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-16384.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-4096.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-8192.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-16384.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-4096.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-8192.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-16384.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-4096.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-8192.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-16384.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-4096.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-8192.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-16384.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-4096.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-8192.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-16384.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-4096.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-8192.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-16384.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-4096.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-8192.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-16384.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-4096.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-8192.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-16384.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-4096.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-8192.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-16384.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-4096.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-8192.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-1024.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-16384.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-2048.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-3072.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-4096.apk
A src/test/resources/com/android/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-8192.apk
A src/test/resources/com/android/apksig/v1-v2-ephemeral.apk
A src/test/resources/com/android/apksig/v1-with-apk-sig-block-but-without-apk-sig-scheme-v2-block.apk
A src/test/resources/com/android/apksig/v2-only-apk-sig-block-size-mismatch.apk
A src/test/resources/com/android/apksig/v2-only-cert-and-public-key-mismatch.apk
A src/test/resources/com/android/apksig/v2-only-empty.apk
A src/test/resources/com/android/apksig/v2-only-ephemeral.apk
A src/test/resources/com/android/apksig/v2-only-garbage-between-cd-and-eocd.apk
A src/test/resources/com/android/apksig/v2-only-max-sized-eocd-comment.apk
A src/test/resources/com/android/apksig/v2-only-missing-classes.dex.apk
A src/test/resources/com/android/apksig/v2-only-no-certs-in-sig.apk
A src/test/resources/com/android/apksig/v2-only-signatures-and-digests-block-mismatch.apk
A src/test/resources/com/android/apksig/v2-only-truncated-cd.apk
A src/test/resources/com/android/apksig/v2-only-two-signers-second-signer-no-sig.apk
A src/test/resources/com/android/apksig/v2-only-two-signers-second-signer-no-supported-sig.apk
A src/test/resources/com/android/apksig/v2-only-two-signers.apk
A src/test/resources/com/android/apksig/v2-only-unknown-pair-in-apk-sig-block.apk
A src/test/resources/com/android/apksig/v2-only-with-dsa-sha256-1024-sig-does-not-verify.apk
A src/test/resources/com/android/apksig/v2-only-with-dsa-sha256-1024.apk
A src/test/resources/com/android/apksig/v2-only-with-dsa-sha256-2048.apk
A src/test/resources/com/android/apksig/v2-only-with-dsa-sha256-3072.apk
A src/test/resources/com/android/apksig/v2-only-with-ecdsa-sha256-p256-digest-mismatch.apk
A src/test/resources/com/android/apksig/v2-only-with-ecdsa-sha256-p256-sig-does-not-verify.apk
A src/test/resources/com/android/apksig/v2-only-with-ecdsa-sha256-p256.apk
A src/test/resources/com/android/apksig/v2-only-with-ecdsa-sha256-p384.apk
A src/test/resources/com/android/apksig/v2-only-with-ecdsa-sha256-p521.apk
A src/test/resources/com/android/apksig/v2-only-with-ecdsa-sha512-p256.apk
A src/test/resources/com/android/apksig/v2-only-with-ecdsa-sha512-p384.apk
A src/test/resources/com/android/apksig/v2-only-with-ecdsa-sha512-p521.apk
A src/test/resources/com/android/apksig/v2-only-with-ignorable-unsupported-sig-algs.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pkcs1-sha256-1024-cert-not-der.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pkcs1-sha256-1024.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pkcs1-sha256-16384.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pkcs1-sha256-2048-sig-does-not-verify.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pkcs1-sha256-2048.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pkcs1-sha256-3072.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pkcs1-sha256-4096.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pkcs1-sha256-8192.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pkcs1-sha512-1024.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pkcs1-sha512-16384.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pkcs1-sha512-2048.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pkcs1-sha512-3072.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pkcs1-sha512-4096-digest-mismatch.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pkcs1-sha512-4096.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pkcs1-sha512-8192.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pss-sha256-1024.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pss-sha256-16384.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pss-sha256-2048-sig-does-not-verify.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pss-sha256-2048.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pss-sha256-3072.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pss-sha256-4096.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pss-sha256-8192.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pss-sha512-16384.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pss-sha512-2048.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pss-sha512-3072.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pss-sha512-4096.apk
A src/test/resources/com/android/apksig/v2-only-with-rsa-pss-sha512-8192.apk
A src/test/resources/com/android/apksig/v2-only-wrong-apk-sig-block-magic.apk
A src/test/resources/com/android/apksig/v2-stripped-with-ignorable-signing-schemes.apk
A src/test/resources/com/android/apksig/v2-stripped.apk
dw...@google.com <dw...@google.com> #4
--add-exports java.base/sun.security.pkcs=ALL-UNNAMED --add-exports java.base/sun.security.x509=ALL-UNNAMED
Yesterday when building without the flag, javac failed with:
Exception in thread "main" java.lang.IllegalAccessError: class com.android.apksig.internal.apk.v1.V1SchemeSigner (in unnamed module @0x64f6106c) cannot access class sun.security.x509.AlgorithmId (in module java.base) because module java.base does not export sun.security.x509 to unnamed module @0x64f6106c
at [...]
It seems like the option is not allowed when setting --target 1.8:
javac: option --add-exports not allowed with target 1.8
(I thought I had been running with --target 1.8 yesterday as well, but *shrug*).
So tools/apksig/Android.mk probably needs those flags when building for version 53 class files (OpenJDK 9).
[Deleted User] <[Deleted User]> #5
Sadly, the order in which build targets are built doesn't seem to be deterministic and there are other issues, so I'l not sure what target was failing.
au...@google.com <au...@google.com> #6
Here's the exception I'm getting:
Exception in thread "main" java.lang.IllegalAccessError: class com.android.apksig.internal.apk.v1.V1SchemeSigner (in unnamed module @0x4e718207) cannot access class sun.security.x509.AlgorithmId (in module java.base) because module java.base does not export sun.security.x509 to unnamed module @0x4e718207
at com.android.apksig.internal.apk.v1.V1SchemeSigner.getSupportedAlgorithmId(V1SchemeSigner.java:623)
at com.android.apksig.internal.apk.v1.V1SchemeSigner.<clinit>(V1SchemeSigner.java:539)
at com.android.apksig.DefaultApkSignerEngine.<init>(DefaultApkSignerEngine.java:148)
at com.android.apksig.DefaultApkSignerEngine.<init>(DefaultApkSignerEngine.java:51)
at com.android.apksig.DefaultApkSignerEngine$Builder.build(DefaultApkSignerEngine.java:901)
at com.android.signapk.SignApk.main(SignApk.java:1060)
au...@google.com <au...@google.com> #7
au...@google.com <au...@google.com> #8
ra...@google.com <ra...@google.com> #9
Should we leave this bug to cover the work to move away from those private APIs? If so, I'll assign it back to klyubin.
hm...@google.com <hm...@google.com> #10
ly...@gmail.com <ly...@gmail.com> #11
--add-exports java.base/sun.security.pkcs=ALL-UNNAMED --add-exports java.base/sun.security.x509=ALL-UNNAMED
Turns out apksig is not actually part of my pending changes. Huh. I must have mis-remembered something? Maybe the -target 1.8 with which I'm running OpenJDK 9's javac also stops OpenJDK 9's java complaining in this case. If so, that also seems like a fine workaround (until we want to run with OpenJDK 9's java, which I plan to start looking into, soon, but with no specific ETA).
cm...@google.com <cm...@google.com> #12
I'll export a CL shortly (probably today).
cm...@google.com <cm...@google.com> #13
ha...@google.com <ha...@google.com> #14
Branch: master
commit 9cc3c76abd9c8fa159616883e06526d56b5136e5
Author: Tobias Thierer <tobiast@google.com>
Date: Tue May 09 22:04:25 2017
Let signapk access internal APIs under OpenJDK 9 toolchain
signapk relies on internal APIs sun.security.{pkcs,x509},
for example in com.android.apksig.internal.apk.v1.V1SchemeSigner.
This breaks at signapk runtime under OpenJDK 9 because those
packages are not exported by the java.base module.
This CL unbreaks signapk by allowing it to access these internal
packages. In the long term, signapk should migrate away from these
internal APIs (
Test: make ANDROID_COMPILE_WITH_JACK=false checkbuild tests \
&& make checkbuild tests
(with OpenJDK 8u45 toolchain on the PATH)
Test: make EXPERIMENTAL_USE_OPENJDK9=true \
ANDROID_COMPILE_WITH_JACK=false checkbuild
(with jdk 9-ea+170 toolchain on the PATH)
Bug: 37137869
Bug: 38177295
Change-Id: I64cab83e6eb7b135cf2ad7b523736cb409aaae02
M core/
ot...@google.com <ot...@google.com> #15
pa...@google.com <pa...@google.com> #16
ha...@google.com <ha...@google.com> #17
Branch: master
commit 2ded5eb392c26eb13b96bfcec7e3517bb06eb94c
Author: Alex Klyubin <klyubin@google.com>
Date: Thu Jun 22 14:20:04 2017
Add ASN.1 BER parser
This adds an ASN.1 BER parser to be used for parsing PKCS #7 signature
blocks of APK JAR signatures. The main reason for adding the parser
instead of using Sun's/Oracle's sun.** classes is that these classes
will no longer be accessible (by default) in Java 9 and will likely no
longer be accessible at all in a later release of Java.
The parser takes a BER-encoded input and parses it into the ASN.1
structure represented as a Java object. The main entry point of the
parser is Asn1BerParser.parse.
Test: bazel test ...
Test: gradlew test
Bug: 37137869
Change-Id: I56ecef77c3e32d609a9ea00b71467ed4c11b1757
A src/main/java/com/android/apksig/internal/asn1/Asn1BerParser.java
A src/main/java/com/android/apksig/internal/asn1/Asn1Class.java
A src/main/java/com/android/apksig/internal/asn1/Asn1DecodingException.java
A src/main/java/com/android/apksig/internal/asn1/Asn1Field.java
A src/main/java/com/android/apksig/internal/asn1/Asn1OpaqueObject.java
A src/main/java/com/android/apksig/internal/asn1/Asn1TagClass.java
A src/main/java/com/android/apksig/internal/asn1/Asn1Tagging.java
A src/main/java/com/android/apksig/internal/asn1/Asn1Type.java
M src/main/java/com/android/apksig/internal/asn1/ber/BerDataValueReader.java
M src/main/java/com/android/apksig/internal/asn1/ber/BerEncoding.java
M src/main/java/com/android/apksig/internal/asn1/ber/ByteBufferBerDataValueReader.java
M src/main/java/com/android/apksig/internal/asn1/ber/InputStreamBerDataValueReader.java
A src/main/java/com/android/apksig/internal/util/ByteBufferUtils.java
M src/test/java/com/android/apksig/internal/asn1/AllTests.java
A src/test/java/com/android/apksig/internal/asn1/Asn1BerParserTest.java
pa...@google.com <pa...@google.com> #18
Branch: master
commit 48793cefc913817a2e3aab8cd329a343c1bec636
Author: Alex Klyubin <klyubin@google.com>
Date: Mon Jun 26 09:43:01 2017
Add ASN.1 DER encoder
This adds an ASN.1 DER encoder to be used for encoding PKCS #7
signature blocks of APK JAR signatures. The main reason for adding
the encoder instead of using Sun's/Oracle's sun.** classes is that
these classes will no longer be accessible (by default) in Java 9 and
will likely no longer be accessible at all in a later release of Java.
The parser takes an annotated Java object representing an ASN.1
structure and produces the DER encoding of the object. The main entry
point of the encoder is Asn1DerEncoder.encode.
Test: bazel test ...
Test: gradlew test
Bug: 37137869
Change-Id: I2225431a1a351298ae2e47a244373aa21b16dfd4
A src/main/java/com/android/apksig/internal/asn1/Asn1DerEncoder.java
A src/main/java/com/android/apksig/internal/asn1/Asn1EncodingException.java
M src/main/java/com/android/apksig/internal/asn1/Asn1Field.java
M src/main/java/com/android/apksig/internal/asn1/ber/BerEncoding.java
M src/test/java/com/android/apksig/internal/asn1/AllTests.java
A src/test/java/com/android/apksig/internal/asn1/Asn1DerEncoderTest.java
pa...@google.com <pa...@google.com> #19
Branch: master
commit ca1bcedcf8aaa783aac3762e0e0a36c4f7f03298
Author: Alex Klyubin <klyubin@google.com>
Date: Wed Jun 28 10:24:23 2017
Handle nested indefinite length BER encoding
This fixes the ASN.1 BER parser to correctly handle nested indefinite
length encoded data values. Indefinite length encoding provides no
length estimate upfront and instead terminates the value using 0x00
0x00. As a result, contructed data values (i.e., those that contain
nested data values) must be BER-parsed to establish the correct 0x00
0x00 terminator because nested data values might be indefinite length
encoded and their 0x00 0x00 terminator could be mistaken for the outer
value's terminator. Primitive values (i.e., those that are not
constructed) cannot contain nested data values and thus must not be
BER-parsed to locate 0x00 0x00.
Test: bazel test ...
Test: gradlew test
Bug: 37137869
Change-Id: I9991dcf766d43c2b8a5560639521ff9ad9043d61
M src/main/java/com/android/apksig/internal/asn1/ber/ByteBufferBerDataValueReader.java
M src/main/java/com/android/apksig/internal/asn1/ber/InputStreamBerDataValueReader.java
M src/test/java/com/android/apksig/internal/asn1/Asn1BerParserTest.java
M src/test/java/com/android/apksig/internal/asn1/ber/BerDataValueReaderTestBase.java
ha...@google.com <ha...@google.com> #20
Branch: master
commit a29a14510e747335746bebf208b1f9cbff77cfbf
Author: Alex Klyubin <klyubin@google.com>
Date: Thu Jun 29 08:46:32 2017
Don't re-encode RDNs in PKCS #7 SignerIdentifier
JAR signature is a CMS PKCS #7 ContentInfo / SignedData block which
contains a bag of certificates. The signing certificate is identified
in this bag by SignerIdentifier which contains the certificate's
Issuer DN. This commit fixes a bug where the SignerIdentifier field
was constructed in a way which in some cases re-encoded the Issuer's
RDNs, for example, by switching from Utf8String to PrintableString.
This is technically permitted, but is unnecessary.
As a result of this change, golden APKs needed to be updated. The only
change in these APKs is that the SubjectIdentifier now uses the same
encoded form of Issuer as the certificate it is referencing.
Test: bazel test ...
Test: gradlew test
Bug: 37137869
Change-Id: I61ae97beb8bbd21ac6fdc2af3910f87687256802
M src/main/java/com/android/apksig/internal/apk/v1/V1SchemeSigner.java
M src/test/resources/com/android/apksig/golden-aligned-out.apk
M src/test/resources/com/android/apksig/golden-aligned-v1-out.apk
M src/test/resources/com/android/apksig/golden-aligned-v1v2-out.apk
M src/test/resources/com/android/apksig/golden-legacy-aligned-out.apk
M src/test/resources/com/android/apksig/golden-legacy-aligned-v1-out.apk
M src/test/resources/com/android/apksig/golden-legacy-aligned-v1v2-out.apk
M src/test/resources/com/android/apksig/golden-rsa-minSdkVersion-1-out.apk
M src/test/resources/com/android/apksig/golden-rsa-minSdkVersion-18-out.apk
M src/test/resources/com/android/apksig/golden-rsa-minSdkVersion-24-out.apk
M src/test/resources/com/android/apksig/golden-rsa-out.apk
M src/test/resources/com/android/apksig/golden-unaligned-out.apk
M src/test/resources/com/android/apksig/golden-unaligned-v1-out.apk
M src/test/resources/com/android/apksig/golden-unaligned-v1v2-out.apk
pa...@google.com <pa...@google.com> #21
Branch: master
commit b40d3e4821bc9cb094b0ff13153340e3a0da1b3f
Author: Alex Klyubin <klyubin@google.com>
Date: Wed Jun 28 11:22:50 2017
Stop relying on sun.** when JAR signing
This modifies JAR signing logic to no longer use sun.** classes.
PKCS #7 ASN.1 DER encoding logic is now embedded in apksig.
Test: bazel test ...
Test: gradlew test
Bug: 37137869
Change-Id: Idb2ee92b624e1147222af76a2c2cb2e0a6d9b178
M src/main/java/com/android/apksig/internal/apk/v1/V1SchemeSigner.java
M src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
A src/main/java/com/android/apksig/internal/pkcs7/AlgorithmIdentifier.java
A src/main/java/com/android/apksig/internal/pkcs7/Attribute.java
A src/main/java/com/android/apksig/internal/pkcs7/ContentInfo.java
A src/main/java/com/android/apksig/internal/pkcs7/EncapsulatedContentInfo.java
A src/main/java/com/android/apksig/internal/pkcs7/IssuerAndSerialNumber.java
A src/main/java/com/android/apksig/internal/pkcs7/Pkcs7Constants.java
A src/main/java/com/android/apksig/internal/pkcs7/SignedData.java
A src/main/java/com/android/apksig/internal/pkcs7/SignerIdentifier.java
A src/main/java/com/android/apksig/internal/pkcs7/SignerInfo.java
pa...@google.com <pa...@google.com> #22
pa...@google.com <pa...@google.com> #23
Branch: master
commit 88d729840f1046c3ed04c35a3130d79fe85a19c3
Author: Alex Klyubin <klyubin@google.com>
Date: Wed Jul 19 14:16:56 2017
Add tests for JAR sigs with signed attrs
JAR signatures can contain signed attributes. Android supports
such signatures. Test for this.
Test: bazel test ...
Test: gradlew test
Bug: 37137869
Change-Id: Ia3a57cafab7ef829b90beea3924cf3c3daf4cfba
M src/test/java/com/android/apksig/ApkVerifierTest.java
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs-missing-content-type.apk
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs-multiple-good-digests.apk
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs-wrong-content-type.apk
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs-wrong-digest.apk
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs-wrong-order.apk
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs-wrong-signature.apk
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs.apk
pa...@google.com <pa...@google.com> #24
Branch: master
commit 9a435f125fd654c7c3ec815111f18988478cdc40
Author: Alex Klyubin <klyubin@google.com>
Date: Mon Jul 24 17:31:31 2017
Stop relying on sun.** when verifying JAR sigs
This modifies JAR signature verification logic to no longer directly
use sun.** classes. PKCS #7 ASN.1 BER parsing and signature
verification logic is now embedded in the apksig library.
This commit also removes compile-time workarounds for apksig's use of
sun.** classes from Android.mk.
Test: bazel test ...
Test: gradlew test
Test: Edited build/make/core/
LOCAL_JAVA_LANGUAGE_VERSION := 1.9
and then ran "make apksig"
Test: export EXPERIMENTAL_USE_OPENJDK9=target8
left LOCAL_JAVA_LANGUAGE_VERSION at 1.8, and then
ran "make apksig"
Bug: 37137869
Change-Id: I4688f0ef0fc48653376b007b28a6a56aec21bb09
M Android.mk
M src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
M src/main/java/com/android/apksig/internal/apk/v2/V2SchemeVerifier.java
M src/main/java/com/android/apksig/internal/asn1/Asn1BerParser.java
M src/main/java/com/android/apksig/internal/pkcs7/Pkcs7Constants.java
A src/main/java/com/android/apksig/internal/pkcs7/Pkcs7DecodingException.java
M src/main/java/com/android/apksig/internal/pkcs7/SignerInfo.java
A src/main/java/com/android/apksig/internal/util/GuaranteedEncodedFormX509Certificate.java
M src/test/java/com/android/apksig/ApkVerifierTest.java
pa...@google.com <pa...@google.com> #25
Branch: master
commit 381588709b97405a29a0a87eb970ff8dd366e14f
Author: Alex Klyubin <klyubin@google.com>
Date: Thu Jul 20 11:45:35 2017
Tweaks in handling of JAR signed attributes
APK's JAR signature may contain signed attributes. There are
differences in behavior between pre-N and N+ Android Package Manager
wrt how signed attributes are handled. Prior to commit
9a435f125fd654c7c3ec815111f18988478cdc40 it was not possible to
fully reflect these differences and reflecting them in that commit
would've been too much of a change. Thus, this commit is a follow up
which adds tests for the differences in behavior and adjusts JAR
signature verifier where necessary:
* APKs with signed attributes are broken/unsafe pre-KitKat and are
thus rejected,
* Content type in signed attributes is ignored in pre-N, and
* Mismatch between digest in signed attributes and digest of .SF file
fails verification of the whole signing block, even if the block
contains SignerInfos which verify.
Test: bazel test ...
Test: gradlew test
Bug: 37137869
Change-Id: I94f07c17b83f626fff6d1cf2ecc0a20f39855921
M src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
M src/main/java/com/android/apksig/internal/util/AndroidSdkVersion.java
M src/test/java/com/android/apksig/ApkVerifierTest.java
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs-missing-digest.apk
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs-signerInfo1-good-signerInfo2-good.apk
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs-signerInfo1-missing-content-type-signerInfo2-good.apk
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs-signerInfo1-missing-digest-signerInfo2-good.apk
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs-signerInfo1-multiple-good-digests-signerInfo2-good.apk
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-content-type-signerInfo2-good.apk
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-digest-signerInfo2-good.apk
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-order-signerInfo2-good.apk
A src/test/resources/com/android/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-signature-signerInfo2-good.apk
cm...@google.com <cm...@google.com> #26
Branch: master
commit 76d14b580f08fc3f84aaf3ebabdb7197bfbfcb2b
Author: Alex Klyubin <klyubin@google.com>
Date: Tue Jul 25 13:38:52 2017
Add --pass-encoding parameter to apksigner
When keytool creates a KeyStore or key which is protected with a
password containing non-ASCII characters, keytool may encode the
password using the console's encoding or the JVM default encoding
instead of using the password verbatim, in its Unicode form. In
apksigner 0.5 support was added to handle this issue by having
apksigner try several variants of the password: verbatim/Unicode,
encoded using console encoding, and encoded using JVM default
encoding. Unfortunatly, there is no public API to obtain the
console's encoding. apksigner 0.5 cheated by accessing
Console.encoding field via Reflection API. This is no longer
advisable in Java 9 because access to such private API is brittle
and now leads to JVM warnings spewing on the standard output.
To make apksigner compatible with Java 9, apksigner's behavior is
being changed by this commit. apksigner no longer attempts to detect
console encoding on Java 9. Those users which use non-ASCII password
keystores/keys created by keytool in environments where console
encoding is not the same as the JVM default encoding, such as English
Windows where console encoding is ibm437 and JVM default encoding is
windows-1252, will need to pass in the new --pass-encoding <encoding>
parameter (e.g., --pass-encoding ibm437) to tell apksigner to try
a password variant encoded using that encoding, in addition to trying
the Unicode and JVM default encoding variants of the password.
The --pass-encoding parameter enables apksigner to work with non-ASCII
password keystores/keys created on different OSes and/or in other
locales than the one in which apksigner is running. For example, this
enables apksigner on OSX and Linux (where the console and JVM default
encoding is UTF-8) to use a non-ASCII password keystore created by
keytool on English Windows, where the resulting password is encoded
using the ibm437 or windows-1252 encoding.
Test: Use keytool to create two JKS keystores protected using password
"ab¡äю1" (one where the password is read from the console, the
other where the password is provided on the command-line). Use
apksigner to sign an APK using these keystores, using Java 8 and
Java 9 (revision 181), providing the password via all four
methods supported by apksigner. Do this on Windows 10 (IBM437
console encoding, windows 1252 file/JVM default encoding, OSX
(UTF-8), and Linux (UTF-8).
Bug: 37135737
Bug: 37137869
Change-Id: Ia6fb0706e4bb3f0fd968373d113d457e8c6260c8
M src/apksigner/java/com/android/apksigner/ApkSignerTool.java
M src/apksigner/java/com/android/apksigner/PasswordRetriever.java
M src/apksigner/java/com/android/apksigner/help_sign.txt
cm...@google.com <cm...@google.com> #27
Branch: master
commit d0293c0891d9a945818b72123519455d3d374dd4
Author: Alex Klyubin <klyubin@google.com>
Date: Wed Aug 09 12:44:30 2017
Add missing final keyword
Two constants introduced in commit
9a435f125fd654c7c3ec815111f18988478cdc40 are missing the "final"
keyword. This commit fixes this typo.
Test: bazel test ...
Test: gradlew test
Bug: 37137869
Change-Id: I9a1011b16dfc60aabe494df073f532f17d63e9e5
M src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
cm...@google.com <cm...@google.com> #28
Branch: master
commit 41ca1d3f507de47becdf57f0713f5deab93c645e
Author: Alex Klyubin <klyubin@google.com>
Date: Wed Aug 09 09:30:22 2017
Bump apksigner version to 0.8
Changes since 0.7:
* Java 9 support: apksig and apksigner compile and run on Java 9
* User-friendlier error when unsupported digest or signature
algorithm in JAR signature
* New --pass-encoding parameter to deal with KeyStores and keys
encrypted using non-ASCII passwords. Existing setups with apksigner
and non-ASCII password KeyStores/keys may need to start using this
parameter after the switch to Java 9. See 'apksigner sign' help page
for more information.
* RDNs in PKCS #7 SignerIdentifier are no longer re-encoded (e.g.,
from Utf8String to PrintableString). Instead, the referenced X.509
certificate's Issuer DN is used verbatim.
Test: apksigner version
Bug: 37135737
Bug: 37137869
Bug: 63525618
Change-Id: I4a4f9639a3c1c08b8c89b076e4bed5be6680b79a
M src/apksigner/java/com/android/apksigner/ApkSignerTool.java
ha...@google.com <ha...@google.com> #29
Branch: master
commit 4012e648eab5bfd2d401f2a58977d2e88dcdb884
Author: Alex Klyubin <klyubin@google.com>
Date: Fri Jun 30 09:23:42 2017
Revert "Let signapk access internal APIs under OpenJDK 9 toolchain"
This reverts commit 9cc3c76abd9c8fa159616883e06526d56b5136e5 which
added command-line parameters to the invocation of SignApk to permit
it to access sun.** classes which are not accessible by default in
Java 9. This hack is no longer needed because SignApk no longer needs
this access because of tools/apksig commit
b40d3e4821bc9cb094b0ff13153340e3a0da1b3f which switched APK JAR
signature generation logic away from directly using sun.** classes.
Test: find out -name CtsPkgInstallTinyApp* | xargs rm -Rf
mmma -j74 cts/hostsidetests/appsecurity/test-apps/tinyapp
Test: find out -name CtsPkgInstallTinyApp* | xargs rm -Rf
EXPERIMENTAL_USE_OPENJDK9=target1.8 \
OVERRIDE_ANDROID_JAVA_HOME=<path to Java 9 SDK> \
PATH=${OVERRIDE_ANDROID_JAVA_HOME}/bin:${PATH} \
mmma -j74 cts/hostsidetests/appsecurity/test-apps/tinyapp
Bug: 37137869
Change-Id: I389c366f8a5bed56c496293bc871458adbedb0e8
M core/
ga...@gmail.com <ga...@gmail.com> #30
cm...@google.com <cm...@google.com> #31
ha...@gmail.com <ha...@gmail.com> #32
sa...@gmail.com <sa...@gmail.com> #33
oo...@gmail.com <oo...@gmail.com> #34
lk...@gmail.com <lk...@gmail.com> #35
ma...@gmail.com <ma...@gmail.com> #36 Restricted+
lk...@gmail.com <lk...@gmail.com> #37
accounts. At this moment in time I have no other avenues to assume other
than everyone an every account is involved with all the open source, and
developer access and no contact from Google whatsoever, Be advised this
fuckory is on a short timer. I hope your company is no way involved and you
can provide additional information to put the POS in prison.
beautiful day to all not involved.
lezlie
Lezlie
On Sun, Apr 9, 2023, 8:44 AM <buganizer-system@google.com> wrote:
lk...@gmail.com <lk...@gmail.com> #38
developers at Google. good day to those not involved.
lezlie
Lezlie
On Sun, Apr 9, 2023, 8:44 AM <buganizer-system@google.com> wrote:
da...@gmail.com <da...@gmail.com> #40
bo...@gmail.com <bo...@gmail.com> #41
ga...@freeletics.com <ga...@freeletics.com> #42
Which build tools version was this fixed in?
cm...@google.com <cm...@google.com> #43
This landed in build tools 33.0.2
mr...@gmail.com <mr...@gmail.com> #44
ja...@gmail.com <ja...@gmail.com>
al...@gmail.com <al...@gmail.com> #45
IssueTracker
Assigned to me Starred by me CC'd to me Reported by me
To be verified
Bookmark groups
Saved searches
Hotlists
Create hotlist
Create bookmark group
Browse components
No update yet.
class
files seems to be different
This triggers cache miss and is a big problem we need to solve. Raju, can you find the right person to look into this?
The content of the jar on linux/win is:
Length Date Time Name
--------- ---------- ----- ----
329 01-01-2010 00:00 java/lang/invoke/CallSite.class
433 01-01-2010 00:00 java/lang/invoke/LambdaConversionException.class
1004 01-01-2010 00:00 java/lang/invoke/LambdaMetafactory.class
1155 01-01-2010 00:00 java/lang/invoke/MethodHandle.class
3046 01-01-2010 00:00 java/lang/invoke/MethodHandles$Lookup.class
3480 01-01-2010 00:00 java/lang/invoke/MethodHandles.class
3248 01-01-2010 00:00 java/lang/invoke/MethodType.class
1206 01-01-2010 00:00 java/lang/invoke/SerializedLambda.class
--------- -------
On Mac it is:
Length Date Time Name
--------- ---------- ----- ----
0 01-01-2008 00:00 META-INF/
45 01-01-2008 00:00 META-INF/MANIFEST.MF
0 01-01-2008 00:00 java/
0 01-01-2008 00:00 java/lang/
0 01-01-2008 00:00 java/lang/invoke/
520 01-01-2008 00:00 java/lang/invoke/CallSite.class
1045 01-01-2008 00:00 java/lang/invoke/LambdaConversionException.class
1463 01-01-2008 00:00 java/lang/invoke/LambdaMetafactory.class
2117 01-01-2008 00:00 java/lang/invoke/MethodHandle.class
4777 01-01-2008 00:00 java/lang/invoke/MethodHandles$Lookup.class
5203 01-01-2008 00:00 java/lang/invoke/MethodHandles.class
5275 01-01-2008 00:00 java/lang/invoke/MethodType.class
2127 01-01-2008 00:00 java/lang/invoke/SerializedLambda.class
0 01-01-2008 00:00 ojluni/
0 01-01-2008 00:00 ojluni/src/
0 01-01-2008 00:00 ojluni/src/lambda/
0 01-01-2008 00:00 ojluni/src/lambda/java/
0 01-01-2008 00:00 ojluni/src/lambda/java/java/
0 01-01-2008 00:00 ojluni/src/lambda/java/java/lang/
0 01-01-2008 00:00 ojluni/src/lambda/java/java/lang/invoke/
1484 01-01-2008 00:00 ojluni/src/lambda/java/java/lang/invoke/CallSite.java
2759 01-01-2008 00:00 ojluni/src/lambda/java/java/lang/invoke/LambdaConversionException.java
2213 01-01-2008 00:00 ojluni/src/lambda/java/java/lang/invoke/LambdaMetafactory.java
2109 01-01-2008 00:00 ojluni/src/lambda/java/java/lang/invoke/MethodHandle.java
6432 01-01-2008 00:00 ojluni/src/lambda/java/java/lang/invoke/MethodHandles.java
3573 01-01-2008 00:00 ojluni/src/lambda/java/java/lang/invoke/MethodType.java
2677 01-01-2008 00:00 ojluni/src/lambda/java/java/lang/invoke/SerializedLambda.java
--------- -------
Issue summary
Mentioned issues (5)
P2
core-lambda-stubs.jar are not aligned for Linux and macOS installations as per build-tools;33.0.0
“
xa...@ #2
--
“
ot...@ #15
--
“
ha...@
#29
P1
Renderscipt is broken on apple silicon in build tools 33.0.2
“
cm...@
#31
P3
Different content of core-lambda-stubs.jar leads to build cache misses
“
da...@
#40
Links (11)
“
some hoops
”
dw...@
#4
“
build rules
”
dw...@
#4
“
linux
”
dw...@
#4
“
mac
”
dw...@
#4
“
core-lambda-stubs.jar
shouldn't be in a host-specific build-tools distribution, since it's a device library that should be common across hosts. That would fix this caching issue and let us remove
That being said, I see no reason why the two should be different today. And looking at the aosp-sdk-release
from last week agree -- they both look like the Mac listing above.
Which CI builds did the build-tools packages ship from? My best guess would be that the during the linux build it may have gotten replaced by a different prebuilt due to libcore being in the runtime apex.
rajukulkarni@ what builds do build-tools come from?
To answer Dan's question for 33.0.1 it was released from
- sdk-build-tools : { # T 33.0.1
bid: "9306103",
branch: "git_tm-beta3-release",
target-linux: "sdk_phone_armv7-win_sdk",
target-windows: "sdk_phone_armv7-win_sdk",
target-darwin: "sdk_phone_armv7-sdk_mac",
sign: true,
}
and the artifact is
sdk-repo-{platform_name}-build-tools-{build_id}.zip
sdk
target on ab/master. The sdk build tools still need to be for each host, but I'm surprised to see this stub jar in the build tools zip (per sdk
instead. Over to libcore team for that.
prebuilts/module_sdk/art/current/sdk/java/core-lambda-stubs.jar
. The reason that file does not look much like a standard Jar file is almost certainly because it was generated by Turbine.
I ran m core-lambda-stubs
and checked the out/soong/.intermediates/libcore/core-lambda-stubs
. And found the following
106353782 16 -rw-r--r-- 1 paulduffin primarygroup 15149 Oct 17 18:04 out/soong/.intermediates/libcore/core-lambda-stubs/android_common/turbine/core-lambda-stubs.jar
106353783 16 -rw-r--r-- 1 paulduffin primarygroup 15149 Nov 25 11:10 out/soong/.intermediates/libcore/core-lambda-stubs/android_common/turbine-combined/core-lambda-stubs.jar
106304088 12 -rw-r--r-- 1 paulduffin primarygroup 8511 Nov 25 11:10 out/soong/.intermediates/libcore/core-lambda-stubs/android_common/javac/core-lambda-stubs.jar
106304087 20 -rw-r--r-- 1 paulduffin primarygroup 18163 Nov 25 11:10 out/soong/.intermediates/libcore/core-lambda-stubs/android_common/withres/core-lambda-stubs.jar
- The
turbine
ones don't appear to compress the contents, have no directories or manifests, just the.class
files. - The
javac
one is compressed, includes a manifest, directories and.class
files. - The
withres
one is also compressed, includes a manifest, directories,.class
files and.java
files.
So, it looks as though the linux one is using a turbine
one (possibly via prebuilts) and the mac is using the withres
one.
Which raises a couple of questions:
- Which of the 3 different
core-lambda-stubs.jar
above should be being used in the prebuilts? - Which should be being used in the main Android sdk?
The advantage of using the turbine
one is that it is smaller (even without compression). The advantage of using the withres
is the source is available (assuming that Studio can find it). However, the source is just stubs anyway as the only reason these classes are provided is because the javac
compiler needs them. They are not used by Android at runtime at all so have no implementation.
I think at the end of the day the only thing that really matters is that they are consistent across platforms and there is no reason why they should not be.
I think the question then is probably why the mac build disables prebuilts. Could you look into that Paul?
func TestMain(m *testing.M) {
if runtime.GOOS != "linux" {
// b/145598135 - Generating host snapshots for anything other than linux is not supported.
log.Printf("Skipping as sdk snapshot generation is only supported on linux not %s", runtime.GOOS)
os.Exit(0)
}
os.Exit(m.Run())
}
Switching the Mac to use prebuilts instead of sources in general is probably not the answer here.
Could we add it to the non-host-specific SDK and then get the target that generates the buildtools
to copy the file from the there?
add it to the non-host-specific SDK
Wouldn't that still use the source-built version on mac, and prebuilt on linux?
I've done some restructuring of how the SDK is built. The SDK now isn't host specific, there's just a single sdk target on ab/master.
pa...@google.com pa...@google.com #22Nov 25, 2022 04:54AM Could that not buildcore-lambda-stubs
?pa...@google.com pa...@google.com #23Nov 25, 2022 08:54AM Anton and I have discussed this offline and we think we have a quick solution to the problem.
Assuming that the problem is the inconsistency between the core-lambda-stubs.jar
used on Linux and on Mac then the quickest way to address that is to hard-code "prebuilt_core-lambda-stubs"
instead of "core-lambda-stubs"
. That will force both the Mac build of build-tools
(which currently uses the source) and the Linux build of build-tools
(which currently uses prebuilts) to both use prebuilts.
Chris, are you the right person to take this forward, test it on a Mac and cherry pick it into the appropriate branch? If not could you assign it to whoever is the right person.
[aosp/2318749](tm-dev
ag/I9507eb785bca0fb929dbb587caf0b26455ec9480
I've checked the artifacts of sdk_phone_armv7-sdk_mac
and sdk_phone_armv7-win_sdk
on ab/9406650 (a branch that the change has flowed to that has fixed the issue) and of the sdk and sdk-mac on u release branches.
Now to releasing build tools with the fix
Task :capture:compileDebugRenderscript FAILED dyld[15878]: Library not loaded: '@rpath/libclang_android.dylib' Referenced from: '/Users/gg/Library/Android/sdk/build-tools/33.0.2/llvm-rs-cc' Reason: tried: '/Users/gg/Library/Android/sdk/build-tools/33.0.2/../lib64/libclang_android.dylib' (no such file), '/Users/gg/Library/Android/sdk/build-tools/33.0.2/lib64/libclang_android.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e))), '/Users/gg/Library/Android/sdk/build-tools/33.0.2/../lib64/libclang_android.dylib' (no such file), '/Users/gg/Library/Android/sdk/build-tools/33.0.2/lib64/libclang_android.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e))), '/usr/lib/libclang_android.dylib' (no such file)
Lezlie
On Fri, Mar 24, 2023, 9:17 AM
Replying to this email means your email address will be shared with the team that works on this product.
https://issuetracker.google.com/issues/237299698 Changed
oo...@gmail.com oo...@gmail.com addedcomment #34 : https://issuetracker.google.com/issues/237299698#comment34 I'm facing an error challenge on with SDK build tools on my Handy_T2_EU
Reference Info: 237299698 core-lambda-stubs.jar version 33.0.0 differs on mac vs linux/win component: Android Public Tracker > App Development > SDK
https://issuetracker.google.com/components/192728 status: Fixed reporter:xa...@google.com assignee:cm...@google.com cc:dw...@google.com ,ot...@google.com ,pr...@google.com , and 6 more type: Bug priority: P1 severity: S1 duplicate issue: 237190749, 241546164 https://issuetracker.google.com/issues/237190749 retention: Component default ReportedBy: User https://issuetracker.google.com/issues/241546164 Generated by Google IssueTracker notification system
You're receiving this email because you are subscribed to updates on Google IssueTracker
issue 237299698 . Unsubscribe from this issue. https://issuetracker.google.com/issues/237299698 https://issuetracker.google.com/issues/237299698?unsubscribe=true
Lezlie
On Sun, Apr 9, 2023, 8:44 AM
Replying to this email means your email address will be shared with the team that works on this product.
https://issuetracker.google.com/issues/237299698 Changed
ma...@gmail.com ma...@gmail.com addedcomment #36 : https://issuetracker.google.com/issues/237299698#comment36 redacted
Reference Info: 237299698 core-lambda-stubs.jar version 33.0.0 differs on mac vs linux/win component: Android Public Tracker > App Development > SDK
https://issuetracker.google.com/components/192728 status: Fixed reporter:xa...@google.com assignee:cm...@google.com cc:dw...@google.com ,ot...@google.com ,pr...@google.com , and 6 more type: Bug priority: P1 severity: S1 duplicate issue: 237190749, 241546164 https://issuetracker.google.com/issues/237190749 retention: Component default ReportedBy: User https://issuetracker.google.com/issues/241546164 Generated by Google IssueTracker notification system
You're receiving this email because you have just been removed from any roles on Google IssueTracker
issue 237299698 . https://issuetracker.google.com/issues/237299698
Lezlie
On Sun, Apr 9, 2023, 8:44 AM
Replying to this email means your email address will be shared with the team that works on this product.
https://issuetracker.google.com/issues/237299698 Changed
ma...@gmail.com ma...@gmail.com addedcomment #36 : https://issuetracker.google.com/issues/237299698#comment36 redacted
Reference Info: 237299698 core-lambda-stubs.jar version 33.0.0 differs on mac vs linux/win component: Android Public Tracker > App Development > SDK
https://issuetracker.google.com/components/192728 status: Fixed reporter:xa...@google.com assignee:cm...@google.com cc:dw...@google.com ,ot...@google.com ,pr...@google.com , and 6 more type: Bug priority: P1 severity: S1 duplicate issue: 237190749, 241546164 https://issuetracker.google.com/issues/237190749 retention: Component default ReportedBy: User https://issuetracker.google.com/issues/241546164 Generated by Google IssueTracker notification system
You're receiving this email because you have just been removed from any roles on Google IssueTracker
issue 237299698 . https://issuetracker.google.com/issues/237299698
te...@gmail.com te...@gmail.com #39May 2, 2023 09:14PM
https://issuetracker.google.com/issues?q=id%3A(279644036)
da...@gmail.com da...@gmail.com #40May 8, 2023 10:46PM
https://issuetracker.google.com/issues/241546164
bo...@gmail.com bo...@gmail.com #41Jul 20, 2023 09:22AM
https://issuetracker.google.com/237299698#comment30
ga...@freeletics.com ga...@freeletics.com #42Aug 4, 2023 07:47AM
Which build tools version was this fixed in?
cm...@google.com cm...@google.com #43Aug 4, 2023 07:53AM
This landed in build tools 33.0.2
mr...@gmail.com mr...@gmail.com #44Aug 21, 2023 07:20AM
Update
ja...@gmail.com ja...@gmail.com Aug 28, 2023 07:45AM
deleted
Restricted+
0 B
deleted
Restricted+
0 B
Add comment
Issue metadata
Reporter
xa...@google.com
Type
Bug
Priority
P1
Severity
S1
Status
Fixed
Access
Default access
View
Assignee
cm...@google.com
Verifier
Collaborators
CC
au...@google.com
dw...@google.com
ga...@google.com
ha...@google.com
mi...@google.com
... and 4 more (show all)
AOSP ID
ReportedBy User Found In
Targeted To
Verified In
In Prod
an...@socialmediaemotions.com <an...@socialmediaemotions.com> #46
33.0.2 Does not fix the problem to me.
Is there any updates about this issue?
Description
The mac version has manifest, empty directories, and more importantly the source files. But also the
class
files seems to be differentThis triggers cache miss and is a big problem we need to solve. Raju, can you find the right person to look into this?
The content of the jar on linux/win is:
On Mac it is: