Skip to content

Instantly share code, notes, and snippets.

@shauvik
Created March 15, 2016 19:30
Show Gist options
  • Save shauvik/a5ba86d1978ea73295c6 to your computer and use it in GitHub Desktop.
Save shauvik/a5ba86d1978ea73295c6 to your computer and use it in GitHub Desktop.
PUMA
app="/path/to/app-debug.apk"
TOOLDIR="/path/to/puma"
RESULTSDIR="path/to/results"
echo "** PROCESSING APP " $app
package=`aapt d badging $app | grep package: | awk -F\' '{print $2}'`
appLabel=`aapt d badging $app | grep application-label: | awk -F\' '{print $2}'`
echo $package > $TOOLDIR/app.info
echo $appLabel >> $TOOLDIR/app.info
echo "** RUNNING LOGCAT"
adb logcat &> $RESULTDIR/tool.logcat &
# unlock device
adb shell input keyevent 82
echo "** RUNNING PUMA FOR" $package
cd $TOOLDIR
./setup-phone.sh
date1=$(date +"%s")
./run.sh &> $RESULTDIR$p/tool.log
date2=$(date +"%s")
diff=$(($date2-$date1))
echo "Ran PUMA for $(($diff / 60)) minutes and $(($diff % 60)) seconds."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment