1# To trigger a reboot on install of version 300000000 of 2# the com.android.tzdata apex: 3# $ adb shell setprop persist.debug.trigger_reboot_after_activation com.android.tzdata@300000000.apex 4active_apex=/data/apex/active/`/system/bin/getprop persist.debug.trigger_reboot_after_activation` 5if [[ $active_apex == *.apex ]] 6then 7 while : 8 do 9 if [ -a $active_apex ] 10 then 11 /system/bin/log -t TriggerWatchdog "Detected presence of $active_apex" 12 /system/bin/setprop sys.powerctl reboot 13 fi 14 done 15fi