/etc/init/android-tools-adbd.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 31 32 33 34 35 36 37 38 39 | # adbd - run adb debugging shell
#
# This task enables the adb shell
description "adbd"
start on ((android-container persist.sys.usb.config=*adb) and (started lightdm)) or (android-container ro.debuggable=1)
stop on runlevel [06]
normal exit 0 127
respawn
pre-start script
if [ -d /sys/class/android_usb ]
then
if [ -d /sys/class/android_usb/android0/f_ffs ] && \
[ -n "$(cat /sys/class/android_usb/android0/f_ffs/aliases)" ]
then
if ! $(mount|grep -q ^adb)
then
# some devices use the functionfs (i.e. manta)
# we need to mount it to keep adb working
mkdir -p /dev/usb-ffs/adb
chown phablet:phablet -R /dev/usb-ffs
mount -o uid=32011,gid=32011 -t functionfs adb /dev/usb-ffs/adb || true
fi
fi
else
grep -q qemu /proc/cmdline || { stop; exit 0; }
fi
end script
post-stop script
unlink /dev/socket/adbd
end script
exec su - -c adbd
|