init.debug.rc: enable etm/etm2dram when SJTAG is unlocked
Enables the debug features required an unlocked SJTAG to the section `on property:ro.vendor.sjtag_ap_is_unlocked=true`, so they can be enabled when 1. PD is available on non-fused device on boot, or 2. PD is available after betterbug acquires it from the corp service. Bug: 299043634 Change-Id: I43f8364d7624af1d98b79afffeb1c6dc8bb6faf0
This commit is contained in:
parent
5030b8465a
commit
0184b772a9
3 changed files with 28 additions and 1 deletions
15
conf/init.check_ap_pd_auth.sh
Normal file
15
conf/init.check_ap_pd_auth.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/vendor/bin/sh
|
||||
|
||||
# This script sets up `ro.vendor.sjtag_ap_is_unlocked` for the non-fused
|
||||
# device. For a fused device, this property should be set by
|
||||
# betterbug->ss-restart-detector when PD is acquired.
|
||||
|
||||
SJTAG_STATUS=0x$(cat /sys/devices/platform/sjtag_ap/interface/status)
|
||||
SOFT_LOCK_BIT=4
|
||||
AUTH_PASS_BIT=8
|
||||
|
||||
# Unlocked or locked but auth passed.
|
||||
if test "$((SJTAG_STATUS & (1 << SOFT_LOCK_BIT)))" = 0 -o \
|
||||
"$((SJTAG_STATUS & (1 << AUTH_PASS_BIT)))" != 0 ; then
|
||||
setprop ro.vendor.sjtag_ap_is_unlocked true
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue