2011-05-12 06:46:17 +08:00
|
|
|
#!/bin/sh
|
|
|
|
cd `dirname $0`
|
2011-07-01 21:12:05 +08:00
|
|
|
PROJECT_NAME=hello-android
|
2011-05-12 06:46:17 +08:00
|
|
|
|
|
|
|
# copy file to device (usually takes 10 seconds or more)
|
2011-07-01 21:12:05 +08:00
|
|
|
adb push ./bin/$PROJECT_NAME /data/bin/sample/$PROJECT_NAME || return
|
2011-05-12 06:46:17 +08:00
|
|
|
|
|
|
|
# set execute permission
|
|
|
|
adb shell chmod 777 /data/bin/sample/$PROJECT_NAME || return
|
|
|
|
|
|
|
|
# execute our application
|
|
|
|
adb shell /data/bin/sample/$PROJECT_NAME || return
|
|
|
|
|
|
|
|
# get image result from device
|
2011-07-01 21:12:05 +08:00
|
|
|
adb pull /mnt/sdcard/HelloAndroid.png || return
|