Files
rk35xx-android14/system/apex/tests/testdata/trigger_reboot.sh
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

15 lines
545 B
Bash

# To trigger a reboot on install of version 300000000 of
# the com.android.tzdata apex:
# $ adb shell setprop persist.debug.trigger_reboot_after_activation com.android.tzdata@300000000.apex
active_apex=/data/apex/active/`/system/bin/getprop persist.debug.trigger_reboot_after_activation`
if [[ $active_apex == *.apex ]]
then
while :
do
if [ -a $active_apex ]
then
/system/bin/log -t TriggerWatchdog "Detected presence of $active_apex"
/system/bin/setprop sys.powerctl reboot
fi
done
fi