diff options
author | Nick Kralevich <nnk@google.com> | 2014-10-20 21:56:02 -0700 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2014-11-05 10:18:31 -0800 |
commit | 7adc8cfee367abc5cd17a21868b6b0bdb7b06eed (patch) | |
tree | 49272f399db1b1e69e690f024a2a899c9bb68759 | |
parent | 2d1650f4075db4f4f458de4c1a4cb5869c44b936 (diff) | |
download | sepolicy-7adc8cfee367abc5cd17a21868b6b0bdb7b06eed.tar.gz |
Allow adbd to write to /data/adb
adbd writes debugging information to /data/adb
when persist.adb.trace_mask is set. Allow it.
Bug: https://code.google.com/p/android/issues/detail?id=72895
(cherry picked from commit 973877dbc1298ee59dce08397ce8425580cbbbb5)
Change-Id: Ida2e0257c97941ab33ccdab59eb2cde95dca344f
-rw-r--r-- | adbd.te | 8 | ||||
-rw-r--r-- | file.te | 2 | ||||
-rw-r--r-- | file_contexts | 1 |
3 files changed, 11 insertions, 0 deletions
@@ -60,6 +60,14 @@ allow adbd gpu_device:chr_file rw_file_perms; allow adbd adb_keys_file:dir search; allow adbd adb_keys_file:file r_file_perms; +userdebug_or_eng(` + # Write debugging information to /data/adb + # when persist.adb.trace_mask is set + # https://code.google.com/p/android/issues/detail?id=72895 + allow adbd adb_data_file:dir rw_dir_perms; + allow adbd adb_data_file:file create_file_perms; +') + # ndk-gdb invokes adb forward to forward the gdbserver socket. allow adbd app_data_file:dir search; allow adbd app_data_file:sock_file write; @@ -50,6 +50,8 @@ type system_data_file, file_type, data_file_type; type install_data_file, file_type, data_file_type; # /data/drm - DRM plugin data type drm_data_file, file_type, data_file_type; +# /data/adb - adb debugging files +type adb_data_file, file_type, data_file_type; # /data/anr - ANR traces type anr_data_file, file_type, data_file_type, mlstrustedobject; # /data/tombstones - core dumps diff --git a/file_contexts b/file_contexts index ec91425..fce051b 100644 --- a/file_contexts +++ b/file_contexts @@ -183,6 +183,7 @@ /data/resource-cache(/.*)? u:object_r:resourcecache_data_file:s0 /data/dalvik-cache(/.*)? u:object_r:dalvikcache_data_file:s0 /data/dalvik-cache/profiles(/.*)? u:object_r:dalvikcache_profiles_data_file:s0 +/data/adb(/.*)? u:object_r:adb_data_file:s0 /data/anr(/.*)? u:object_r:anr_data_file:s0 /data/app(/.*)? u:object_r:apk_data_file:s0 /data/app/vmdl.*\.tmp(/.*)? u:object_r:apk_tmp_file:s0 |