Add /data/misc/a11ytrace folder to store accessibility trace files.

Bug: 157601519
Test: adb shell cmd accessibility start-trace
      adb shell cmd accessibility stop-trace
Change-Id: Id4224cee800fe3e10f33794c96048366a0bf09bb
This commit is contained in:
Hongming Jin 2021-02-09 12:03:40 -08:00
parent 23bb01756e
commit 58f83415ea
5 changed files with 20 additions and 0 deletions

View file

@ -11,6 +11,12 @@ allow dumpstate system_file:file lock;
allow dumpstate storaged_exec:file rx_file_perms;
# /data/misc/a11ytrace for accessibility traces
userdebug_or_eng(`
allow dumpstate accessibility_trace_data_file:dir r_dir_perms;
allow dumpstate accessibility_trace_data_file:file r_file_perms;
')
# /data/misc/wmtrace for wm traces
userdebug_or_eng(`
allow dumpstate wm_trace_data_file:dir r_dir_perms;

View file

@ -7,6 +7,9 @@ type storaged_data_file, file_type, data_file_type, core_data_file_type;
# /data/misc/wmtrace for wm traces
type wm_trace_data_file, file_type, data_file_type, core_data_file_type;
# /data/misc/a11ytrace for accessibility traces
type accessibility_trace_data_file, file_type, data_file_type, core_data_file_type;
# /data/misc/perfetto-traces for perfetto traces
type perfetto_traces_data_file, file_type, data_file_type, core_data_file_type;

View file

@ -557,6 +557,7 @@
# Misc data
/data/misc/adb(/.*)? u:object_r:adb_keys_file:s0
/data/misc/a11ytrace(/.*)? u:object_r:accessibility_trace_data_file:s0
/data/misc/apexdata(/.*)? u:object_r:apex_module_data_file:s0
/data/misc/apexdata/com\.android\.art(/.*)? u:object_r:apex_art_data_file:s0
/data/misc/apexdata/com\.android\.permission(/.*)? u:object_r:apex_permission_data_file:s0

View file

@ -48,6 +48,12 @@ allow shell perfetto:process signal;
# Allow shell to run adb shell cmd stats commands. Needed for CTS.
binder_call(shell, statsd);
# Allow shell to read and unlink traces stored in /data/misc/a11ytraces.
userdebug_or_eng(`
allow shell accessibility_trace_data_file:dir rw_dir_perms;
allow shell accessibility_trace_data_file:file { r_file_perms unlink };
')
# Allow shell to read and unlink traces stored in /data/misc/perfetto-traces.
allow shell perfetto_traces_data_file:dir rw_dir_perms;
allow shell perfetto_traces_data_file:file { r_file_perms unlink };

View file

@ -930,6 +930,10 @@ userdebug_or_eng(`
# Allow writing and removing window traces in /data/misc/wmtrace.
allow system_server wm_trace_data_file:dir rw_dir_perms;
allow system_server wm_trace_data_file:file { getattr setattr create unlink w_file_perms };
# Allow writing and removing accessibility traces in /data/misc/a11ytrace.
allow system_server accessibility_trace_data_file:dir rw_dir_perms;
allow system_server accessibility_trace_data_file:file { getattr setattr create unlink w_file_perms };
')
# For AppFuse.