15 Commits

Author SHA1 Message Date
Dario Freni
fa54812b1f Convert Android.mk to Android.bp for CtsShim*
Bug: 138429615
Test: File was mostly auto-generated via `androidmk`, except the
manifest generation bit. All modules verified to be compiling, and
correct hash verified beign present in the CtsShimPriv manifest:

$ sha512sum -b \
out/soong/.intermediates/frameworks/base/packages/CtsShim/build/CtsShimPrivUpgrade/android_common/CtsShimPrivUpgrade.apk
88828701aa191d9cfd7fe839bc0d0ba159e3c21dd85fb5bcd7d15e9e66ea7d88d8f6e2369a911b567571a6750e424f3c1424a927f8fde559535c7329778b7eb9

$ sha512sum -b \
out/soong/.intermediates/frameworks/base/packages/CtsShim/build/CtsShimPrivUpgradeWrongSHA/android_common/CtsShimPrivUpgradeWrongSHA.apk
55df1add673f13671e35de14540b427320f52fafff593c56e6dcc81d8b4fbde508d596edf8a326f764c58b70bcb94b63c6baacba1f8c6e4940c179a77dfc1ab1

$ aapt2 dump xmltree --file AndroidManifest.xml \
out/soong/.intermediates/frameworks/base/packages/CtsShim/build/CtsShimPriv/android_common/CtsShimPriv.apk \
| grep hash
        A:
	http://schemas.android.com/apk/res/android:hash(0x01010526)="88828701aa191d9cfd7fe839bc0d0ba159e3c21dd85fb5bcd7d15e9e66ea7d88d8f6e2369a911b567571a6750e424f3c1424a927f8fde559535c7329778b7eb9"
	(Raw:
	"88828701aa191d9cfd7fe839bc0d0ba159e3c21dd85fb5bcd7d15e9e66ea7d88d8f6e2369a911b567571a6750e424f3c1424a927f8fde559535c7329778b7eb9")

Change-Id: Ie6e0df9f4f1365b5194e9748b325b421f838c65b
2019-10-28 16:28:07 +00:00
Victor Hsieh
a0f95e3d31 Keep CtsShimPriv's v2/v3 signature
The build system silently destroys APK's v2/v3 signature, even with the
PRESIGNED one.  This change prevents that.

Test: apksigner shows v2/v3 signature are reserved (after manual copy to
      the prebuilts)
Bug: 133505716
Change-Id: I34bab87157400b36bdf6a62f3c692523fcf2911c
2019-05-29 13:42:28 -07:00
Todd Kennedy
dc65b65666 Change target SDK to '28'
am: b0103b5ebb

Change-Id: If4e9acb9fef17a38013d532196a06091446f5bb2
2019-03-13 16:49:14 -07:00
Todd Kennedy
b0103b5ebb Change target SDK to '28'
Bug: 121306802
Test: none
Change-Id: I3e7302ab42987c177f9e538fd7fdf66c35f0bb79
2019-03-13 13:37:33 -07:00
Colin Cross
f5c86dc1c1 Remove workarounds for b/79755007
aapt2 now recognizes these manifest elements.

Bug: 79755007
Test: m checkbuild
Change-Id: I2718fc973e08e7f5226b009807312bd534216f8d
2018-09-13 22:25:58 -07:00
Colin Cross
2f4bf5423d Use AAPT2 for more modules with manifest validation errors
Add LOCAL_AAPT_FLAGS += --warn-manifest-validation to the modules
that have manifests that AAPT2 can't parse.

Bug: 79755007
Test: m checkbuild
Change-Id: I5f20ca582e481f7dac7b6a236662a2d1f47ea9fa
2018-05-26 10:32:26 -07:00
Colin Cross
940b98ee4e Disable AAPT2 for modules that use missing features
Use LOCAL_USE_AAPT2 := false to disable AAPT2 for modules that
use features that are not implemented in AAPT2.

Fixes:
frameworks/base/core/tests/coretests/apks/install_multi_package/AndroidManifest.xml:46: error: unexpected element <package> found in <manifest>.
frameworks/base/core/tests/coretests/apks/install_multi_package/AndroidManifest.xml:82: error: unexpected element <package> found in <manifest>.
frameworks/base/core/tests/coretests/apks/install_verifier_bad/AndroidManifest.xml:19: error: unexpected element <package-verifier> found in <manifest>.
frameworks/base/core/tests/coretests/apks/install_verifier_good/AndroidManifest.xml:19: error: unexpected element <package-verifier> found in <manifest>.
frameworks/base/packages/CtsShim/build/shim/AndroidManifest.xml:25: error: unexpected element <restrict-update> found in <manifest>.
frameworks/base/tests/ActivityTests/AndroidManifest.xml:42: error: unexpected element <preferred> found in <manifest><application><activity>.
out/target/common/obj/APPS/CtsShimPriv_intermediates/AndroidManifest.xml:25: error: unexpected element <restrict-update> found in <manifest>.
frameworks/base/core/tests/coretests/AndroidManifest.xml:26: error: unexpected element <meta-data> found in <manifest><permission>.
...

Bug: 79755007
Test: m FORCE_AAPT2=true java
Change-Id: I393b697c521ab2a4fbc00b29a43aed6b4729b9a8
2018-05-16 09:34:26 -07:00
Dan Willemsen
4888b1f6f0 Convert to Soong
See build/soong/README.md for more information.

Test: m libframeworks_coretests_jni
Test: m FrameworkCoreTests_install
Test: m libshim_jni
Test: m CtsShimPrivUpgrade
Test: m libfilterfw
Test: m PMTest_Java_dual
Test: m libdefcontainer_jni
Test: m libperftestscore_jni
Test: m libpmtest32 libpmtest64
Test: m libprintspooler_jni
Test: m libsmartcamera_jni
Test: m idmap
Test: m libdrmframework_jni
Test: m libdvr_loader com.google.vr.platform com.google.vr.platform.xml
Test: m libfilterpack_imageproc libfilterpack_base
Test: m libwebviewchromium_loader
Test: m shared_mem_test
Test: m test-touchlag
Change-Id: I868561dd237fa28647896d59049ab9260373ada1
2018-05-14 16:47:02 -07:00
Winston Man
d5583fafa7 Update pre-built apks in platform
Now include arm and x86 apks from built server

CtsShim (8.1.0-4396705)

./packages/CtsShim/apk/arm/CtsShim.apk
package: name='com.android.cts.ctsshim'
versionCode='27'
versionName='8.1.0-4396705'
platformBuildVersionName='8.1.0'
sdkVersion:'24'
targetSdkVersion:'24'

./packages/CtsShim/apk/arm/CtsShimPriv.apk
package: name='com.android.cts.priv.ctsshim'
versionCode='27'
versionName='8.1.0-4396705'
platformBuildVersionName='8.1.0'
sdkVersion:'24'
targetSdkVersion:'24'

./packages/CtsShim/apk/x86/CtsShim.apk
package: name='com.android.cts.ctsshim'
versionCode='27'
versionName='8.1.0-4396705'
platformBuildVersionName='8.1.0'
sdkVersion:'24'
targetSdkVersion:'24'

./packages/CtsShim/apk/x86/CtsShimPriv.apk
package: name='com.android.cts.priv.ctsshim'
versionCode='27'
versionName='8.1.0-4396705'
platformBuildVersionName='8.1.0'
sdkVersion:'24'
targetSdkVersion:'24'

Built here:
https://android-build.googleplex.com/builds/branch-dashboard/ub-ctsshim-dev?build_id=4396705

Final OC-MR1 drop for Oct 19th.

This build IS suitable for public release.

Bug: 64504762

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.PrivilegedUpdateTests
Test: gts-tradefed run commandAndExit gts-dev --module GtsPackageManagerHostTestCases
Change-Id: I9a439f7287a8d3703cf014c7c03df2348a384a80
2017-10-17 18:02:48 +01:00
Winston Man
0e68a3ec0a Update CtsShim with multiArch
Add an empty .so to CTS for testing multiArch upgrade
Pre-built apk will be updated separately after this is merged
Testing build command will be updated later

Bug: 64504762
Test: all related cts and gts pass
Test: pre-built passed on all arch, including x86_64
Test: gts-tradefed run commandAndExit gts-dev --module GtsPackageManagerHostTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.PrivilegedUpdateTests
Change-Id: I5abfe06de0bd730b5cdc317df344b7567d50aff6
2017-10-13 20:18:53 +00:00
Todd Kennedy
0d0b59c1e1 Update CTS shims
* define a update hash such that com.android.cts.priv.ctsshim can't
  be updated
* create a new APK to verify that <restrict-update> works as expected

Bug: 29311441
Change-Id: I61f3ae3dbd9c79b2dcdfbc30757af0f9a669fce6
2016-06-14 12:46:34 -07:00
Dan Willemsen
06b93912d5 CtsShim: Support building with tapas
This way the build server can build these apks, instead of the manual
process that was described in the README.

Bug: 29122339
Change-Id: I2d3d9924da908d501d3b1b07b4a317f8ad6f413f
2016-06-08 15:08:04 -07:00
Todd Kennedy
317d352de3 New non-priv prebuilt
Need to target API 24 and not 'N'

Bug: 29116156
Change-Id: Iec215f41147ca13e955b02dc57eaabee89589cf0
2016-06-06 09:38:49 -07:00
Todd Kennedy
51e458ebd0 New prebuilt
Need to target API 24 and not 'N'. Also made a small change to the docs

Bug: 29116156
Change-Id: I21c37aa04a4471ca6b3f7727e470129a78f92cf0
2016-06-03 10:16:12 -07:00
Todd Kennedy
20047d74d5 use prebuilt for the shim
The testing shim should be included as a prebuilt. This allows
us to destroy the signing key. This means that the shim can never
be upgraded in the field; aside from its intended purpose in
a CTS test.

Bug: 28398205
Change-Id: I033835d227416ff8aa6602abfc8b977c74cb666d
2016-05-02 14:24:00 -07:00