Snap for 11571437 from 210f14f36d
to 24Q3-release
Change-Id: Ic14da60f3937ff1de26e2ffc824e0e52f5b79cba
This commit is contained in:
commit
5e3dbdf6d4
5 changed files with 66 additions and 0 deletions
5
betterbug/betterbug.mk
Normal file
5
betterbug/betterbug.mk
Normal file
|
@ -0,0 +1,5 @@
|
|||
PRODUCT_PACKAGES += BetterBugStub
|
||||
PRODUCT_PACKAGES_DEBUG += BetterBug
|
||||
|
||||
PRODUCT_PUBLIC_SEPOLICY_DIRS += device/google/gs-common/betterbug/sepolicy/product/public
|
||||
PRODUCT_PRIVATE_SEPOLICY_DIRS += device/google/gs-common/betterbug/sepolicy/product/private
|
47
betterbug/sepolicy/product/private/better_bug_app.te
Normal file
47
betterbug/sepolicy/product/private/better_bug_app.te
Normal file
|
@ -0,0 +1,47 @@
|
|||
typeattribute better_bug_app coredomain;
|
||||
|
||||
app_domain(better_bug_app)
|
||||
net_domain(better_bug_app)
|
||||
|
||||
allow better_bug_app app_api_service:service_manager find;
|
||||
allow better_bug_app mediaserver_service:service_manager find;
|
||||
allow better_bug_app radio_service:service_manager find;
|
||||
allow better_bug_app system_api_service:service_manager find;
|
||||
|
||||
allow better_bug_app privapp_data_file:file execute;
|
||||
allow better_bug_app privapp_data_file:lnk_file r_file_perms;
|
||||
allow better_bug_app shell_data_file:file r_file_perms;
|
||||
allow better_bug_app shell_data_file:dir r_dir_perms;
|
||||
|
||||
# Allow traceur to pass file descriptors through a content provider to betterbug
|
||||
allow better_bug_app trace_data_file:file { getattr read };
|
||||
|
||||
# Allow betterbug to read profile reports generated by profcollect.
|
||||
userdebug_or_eng(`
|
||||
allow better_bug_app profcollectd_data_file:file r_file_perms;
|
||||
')
|
||||
|
||||
# Allow BetterBug access to WM traces attributes
|
||||
allow better_bug_app wm_trace_data_file:dir r_dir_perms;
|
||||
allow better_bug_app wm_trace_data_file:file getattr;
|
||||
|
||||
# Allow the bug reporting frontend to read the presence and timestamp of the
|
||||
# trace attached to the bugreport (but not its contents, which will go in the
|
||||
# usual bugreport .zip file). This is used by the bug reporting UI to tell if
|
||||
# the bugreport will contain a system trace or not while the bugreport is still
|
||||
# in progress.
|
||||
allow better_bug_app perfetto_traces_bugreport_data_file:dir r_dir_perms;
|
||||
allow better_bug_app perfetto_traces_bugreport_data_file:file { getattr };
|
||||
|
||||
# Allow BetterBug to receive Perfetto traces through the framework
|
||||
# (i.e. TracingServiceProxy) and sendfile them into their private
|
||||
# directories for reporting when network and battery conditions are
|
||||
# appropriate.
|
||||
allow better_bug_app perfetto:fd use;
|
||||
allow better_bug_app perfetto_traces_data_file:file { read getattr };
|
||||
|
||||
# Allow BetterBug to set property to start vendor.touch_dumpstate
|
||||
set_prop(better_bug_app, ctl_start_prop)
|
||||
|
||||
# Allow BetterBug to read system boot reason
|
||||
get_prop(better_bug_app, system_boot_reason_prop)
|
2
betterbug/sepolicy/product/private/seapp_contexts
Normal file
2
betterbug/sepolicy/product/private/seapp_contexts
Normal file
|
@ -0,0 +1,2 @@
|
|||
# BetterBug
|
||||
user=_app isPrivApp=true name=com.google.android.apps.internal.betterbug domain=better_bug_app type=privapp_data_file levelFrom=user
|
1
betterbug/sepolicy/product/public/better_bug_app.te
Normal file
1
betterbug/sepolicy/product/public/better_bug_app.te
Normal file
|
@ -0,0 +1 @@
|
|||
type better_bug_app, domain;
|
|
@ -66,6 +66,17 @@ if [ -f $cfg_file ]; then
|
|||
"insmod") insmod $arg ;;
|
||||
"setprop") setprop $arg 1 ;;
|
||||
"enable") echo 1 > $arg ;;
|
||||
"condinsmod")
|
||||
prop=$(echo $arg | cut -d '|' -f 1)
|
||||
module1=$(echo $arg | cut -d '|' -f 2)
|
||||
module2=$(echo $arg | cut -d '|' -f 3)
|
||||
value=$(getprop $prop)
|
||||
if [[ ${value} == "true" ]]; then
|
||||
insmod ${vendor_modules_dir}/${module1}
|
||||
else
|
||||
insmod ${vendor_modules_dir}/${module2}
|
||||
fi
|
||||
;;
|
||||
"modprobe")
|
||||
case ${arg} in
|
||||
"system -b *" | "system -b")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue