Skip to content

Commit

Permalink
am 7adc8cf: Allow adbd to write to /data/adb
Browse files Browse the repository at this point in the history
* commit '7adc8cfee367abc5cd17a21868b6b0bdb7b06eed':
  Allow adbd to write to /data/adb
  • Loading branch information
nickkral authored and Android Git Automerger committed Nov 5, 2014
2 parents 71e9a7c + 7adc8cf commit f457e57
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions adbd.te
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions file.te
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,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
Expand Down
1 change: 1 addition & 0 deletions file_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f457e57

Please sign in to comment.