Skip to content
Snippets Groups Projects
Commit 6ad3c891 authored by xshu's avatar xshu
Browse files

Wifi hal - Firmware dump permissions

we are aiming to improve logging performance by having wifi hal
directly write to the flash.

Wifi hal need to be able to create, write, and delete files in
a directory. This will be restricted to userdebug and eng builds only.

Bug: 70170285
Test: compile, run on device
Change-Id: Id0cd317411f4c393d7529aa31b501046d7350edb
parent d496ea7a
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,7 @@
thermalserviced_tmpfs
timezone_service
tombstoned_java_trace_socket
tombstone_wifi_data_file
update_engine_log_data_file
vendor_init
vold_prepare_subdirs
......
......@@ -349,6 +349,7 @@
/data/app-private(/.*)? u:object_r:apk_private_data_file:s0
/data/app-private/vmdl.*\.tmp(/.*)? u:object_r:apk_private_tmp_file:s0
/data/tombstones(/.*)? u:object_r:tombstone_data_file:s0
/data/vendor/tombstones/wifi(/.*)? u:object_r:tombstone_wifi_data_file:s0
/data/local/tmp(/.*)? u:object_r:shell_data_file:s0
/data/media(/.*)? u:object_r:media_rw_data_file:s0
/data/mediadrm(/.*)? u:object_r:media_data_file:s0
......
......@@ -163,6 +163,8 @@ type adb_data_file, file_type, data_file_type, core_data_file_type;
type anr_data_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
# /data/tombstones - core dumps
type tombstone_data_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
# /data/vendor/tombstones/wifi - vendor wifi dumps
type tombstone_wifi_data_file, file_type, data_file_type;
# /data/app - user-installed apps
type apk_data_file, file_type, data_file_type, core_data_file_type;
type apk_tmp_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
......
......@@ -23,3 +23,9 @@ allow hal_wifi self:netlink_generic_socket create_socket_perms_no_ioctl;
allow hal_wifi sysfs_wlan_fwpath:file { w_file_perms };
# allow hal_wifi to access /proc/modules to check if Wi-Fi driver is loaded
allow hal_wifi proc_modules:file { getattr open read };
# allow hal_wifi to write into /data/vendor/tombstones/wifi
userdebug_or_eng(`
allow hal_wifi_server tombstone_wifi_data_file:dir rw_dir_perms;
allow hal_wifi_server tombstone_wifi_data_file:file create_file_perms;
')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment