Revert "Add Wearable node.db to Bullhead dumpstate."

This reverts commit 46b5a7c650c5021ed51e55cec0b9ca58ecfe86e6.

Bug: 28640932
Change-Id: I8d5c4b12a888605047ace7504eb2ccaa4f131351
diff --git a/dumpstate/dumpstate.cpp b/dumpstate/dumpstate.cpp
index 7887f6f..ef6d6ff 100644
--- a/dumpstate/dumpstate.cpp
+++ b/dumpstate/dumpstate.cpp
@@ -13,53 +13,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <errno.h>
-#include <string>
-#include <string.h>
 
-#define LOG_TAG "dumpstate"
-#include <cutils/log.h>
 #include <dumpstate.h>
 
-/**
- * Dump Wearable node database if present.
- *
- * TODO This function is a temporary solution for Android Wear and should be
- * removed once dumpsys has proper support for adding files to the zip, or
- * moved to a common library.
- */
-void dump_wear_nodedb() {
-    // we rely on su to workaround selinux permissions in the app data directory
-    // so this will only work on userdebug builds
-    if (is_user_build()) {
-        return;
-    }
-
-    std::string tmp_nodedb_path = bugreport_dir + "/wear-nodedb.db";
-    std::string wear_nodedb_path = "/data/data/com.google.android.gms/databases/node.db";
-
-    if (run_command("COPY WEAR NODE DB", 600, SU_PATH, "root",
-                    "cp", wear_nodedb_path.c_str(), tmp_nodedb_path.c_str(), NULL)) {
-        MYLOGE("Wear node.db copy failed\n");
-        return;
-    }
-    if (run_command("CHOWN WEAR NODE DB", 600, SU_PATH, "root",
-                    "chown", "shell:shell", tmp_nodedb_path.c_str(), NULL)) {
-        MYLOGE("Wear node.db chown failed\n");
-        return;
-    }
-    if (add_zip_entry(ZIP_ROOT_DIR + wear_nodedb_path, tmp_nodedb_path)) {
-        MYLOGD("Wear node.db added to zip file\n");
-    } else {
-        MYLOGE("Unable to add zip for Wear node.db\n");
-    }
-    // unconditionally remove the db since it's just a copy
-    if (remove(tmp_nodedb_path.c_str())) {
-        MYLOGE("Error removing Wear node.db file %s: %s\n",
-                tmp_nodedb_path.c_str(), strerror(errno));
-    }
-}
-
 void dumpstate_board()
 {
     dump_file("INTERRUPTS", "/proc/interrupts");
@@ -80,6 +36,4 @@
     run_command("LITTLE cluster cpuidle", 5, SU_PATH, "root", "/system/bin/sh", "-c", "for d in $(ls -d /sys/devices/system/cpu/cpu0/cpuidle/state*); do echo \"$d: `cat $d/name` `cat $d/desc` `cat $d/time` `cat $d/usage`\"; done", NULL);
     dump_file("big cluster time-in-state", "/sys/devices/system/cpu/cpu4/cpufreq/stats/time_in_state");
     run_command("big cluster cpuidle", 5, SU_PATH, "root", "/system/bin/sh", "-c", "for d in $(ls -d /sys/devices/system/cpu/cpu4/cpuidle/state*); do echo \"$d: `cat $d/name` `cat $d/desc` `cat $d/time` `cat $d/usage`\"; done", NULL);
-
-    dump_wear_nodedb();
 };