2011-05-12 00:46:17 +02:00
|
|
|
#!/bin/sh
|
|
|
|
cd `dirname $0`
|
|
|
|
PROJECT_NAME=HelloAndroid
|
2011-05-28 20:42:58 +02:00
|
|
|
OUT_DIR=armeabi
|
2011-05-12 00:46:17 +02:00
|
|
|
|
|
|
|
# copy file to device (usually takes 10 seconds or more)
|
2011-05-28 20:42:58 +02:00
|
|
|
adb push ./bin/$OUT_DIR/$PROJECT_NAME /data/bin/sample/$PROJECT_NAME || return
|
2011-05-12 00:46:17 +02: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
|
|
|
|
adb pull /mnt/sdcard/HelloAndroid.png || return
|