1# To trigger native watchdog on install of version 300000000 of
2# the com.android.tzdata apex:
3# $ adb shell setprop persist.debug.trigger_watchdog.apex com.android.tzdata@300000000
4apex=/apex/`/system/bin/getprop persist.debug.trigger_watchdog.apex`
5/system/bin/log -t TriggerWatchdog "Checking for presence of $apex"
6/system/bin/setprop debug.trigger_watchdog.status check
7if [ -a $apex ]
8then
9    /system/bin/log -t TriggerWatchdog "Detected presence of $apex"
10    /system/bin/log -t TriggerWatchdog "KILLING SYSTEM SERVER"
11    /system/bin/setprop debug.trigger_watchdog.status kill
12    while :
13    do
14        /system/bin/pkill system_server
15        sleep 1
16    done
17fi
18