1#!/bin/sh 2cd `dirname $0` 3PROJECT_NAME=hello-android 4 5# copy file to device (usually takes 10 seconds or more) 6adb push ./bin/$PROJECT_NAME /data/bin/sample/$PROJECT_NAME || return 7 8# set execute permission 9adb shell chmod 777 /data/bin/sample/$PROJECT_NAME || return 10 11# execute our application 12adb shell /data/bin/sample/$PROJECT_NAME || return 13 14# get image result from device 15adb pull /mnt/sdcard/HelloAndroid.png || return 16