Merge "Update CTS shims" into nyc-dev

This commit is contained in:
TreeHugger Robot
2016-06-15 01:29:41 +00:00
committed by Android (Google) Code Review
6 changed files with 28 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -62,6 +62,27 @@ LOCAL_FULL_MANIFEST_FILE := $(gen)
include $(BUILD_PACKAGE)
###########################################################
# Variant: Privileged app upgrade w/ the wrong SHA
include $(CLEAR_VARS)
# this needs to be a privileged application
LOCAL_PRIVILEGED_MODULE := true
LOCAL_MODULE_TAGS := optional
LOCAL_SDK_VERSION := current
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_DEX_PREOPT := false
# anything to make this package's SHA different from CtsShimPrivUpgrade
LOCAL_AAPT_FLAGS := --version-name WrongSHA
LOCAL_PACKAGE_NAME := CtsShimPrivUpgradeWrongSHA
LOCAL_MANIFEST_FILE := shim_priv_upgrade/AndroidManifest.xml
include $(BUILD_PACKAGE)
###########################################################
# Variant: System app

View File

@@ -7,12 +7,14 @@ NOTE: The need to include a binary on the system image may be deprecated if a
solution involving a temporarily writable /system partition is implemented.
build:
$ tapas CtsShim CtsShimPriv CtsShimPrivUpgrade
$ tapas CtsShim CtsShimPriv CtsShimPrivUpgrade CtsShimPrivUpgradeWrongSHA
$ m
local testing:
$ cp $OUT/system/priv-app/CtsShimPrivUpgrade/CtsShimPrivUpgrade.apk \
cts/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp
$ cp $OUT/system/priv-app/CtsShimPrivUpgradeWrongSHA/CtsShimPrivUpgradeWrongSHA.apk \
cts/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp
$ cp $OUT/system/priv-app/CtsShimPriv/CtsShimPriv.apk \
frameworks/base/packages/CtsShim
$ cp $OUT/system/app/CtsShim/CtsShim.apk \

View File

@@ -22,6 +22,9 @@
<uses-sdk android:minSdkVersion="24"
android:targetSdkVersion="24" />
<restrict-update
android:hash="__CAN_NOT_BE_UPDATED__" />
<application
android:hasCode="false"
tools:ignore="AllowBackup,MissingApplicationIcon" >

View File

@@ -22,7 +22,7 @@
<uses-sdk android:minSdkVersion="24"
android:targetSdkVersion="24" />
<restrict-upgrade
<restrict-update
android:hash="__HASH__" />
<application