summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin On <con@google.com>2016-07-27 21:06:15 +0000
committergitbuildkicker <android-build@google.com>2016-07-27 14:36:22 -0700
commit1abbf022a1b20b82155dcfce9d44b212fec92ad9 (patch)
treee26cf30fd5b345b1dfbae59f55ce4c7bb3313ff1
parent7ca9e918ec558cd5054358b67b9d5326ceb9c173 (diff)
downloadbullhead-1abbf022a1b20b82155dcfce9d44b212fec92ad9.tar.gz
Revert "Add Wearable node.db to Bullhead dumpstate."
This reverts commit 46b5a7c650c5021ed51e55cec0b9ca58ecfe86e6. Bug: 28640932 Change-Id: I8d5c4b12a888605047ace7504eb2ccaa4f131351
-rw-r--r--dumpstate/dumpstate.cpp46
1 files changed, 0 insertions, 46 deletions
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 @@ void dumpstate_board()
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();
};