Skip to content
Snippets Groups Projects
Commit bdac15aa authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Allow untrusted apps to read apks

Bug: 37281396
Test: cts-tradefed run cts-dev -m CtsContentTestCases --test=android.content.pm.cts.InstallSessionTransferTest
Change-Id: If2094057d1acfbbf007ae108225decd9ad70e459
parent 17533144
Branches
No related tags found
No related merge requests found
...@@ -474,9 +474,12 @@ neverallow appdomain ...@@ -474,9 +474,12 @@ neverallow appdomain
{ create write setattr relabelfrom relabelto append unlink link rename }; { create write setattr relabelfrom relabelto append unlink link rename };
# access tmp apk files # access tmp apk files
neverallow { appdomain -platform_app -priv_app } neverallow { appdomain -untrusted_app_all -platform_app -priv_app }
{ apk_tmp_file apk_private_tmp_file }:dir_file_class_set *; { apk_tmp_file apk_private_tmp_file }:dir_file_class_set *;
neverallow untrusted_app_all { apk_tmp_file apk_private_tmp_file }:{ devfile_class_set dir fifo_file lnk_file sock_file } *;
neverallow untrusted_app_all { apk_tmp_file apk_private_tmp_file }:file ~{ getattr read };
# Access to factory files. # Access to factory files.
neverallow appdomain efs_file:dir_file_class_set write; neverallow appdomain efs_file:dir_file_class_set write;
neverallow { appdomain -shell } efs_file:dir_file_class_set read; neverallow { appdomain -shell } efs_file:dir_file_class_set read;
......
...@@ -41,6 +41,9 @@ allow untrusted_app_all asec_public_file:file { execute execmod }; ...@@ -41,6 +41,9 @@ allow untrusted_app_all asec_public_file:file { execute execmod };
allow untrusted_app_all shell_data_file:file r_file_perms; allow untrusted_app_all shell_data_file:file r_file_perms;
allow untrusted_app_all shell_data_file:dir r_dir_perms; allow untrusted_app_all shell_data_file:dir r_dir_perms;
# Allow to read staged apks.
allow untrusted_app_all { apk_tmp_file apk_private_tmp_file }:file {read getattr};
# Read and write system app data files passed over Binder. # Read and write system app data files passed over Binder.
# Motivating case was /data/data/com.android.settings/cache/*.jpg for # Motivating case was /data/data/com.android.settings/cache/*.jpg for
# cropping or taking user photos. # cropping or taking user photos.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment