Created
January 14, 2013 10:12
-
-
Save wvdschel/4529075 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ADB_DEVICE_COUNT=`adb devices | wc -l` | |
ADB_DEVICE_COUNT=`expr $ADB_DEVICE_COUNT - 2` | |
if [ $ADB_DEVICE_COUNT -gt 0 ] | |
then | |
echo rebooting into fastboot | |
adb reboot bootloader | |
fi | |
#cp /cygdrive/a/qualcomm/out/target/product/msm8960/*.img . | |
echo Waiting for fastboot to list exactly one device | |
while true | |
do | |
FB_DEVICE_COUNT=`fastboot devices | wc -l` | |
#FB_DEVICE_COUNT=`expr $DEVICE_COUNT` | |
if [ $FB_DEVICE_COUNT -eq 1 ] | |
then | |
echo Device found | |
break | |
fi | |
sleep 1 | |
done | |
for i in *.img | |
do | |
echo fastboot flash `basename $i .img` $i | |
fastboot flash `basename $i .img` $i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment