OSDN Git Service

additional scripts for emailing bugreports after capture
[android-x86/system-extras.git] / bugmailer / bugmailer.sh
index c8da909..9fdc0d1 100755 (executable)
@@ -3,8 +3,6 @@
 timestamp=`date +'%Y-%m-%d-%H-%M-%S'`
 storagePath="$EXTERNAL_STORAGE/bugreports"
 bugreport=$storagePath/bugreport-$timestamp
-buildDesc="`/system/bin/getprop ro.build.description`
-(Sent from BugMailer)"
 
 # run bugreport
 /system/bin/dumpstate -o $bugreport $@
@@ -13,9 +11,6 @@ buildDesc="`/system/bin/getprop ro.build.description`
 # make files readable
 chown root.sdcard_rw $bugreport.txt
 
-# send intent to mail it
-/system/bin/am start -a android.intent.action.SEND \
-    -t "application/octet-stream" \
-    -e "subject" "bugreport-$timestamp" \
-    -e "body" "$buildDesc" \
-    --eu "android.intent.extra.STREAM" "file://$bugreport.txt"
+# 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