Use dumpstate directly for bugreports.

Use new broadcast flag on dumpstate to notify framework when a
bugreport finished.  Remove older shell scripts.

Bug: 7005318
Change-Id: I2bfb12b65d2b41cec1997d841b73a8199a363a24
diff --git a/device.mk b/device.mk
index 400fc1c..7089490 100644
--- a/device.mk
+++ b/device.mk
@@ -78,11 +78,6 @@
 	hciconfig \
 	hcitool
 
-PRODUCT_PACKAGES += send_bug
-PRODUCT_COPY_FILES += \
-	system/extras/bugmailer/bugmailer.sh:system/bin/bugmailer.sh \
-	system/extras/bugmailer/send_bug:system/bin/send_bug
-
 PRODUCT_PROPERTY_OVERRIDES += \
 	ro.sf.lcd_density=160
 
diff --git a/init.omap4pandaboard.rc b/init.omap4pandaboard.rc
index fe5b9ca..4f24e8c 100644
--- a/init.omap4pandaboard.rc
+++ b/init.omap4pandaboard.rc
@@ -41,7 +41,8 @@
 	write /sys/power/wake_lock hack
 
 # bugreport is triggered by holding down the user button and left mouse button
-service bugreport /system/bin/bugmailer.sh -v
+service bugreport /system/bin/dumpstate -d -p -B \
+        -o /data/data/com.android.shell/files/bugreports/bugreport
 	class main
 	disabled
 	oneshot