From 4592b0f07a33a129617e6fb23a6aba5853c0abb3 Mon Sep 17 00:00:00 2001
From: Roland Levillain <rpl@google.com>
Date: Wed, 14 Nov 2018 17:53:27 +0000
Subject: [PATCH] Add `file_contexts` for Release Runtime APEX module.

Also rename `file_contexts` for the "Debug" Runtime APEX module
(containing both release and debug variants, as well as additional
tools).

Test: make com.android.runtime
Test: make com.android.runtime.release
Test: make com.android.runtime.debug
Test: art/build/apex/runtests.sh
Bug: 113373927
Change-Id: I6b917d7f5b1734aeb717932081c7b03366ef2774
---
 ...exts => com.android.runtime.debug-file_contexts} |  0
 apex/com.android.runtime.release-file_contexts      | 13 +++++++++++++
 2 files changed, 13 insertions(+)
 rename apex/{com.android.runtime-file_contexts => com.android.runtime.debug-file_contexts} (100%)
 create mode 100644 apex/com.android.runtime.release-file_contexts

diff --git a/apex/com.android.runtime-file_contexts b/apex/com.android.runtime.debug-file_contexts
similarity index 100%
rename from apex/com.android.runtime-file_contexts
rename to apex/com.android.runtime.debug-file_contexts
diff --git a/apex/com.android.runtime.release-file_contexts b/apex/com.android.runtime.release-file_contexts
new file mode 100644
index 000000000..79b87545f
--- /dev/null
+++ b/apex/com.android.runtime.release-file_contexts
@@ -0,0 +1,13 @@
+#############################
+# APEX module manifest.
+#
+/manifest\.json          u:object_r:system_file:s0
+
+#############################
+# System files
+#
+(/.*)?                   u:object_r:system_file:s0
+/bin/dex2oat             u:object_r:dex2oat_exec:s0
+/bin/dexoptanalyzer      u:object_r:dexoptanalyzer_exec:s0
+/bin/profman             u:object_r:profman_exec:s0
+/lib(64)?(/.*)?          u:object_r:system_lib_file:s0
-- 
GitLab