• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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        pid=`pidof system_server`
15        if [ ! -z "$pid" ]
16        then
17            /system/bin/log -t TriggerWatchdog "Killing system_server pid=$pid ..."
18            kill $pid
19        fi
20        sleep 1
21    done
22fi
23