On userdebug & eng builds, change the owner/group of SJTAG sysfs files that need to be written to 'system'. This became necessary after these files were migrated out of DebugFS, as write access to the world is no longer supported. Bug: 188817349 Test: Ensure that the writable files in the following directories have 'system' as their owner & group: /sys/devices/platform/sjtag_ap/interface/ /sys/devices/platform/sjtag_gsa/interface/ Signed-off-by: Peter Csaszar <pcsaszar@google.com> Change-Id: I4420fccd92522a48f44b80bd0a19f4a20eb32442
33 lines
1.5 KiB
Text
33 lines
1.5 KiB
Text
on early-init
|
|
mount debugfs /sys/kernel/debug /sys/kernel/debug
|
|
|
|
# SJTAG
|
|
on init
|
|
chown system system /sys/devices/platform/sjtag_ap/interface/access_lvl
|
|
chown system system /sys/devices/platform/sjtag_ap/interface/auth
|
|
chown system system /sys/devices/platform/sjtag_ap/interface/begin
|
|
chown system system /sys/devices/platform/sjtag_ap/interface/dbg_domain
|
|
chown system system /sys/devices/platform/sjtag_ap/interface/dbg_itvl
|
|
chown system system /sys/devices/platform/sjtag_ap/interface/end
|
|
chown system system /sys/devices/platform/sjtag_ap/interface/pubkey
|
|
chown system system /sys/devices/platform/sjtag_gsa/interface/access_lvl
|
|
chown system system /sys/devices/platform/sjtag_gsa/interface/auth
|
|
chown system system /sys/devices/platform/sjtag_gsa/interface/begin
|
|
chown system system /sys/devices/platform/sjtag_gsa/interface/dbg_domain
|
|
chown system system /sys/devices/platform/sjtag_gsa/interface/dbg_itvl
|
|
chown system system /sys/devices/platform/sjtag_gsa/interface/end
|
|
chown system system /sys/devices/platform/sjtag_gsa/interface/pubkey
|
|
|
|
# Bluetooth
|
|
on post-fs-data
|
|
chown bluetooth system /dev/logbuffer_btlpm
|
|
chown bluetooth system /dev/logbuffer_tty16
|
|
|
|
on property:vendor.debug.ramdump.force_crash=true
|
|
write /sys/kernel/pixel_debug/trigger "null"
|
|
|
|
on property:power.battery_input.suspended=true
|
|
write /sys/kernel/debug/google_charger/input_suspend 1
|
|
|
|
on property:power.battery_input.suspended=false
|
|
write /sys/kernel/debug/google_charger/input_suspend 0
|