From 7de88d73b6c2a529bc2d898d1ea2cfc041f17c35 Mon Sep 17 00:00:00 2001 From: Songchun Fan Date: Thu, 23 Jan 2020 11:20:00 -0800 Subject: [PATCH] Change selinux path config for oat files We are updating apps' apk path to have a two-level structure. Default apk path of an installed app: Before: /data/app/[packageName]-[randomString]/base.apk After: /data/app/[randomStringA]/[packageName]-[randomStringB]/base.apk As a result, the oat files will be two levels below /data/app. Test: manual BUG: 148237378 Change-Id: If8e1fed46096f2e5f4150f6eedf74af76ac9d4b4 --- private/file_contexts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/private/file_contexts b/private/file_contexts index 3e36cd684..77a694115 100644 --- a/private/file_contexts +++ b/private/file_contexts @@ -480,7 +480,10 @@ /data/apex/active/(.*)? u:object_r:staging_data_file:s0 /data/apex/backup/(.*)? u:object_r:staging_data_file:s0 /data/app(/.*)? u:object_r:apk_data_file:s0 +# Traditional /data/app/[packageName]-[randomString]/base.apk location /data/app/[^/]+/oat(/.*)? u:object_r:dalvikcache_data_file:s0 +# /data/app/[randomStringA]/[packageName]-[randomStringB]/base.apk layout +/data/app/[^/]+/[^/]+/oat(/.*)? u:object_r:dalvikcache_data_file:s0 /data/app/vmdl[^/]+\.tmp(/.*)? u:object_r:apk_tmp_file:s0 /data/app/vmdl[^/]+\.tmp/oat(/.*)? u:object_r:dalvikcache_data_file:s0 /data/app-private(/.*)? u:object_r:apk_private_data_file:s0