summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinston Man <hkman@google.com>2017-09-05 15:12:35 +0100
committerWinston Man <hkman@google.com>2017-10-13 20:18:53 +0000
commit0e68a3ec0ae53ba0656e06436b16968989a4d842 (patch)
tree6ed95a4cf5db9144894a18977642df3c57273464
parent348b13f597ce8604d46992486e9ea7d5bc3cc5ff (diff)
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
-rw-r--r--packages/CtsShim/build/Android.mk11
-rw-r--r--packages/CtsShim/build/jni/Android.mk27
-rw-r--r--packages/CtsShim/build/jni/Shim.c17
-rw-r--r--packages/CtsShim/build/shim_priv/AndroidManifest.xml1
-rw-r--r--packages/CtsShim/build/shim_priv_upgrade/AndroidManifest.xml1
5 files changed, 57 insertions, 0 deletions
diff --git a/packages/CtsShim/build/Android.mk b/packages/CtsShim/build/Android.mk
index 21f0afe573be..ec14d50b371d 100644
--- a/packages/CtsShim/build/Android.mk
+++ b/packages/CtsShim/build/Android.mk
@@ -32,6 +32,9 @@ LOCAL_PACKAGE_NAME := CtsShimPrivUpgrade
LOCAL_MANIFEST_FILE := shim_priv_upgrade/AndroidManifest.xml
+LOCAL_MULTILIB := both
+LOCAL_JNI_SHARED_LIBRARIES := libshim_jni
+
include $(BUILD_PACKAGE)
my_shim_priv_upgrade_apk := $(LOCAL_BUILT_MODULE)
@@ -60,6 +63,9 @@ my_shim_priv_upgrade_apk :=
LOCAL_FULL_MANIFEST_FILE := $(gen)
+LOCAL_MULTILIB := both
+LOCAL_JNI_SHARED_LIBRARIES := libshim_jni
+
include $(BUILD_PACKAGE)
###########################################################
@@ -80,6 +86,9 @@ LOCAL_PACKAGE_NAME := CtsShimPrivUpgradeWrongSHA
LOCAL_MANIFEST_FILE := shim_priv_upgrade/AndroidManifest.xml
+LOCAL_MULTILIB := both
+LOCAL_JNI_SHARED_LIBRARIES := libshim_jni
+
include $(BUILD_PACKAGE)
@@ -99,3 +108,5 @@ LOCAL_MANIFEST_FILE := shim/AndroidManifest.xml
include $(BUILD_PACKAGE)
+###########################################################
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/packages/CtsShim/build/jni/Android.mk b/packages/CtsShim/build/jni/Android.mk
new file mode 100644
index 000000000000..968fc0bb8203
--- /dev/null
+++ b/packages/CtsShim/build/jni/Android.mk
@@ -0,0 +1,27 @@
+#
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libshim_jni
+
+LOCAL_SRC_FILES := Shim.c
+
+LOCAL_SDK_VERSION := 24
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/packages/CtsShim/build/jni/Shim.c b/packages/CtsShim/build/jni/Shim.c
new file mode 100644
index 000000000000..44eb316f50b1
--- /dev/null
+++ b/packages/CtsShim/build/jni/Shim.c
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <jni.h> \ No newline at end of file
diff --git a/packages/CtsShim/build/shim_priv/AndroidManifest.xml b/packages/CtsShim/build/shim_priv/AndroidManifest.xml
index 5195ef79d93b..9bf454c29768 100644
--- a/packages/CtsShim/build/shim_priv/AndroidManifest.xml
+++ b/packages/CtsShim/build/shim_priv/AndroidManifest.xml
@@ -27,6 +27,7 @@
<application
android:hasCode="false"
+ android:multiArch="true"
tools:ignore="AllowBackup,MissingApplicationIcon" >
<!-- These activities don't actually exist; define them just to test the filters !-->
diff --git a/packages/CtsShim/build/shim_priv_upgrade/AndroidManifest.xml b/packages/CtsShim/build/shim_priv_upgrade/AndroidManifest.xml
index b938e3e363d7..023e93e1449e 100644
--- a/packages/CtsShim/build/shim_priv_upgrade/AndroidManifest.xml
+++ b/packages/CtsShim/build/shim_priv_upgrade/AndroidManifest.xml
@@ -24,6 +24,7 @@
<application
android:hasCode="false"
+ android:multiArch="true"
tools:ignore="AllowBackup,MissingApplicationIcon" >
<!-- These activities don't actually exist; define them just to test the filters !-->