add Wipe Battery stats. Generate fstab dynamically.
diff --git a/extendedcommands.c b/extendedcommands.c
index 949b767..3b32c12 100644
--- a/extendedcommands.c
+++ b/extendedcommands.c
@@ -736,6 +736,13 @@
     }
 }
 
+void wipe_battery_stats()
+{
+    ensure_root_path_mounted("DATA:");
+    remove("/data/system/batterystats.bin");
+    ensure_root_path_unmounted("DATA:");
+}
+
 void show_advanced_menu()
 {
     static char* headers[] = {  "Advanced and Debugging Menu",
@@ -744,6 +751,7 @@
     };
 
     static char* list[] = { "Reboot Recovery",
+                            "Wipe Battery Stats",
                             "Key Test",
                             NULL
     };
@@ -759,6 +767,9 @@
                 __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, "recovery");
                 break;
             case 1:
+                wipe_battery_stats();
+                break;
+            case 2:
             {
                 ui_print("Outputting key codes.\n");
                 ui_print("Go back to end debugging.\n");