Revert "Add Wearable node.db to Shamu dumpstate."
This reverts commit 9673a925a42e45a2c0778099c654418e6a510cb5.
Bug: 28640932
Change-Id: I62de00a5b5b091aacf515ebd3af510ed2a550f91
diff --git a/dumpstate/dumpstate.cpp b/dumpstate/dumpstate.cpp
index 9f471a0..8dfb3d0 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("TZ ramoops annotation", "/sys/fs/pstore/annotate-ramoops");
@@ -88,6 +44,4 @@
run_command("Subsystem Tombstone list", 5, SU_PATH, "root", "ls", "-l", "/data/tombstones/ramdump", NULL);
run_command("ION CLIENTS", 5, SU_PATH, "root", "/system/bin/sh", "-c", "for f in $(ls /d/ion/clients/*); do echo $f; cat $f; done", NULL);
run_command("ION HEAPS", 5, SU_PATH, "root", "/system/bin/sh", "-c", "for f in $(ls /d/ion/heaps/*); do echo $f; cat $f; done", NULL);
-
- dump_wear_nodedb();
};