/usr/sbin/flash-touch-kernel is in initramfs-tools-ubuntu-touch 0.94vivid5.
This file is owned by root:root, with mode 0o755.
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 | #!/bin/sh
BOOT="LNX boot KERNEL"
KERNEL="/boot/vmlinuz-$(uname -r)"
# we dont want to run if FLASH_KERNEL_SKIP is set, the ubuntu
# image build system uses this
if [ -n "$FLASH_KERNEL_SKIP" ]; then
exit 0
fi
# if there is "recovery" on the kernel cmdline, we are most
# likely running in dual boot mode, do nothing then, else we
# trash the android boot.img
grep -q recovery /proc/cmdline && exit 0
case "$1" in
/*)
[ ! -e "$1" ] && echo "E: No kernel at $1" && exit 1
KERNEL="$1"
;;
-h|--help)
echo "usage: $(basename $0) [path to kernel]"
exit 0
;;
esac
for i in $BOOT; do
path=$(find /dev -name "*$i*"|grep disk| head -1)
[ -n "$path" ] && break
done
[ -z "$path" ] && echo "E: No boot partition found !" && exit 1
[ ! -e "$KERNEL" ] && echo "E: No kernel at $KERNEL please provide a proper path" && exit 1
abootimg -u $path -k $KERNEL
|