Open remay opened 3 years ago
'command -v adb` to discover the path to adb, if it is installed (builtin in both bash (ubuntu) and ash (tce), our 2 targets)
try_adb=1
echo "Waiting for a connected Hudl in flash mode ..."
while ! lsusb -d 2207:310b 1>/dev/null 2>&1
do
lsusb -d 0e79: 1>/dev/null 2>&1
if [ $? -eq 0 ]
then
if [ $try_adb -eq 1 ]
then
# See if we can use adb to put us in flash mode:
echo "Trying to reboot Hudl into flash mode using adb (needs USB debugging enabled)."
echo "If this fails then do it manually by holding vol+ and pressing reset."
adb reboot bootloader
# TODO Should check for availability of adb command, and shoudl catch failure here
sleep 5
fi
try_adb=0
fi
done
echo "Hudl in flash mode, starting to flash ..."
If the Huddle has USB debugging enabled and the host has
adb
installed then hudl-flash.sh should useadb reboot bootloader
to put the attached Hudl into the state ready to flash.