summaryrefslogtreecommitdiff
path: root/cmds
diff options
context:
space:
mode:
Diffstat (limited to 'cmds')
-rw-r--r--cmds/bugreport/bugreport.c2
-rw-r--r--cmds/dumpstate/dumpstate.c4
-rw-r--r--cmds/dumpstate/dumpstate.h7
-rw-r--r--cmds/dumpstate/utils.c39
-rw-r--r--cmds/flatland/Main.cpp6
-rw-r--r--cmds/servicemanager/service_manager.c2
6 files changed, 53 insertions, 7 deletions
diff --git a/cmds/bugreport/bugreport.c b/cmds/bugreport/bugreport.c
index 4a0b511470..11e9057fec 100644
--- a/cmds/bugreport/bugreport.c
+++ b/cmds/bugreport/bugreport.c
@@ -29,7 +29,7 @@ int main(int argc, char *argv[]) {
property_set("ctl.start", "dumpstate");
/* socket will not be available until service starts */
- for (i = 0; i < 10; i++) {
+ for (i = 0; i < 20; i++) {
s = socket_local_client("dumpstate",
ANDROID_SOCKET_NAMESPACE_RESERVED,
SOCK_STREAM);
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c
index 220af478ac..7fb5b129b7 100644
--- a/cmds/dumpstate/dumpstate.c
+++ b/cmds/dumpstate/dumpstate.c
@@ -174,9 +174,7 @@ static void dumpstate() {
dump_file("LAST PANIC CONSOLE", "/data/dontpanic/apanic_console");
dump_file("LAST PANIC THREADS", "/data/dontpanic/apanic_threads");
- run_command("SYSTEM SETTINGS", 20, SU_PATH, "root", "sqlite3",
- "/data/data/com.android.providers.settings/databases/settings.db",
- "pragma user_version; select * from system; select * from secure; select * from global;", NULL);
+ for_each_userid(do_dump_settings, NULL);
/* The following have a tendency to get wedged when wifi drivers/fw goes belly-up. */
run_command("NETWORK INTERFACES", 10, SU_PATH, "root", "netcfg", NULL);
diff --git a/cmds/dumpstate/dumpstate.h b/cmds/dumpstate/dumpstate.h
index 67bbd7e2ad..d820495793 100644
--- a/cmds/dumpstate/dumpstate.h
+++ b/cmds/dumpstate/dumpstate.h
@@ -26,6 +26,7 @@
typedef void (for_each_pid_func)(int, const char *);
typedef void (for_each_tid_func)(int, int, const char *);
+typedef void (for_each_userid_func)(int);
/* prints the contents of a file */
int dump_file(const char *title, const char* path);
@@ -51,6 +52,9 @@ void for_each_pid(for_each_pid_func func, const char *header);
/* for each thread in the system, run the specified function */
void for_each_tid(for_each_tid_func func, const char *header);
+/* for each user id in the system, run the specified function */
+void for_each_userid(for_each_userid_func func, const char *header);
+
/* Displays a blocked processes in-kernel wait channel */
void show_wchan(int pid, int tid, const char *name);
@@ -60,6 +64,9 @@ void do_showmap(int pid, const char *name);
/* Gets the dmesg output for the kernel */
void do_dmesg();
+/* Dumps settings for a given user id */
+void do_dump_settings(int userid);
+
/* Play a sound via Stagefright */
void play_sound(const char* path);
diff --git a/cmds/dumpstate/utils.c b/cmds/dumpstate/utils.c
index 670e09cc84..577d31cb49 100644
--- a/cmds/dumpstate/utils.c
+++ b/cmds/dumpstate/utils.c
@@ -51,6 +51,29 @@ static const char* native_processes_to_dump[] = {
NULL,
};
+void for_each_userid(void (*func)(int), const char *header) {
+ DIR *d;
+ struct dirent *de;
+
+ if (header) printf("\n------ %s ------\n", header);
+ func(0);
+
+ if (!(d = opendir("/data/system/users"))) {
+ printf("Failed to open /data/system/users (%s)\n", strerror(errno));
+ return;
+ }
+
+ while ((de = readdir(d))) {
+ int userid;
+ if (de->d_type != DT_DIR || !(userid = atoi(de->d_name))) {
+ continue;
+ }
+ func(userid);
+ }
+
+ closedir(d);
+}
+
static void __for_each_pid(void (*helper)(int, const char *, void *), const char *header, void *arg) {
DIR *d;
struct dirent *de;
@@ -175,6 +198,22 @@ out_close:
return;
}
+void do_dump_settings(int userid) {
+ char title[255];
+ char dbpath[255];
+ char sql[255];
+ sprintf(title, "SYSTEM SETTINGS (user %d)", userid);
+ if (userid == 0) {
+ strcpy(dbpath, "/data/data/com.android.providers.settings/databases/settings.db");
+ strcpy(sql, "pragma user_version; select * from system; select * from secure; select * from global;");
+ } else {
+ sprintf(dbpath, "/data/system/users/%d/settings.db", userid);
+ strcpy(sql, "pragma user_version; select * from system; select * from secure;");
+ }
+ run_command(title, 20, SU_PATH, "root", "sqlite3", dbpath, sql, NULL);
+ return;
+}
+
void do_dmesg() {
printf("------ KERNEL LOG (dmesg) ------\n");
/* Get size of kernel buffer */
diff --git a/cmds/flatland/Main.cpp b/cmds/flatland/Main.cpp
index d6ac3d2593..e80dbb1505 100644
--- a/cmds/flatland/Main.cpp
+++ b/cmds/flatland/Main.cpp
@@ -73,7 +73,7 @@ static const BenchmarkDesc benchmarks[] = {
},
},
- { "3:2 Single Static Window",
+ { "4:3 Single Static Window",
2048, 1536, { 1536 },
{
{ // Window
@@ -117,7 +117,7 @@ static const BenchmarkDesc benchmarks[] = {
},
},
- { "3:2 App -> Home Transition",
+ { "4:3 App -> Home Transition",
2048, 1536, { 1536 },
{
{ // Wallpaper
@@ -173,7 +173,7 @@ static const BenchmarkDesc benchmarks[] = {
},
},
- { "3:2 SurfaceView -> Home Transition",
+ { "4:3 SurfaceView -> Home Transition",
2048, 1536, { 1536 },
{
{ // Wallpaper
diff --git a/cmds/servicemanager/service_manager.c b/cmds/servicemanager/service_manager.c
index 79ce6eda5b..cacbea091e 100644
--- a/cmds/servicemanager/service_manager.c
+++ b/cmds/servicemanager/service_manager.c
@@ -32,6 +32,8 @@ static struct {
{ AID_MEDIA, "media.player" },
{ AID_MEDIA, "media.camera" },
{ AID_MEDIA, "media.audio_policy" },
+ { AID_AUDIO, "audio" },
+ { AID_INPUT, "input" },
{ AID_DRM, "drm.drmManager" },
{ AID_NFC, "nfc" },
{ AID_BLUETOOTH, "bluetooth" },