diff options
Diffstat (limited to 'bugmailer/bugmailer.sh')
-rwxr-xr-x | bugmailer/bugmailer.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/bugmailer/bugmailer.sh b/bugmailer/bugmailer.sh index 9fdc0d1f..ba8eeb7b 100755 --- a/bugmailer/bugmailer.sh +++ b/bugmailer/bugmailer.sh @@ -3,6 +3,17 @@ timestamp=`date +'%Y-%m-%d-%H-%M-%S'` storagePath="$EXTERNAL_STORAGE/bugreports" bugreport=$storagePath/bugreport-$timestamp +screenshotPath="$EXTERNAL_STORAGE/Pictures/Screenshots" +screenshot=$screenshotPath/Screenshot_$timestamp.png + +# check screen shot folder +if [ ! -e $screenshotPath ]; then + mkdir $screenshotPath +fi + +# take screen shot +# we run this as a bg job in case screencap is stuck +/system/bin/screencap -p $screenshot & # run bugreport /system/bin/dumpstate -o $bugreport $@ @@ -10,7 +21,8 @@ bugreport=$storagePath/bugreport-$timestamp # make files readable chown root.sdcard_rw $bugreport.txt +chown root.sdcard_rw $screenshot # invoke send_bug to look up email accounts and fire intents # make it convenient to send bugreport to oneself -/system/bin/send_bug $bugreport.txt +/system/bin/send_bug $bugreport.txt $screenshot |