summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
Diffstat (limited to 'cmds')
-rw-r--r--cmds/dumpstate/dumpstate.c2
-rw-r--r--cmds/dumpstate/dumpstate.h7
-rw-r--r--cmds/dumpstate/utils.c16
-rw-r--r--cmds/service/service.cpp34
4 files changed, 32 insertions, 27 deletions
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c
index a33dcf3..5fa437a 100644
--- a/cmds/dumpstate/dumpstate.c
+++ b/cmds/dumpstate/dumpstate.c
@@ -242,8 +242,6 @@ static void dumpstate() {
run_command("LAST LOGCAT", 10, "logcat", "-L", "-v", "threadtime",
"-b", "all", "-d", "*:v", 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, "ip", "link", NULL);
diff --git a/cmds/dumpstate/dumpstate.h b/cmds/dumpstate/dumpstate.h
index d17a677..8335e26 100644
--- a/cmds/dumpstate/dumpstate.h
+++ b/cmds/dumpstate/dumpstate.h
@@ -26,7 +26,6 @@
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);
@@ -57,9 +56,6 @@ 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);
@@ -69,9 +65,6 @@ 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);
-
/* Prints the contents of all the routing tables, both IPv4 and IPv6. */
void dump_route_tables();
diff --git a/cmds/dumpstate/utils.c b/cmds/dumpstate/utils.c
index cf14c8b..3d9a2b5 100644
--- a/cmds/dumpstate/utils.c
+++ b/cmds/dumpstate/utils.c
@@ -206,22 +206,6 @@ 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/service/service.cpp b/cmds/service/service.cpp
index 97fc47c..428b87c 100644
--- a/cmds/service/service.cpp
+++ b/cmds/service/service.cpp
@@ -146,6 +146,15 @@ int main(int argc, char* const argv[])
break;
}
data.writeInt32(atoi(argv[optind++]));
+ } else if (strcmp(argv[optind], "i64") == 0) {
+ optind++;
+ if (optind >= argc) {
+ aerr << "service: no integer supplied for 'i64'" << endl;
+ wantsUsage = true;
+ result = 10;
+ break;
+ }
+ data.writeInt64(atoll(argv[optind++]));
} else if (strcmp(argv[optind], "s16") == 0) {
optind++;
if (optind >= argc) {
@@ -155,6 +164,24 @@ int main(int argc, char* const argv[])
break;
}
data.writeString16(String16(argv[optind++]));
+ } else if (strcmp(argv[optind], "f") == 0) {
+ optind++;
+ if (optind >= argc) {
+ aerr << "service: no number supplied for 'f'" << endl;
+ wantsUsage = true;
+ result = 10;
+ break;
+ }
+ data.writeFloat(atof(argv[optind++]));
+ } else if (strcmp(argv[optind], "d") == 0) {
+ optind++;
+ if (optind >= argc) {
+ aerr << "service: no number supplied for 'd'" << endl;
+ wantsUsage = true;
+ result = 10;
+ break;
+ }
+ data.writeDouble(atof(argv[optind++]));
} else if (strcmp(argv[optind], "null") == 0) {
optind++;
data.writeStrongBinder(NULL);
@@ -272,9 +299,12 @@ int main(int argc, char* const argv[])
aout << "Usage: service [-h|-?]\n"
" service list\n"
" service check SERVICE\n"
- " service call SERVICE CODE [i32 INT | s16 STR] ...\n"
+ " service call SERVICE CODE [i32 N | i64 N | f N | d N | s16 STR ] ...\n"
"Options:\n"
- " i32: Write the integer INT into the send parcel.\n"
+ " i32: Write the 32-bit integer N into the send parcel.\n"
+ " i64: Write the 64-bit integer N into the send parcel.\n"
+ " f: Write the 32-bit single-precision number N into the send parcel.\n"
+ " d: Write the 64-bit double-precision number N into the send parcel.\n"
" s16: Write the UTF-16 string STR into the send parcel.\n";
// " intent: Write and Intent int the send parcel. ARGS can be\n"
// " action=STR data=STR type=STR launchFlags=INT component=STR categories=STR[,STR,...]\n";