From b4d52a437e97489710182ebc6a8a3e00d6fbd6f0 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Thu, 4 Apr 2013 10:44:41 -0700 Subject: [PATCH] Only handle keycodes when adb is enabled. This prevents accidental bugreports on userdebug/eng devices. Bug: 8541006 Change-Id: Iefd15826090fd91434403f197cfd166e64400224 --- init/keychords.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/init/keychords.c b/init/keychords.c index aab08195e..061d15701 100644 --- a/init/keychords.c +++ b/init/keychords.c @@ -100,10 +100,7 @@ void handle_keychord() int ret; __u16 id; - // only handle keychords if ro.debuggable is set or adb is enabled. - // the logic here is that bugreports should be enabled in userdebug or eng builds - // and on user builds for users that are developers. - debuggable = property_get("ro.debuggable"); + // Only handle keychords if adb is enabled. adb_enabled = property_get("init.svc.adbd"); ret = read(keychord_fd, &id, sizeof(id)); if (ret != sizeof(id)) { @@ -111,8 +108,7 @@ void handle_keychord() return; } - if ((debuggable && !strcmp(debuggable, "1")) || - (adb_enabled && !strcmp(adb_enabled, "running"))) { + if ((adb_enabled && !strcmp(adb_enabled, "running"))) { svc = service_find_by_keychord(id); if (svc) { INFO("starting service %s from keychord\n", svc->name);