/etc/init/android-tools-adbd-reboot-watcher.conf is in android-tools-adbd 5.1.1r36+git20160322-0ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # Watchdog observing android reboot property.
# This is used by adbd to signal user asked for reboot
# Give android 1 second to complete its reboot before
# taking down also Ubuntu
start on android-container sys.powerctl=reboot*
task
script
VAL=$(env | grep sys.powerctl=)
sleep 1
case ${VAL##*=} in
reboot,)
/sbin/reboot
;;
reboot,recovery)
/sbin/reboot -f recovery
;;
reboot,bootloader)
/sbin/reboot -f bootloader
;;
reboot,poweroff)
/sbin/poweroff
;;
reboot,*)
/sbin/reboot
;;
esac
end script
|