summaryrefslogtreecommitdiff
path: root/bugmailer/bugmailer.sh
blob: 9fdc0d1f816abd75a641bc95d27c74158218381d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/system/bin/sh

timestamp=`date +'%Y-%m-%d-%H-%M-%S'`
storagePath="$EXTERNAL_STORAGE/bugreports"
bugreport=$storagePath/bugreport-$timestamp

# run bugreport
/system/bin/dumpstate -o $bugreport $@


# make files readable
chown root.sdcard_rw $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