Home | History | Annotate | Download | only in labpretest

Lines Matching refs:device

7 # session.  It puts a device into bootloader mode, reboots into bootloader mode,
8 # determines device type, erases user cache, flashes a generic userdata image,
24 device=''
31 d) device="$OPTARG";;
35 h) echo "options: [-d <device ID>, -i <loop count>, -m <monkey events> -x (skips monkey)]"; exit;;
66 # device
80 battery=`$ADB -s $device shell dumpsys battery | tr -d '\r' | awk '/level:/ {print $2}'`
86 battery=`$ADB -s $device shell dumpsys battery | tr -d '\r' | awk '/level:/ {print $2}'`
99 # Blocks until device is in fastboot mode or
103 # device
113 while [ "$device" != "$fdevice" -a $n -le 30 ]; do
115 fdevice=`$FASTBOOT devices | sed -n "s/\($device\).*/\1/ p"`
119 log_print "device time out after $loop iterations"
122 log_print "device returned and available"
127 # reboots device into fastboot mode or
130 # device
140 $ADB -s $device reboot bootloader
145 # reboots device into fastboot mode or
148 # device
158 $FASTBOOT -s $device reboot-bootloader
163 # reboots device from fastboot to adb or
166 # device
177 $FASTBOOT -s $device reboot
178 $ADB -s $device wait-for-device
182 # reboots device from fastboot to adb or
185 # device
194 log_print "waiting for device to finish booting"
195 local result=$($ADB -s $device shell getprop dev.bootcomplete)
201 result=$($ADB -s $device shell getprop dev.bootcomplete)
211 # device
221 $FASTBOOT -s $device $1 $2 $3
229 # device
239 $FASTBOOT -s $device flash $1 $2
247 # device
257 $ADB -s $device $1 $2 $3 $4 $5
263 # bootfile, then flashes device
270 # device
295 log_print "downloading bootloader image to $device"
302 # radiofile and flashes device
309 # device
334 log_print "downloading radio image to $device"
347 # device
368 log_print "downloading system image to $device"
396 # flashes the device
418 #device has been rebooted
419 adb_command wait-for-device
423 # gets the device product type and sets product
429 # device
438 log_print "getting device product type"
439 product=`$FASTBOOT -s $device getvar product 2>&1 | sed -n 's/product: \([a-z]*\)\n*/\1/ p'`
441 log_print "device product id not supported: $product"
445 log_print "using $product as device product id"
460 #checks to see if the called device is available
461 if [ "$device" != "" ]; then
462 tmpdevice=`$ADB devices | sed -n "s/\($device\).*/\1/ p"`
463 if [ "$device" != "$tmpdevice" ]; then
464 tmpdevice=`$FASTBOOT devices | sed -n "s/\($device\).*/\1/ p"`
465 if [ "$device" != "$tmpdevice" ]; then
466 echo "Warning: device not found... $device"
469 echo "'Device '$device' found!'"
475 device=`$ADB devices | sed -n 's/.*\(^[0-9A-Z]\{2\}[0-9A-Z]*\).*/\1/ p'`
476 if [ `echo $device | wc -w` -ne 1 ]; then
477 echo 'There is more than one device found,'
478 echo 'please pass the correct device ID in as a parameter.'
482 if [ "$device" == "" ]; then
483 echo 'Device not found via adb'
484 device=`$FASTBOOT devices | sed -n 's/.*\(^[0-9A-Z]\{2\}[0-9A-Z]*\).*/\1/ p'`
485 if [ `echo $device | wc -w` -ne 1 ]; then
486 echo "There is more than one device available,"
487 echo "please pass the correct device ID in as a parameter."
490 if [ "$device" == "" ]; then
491 echo 'Device not found via fastboot, please investigate'
494 echo 'Device '$device' found!'
497 echo 'Hammering on '$device
500 echo 'Hammering on '$device
517 echo ________________ $(date +'%D %T') - $loop - $device ______________________
528 #flashing the device
531 #preping device for monkey run
537 log_print "waiting for device to finish booting"
538 result=$($ADB -s $device shell getprop dev.bootcomplete)
544 result=$($ADB -s $device shell getprop dev.bootcomplete)
550 result=$($ADB -s $device shell pm path android)
556 result=$($ADB -s $device shell pm path android)
569 $ADB -s $device shell monkey -p com.android.alarmclock -p com.android.browser -p com.android.calculator2 -p com.android.calendar -p com.android.camera -p com.android.contacts -p com.google.android.gm -p com.android.im -p com.android.launcher -p com.google.android.apps.maps -p com.android.mms -p com.android.music -p com.android.phone -p com.android.settings -p com.google.android.street -p com.android.vending -p com.google.android.youtube -p com.android.email -p com.google.android.voicesearch -c android.intent.category.LAUNCHER --ignore-security-exceptions -s $seed $MEVENTS
576 log_print "device $device has returned, testing completed, count = $loop"
577 echo `echo "Device $device has returned, testing completed, count = $loop." > $ROOT/$device.log`
579 log_print "device $device has returned, rinse and repeat count = $loop"
580 echo `echo "Device $device has returned, rinse and repeat count = $loop." > $ROOT/$device.log`