From 9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8 Mon Sep 17 00:00:00 2001 From: Dees_Troy Date: Wed, 19 Sep 2012 15:09:45 -0400 Subject: Improve adb sideload - use storage vs tmp --- minadbd/adb.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'minadbd/adb.c') diff --git a/minadbd/adb.c b/minadbd/adb.c index 0e8fd2a7e..54adba050 100644 --- a/minadbd/adb.c +++ b/minadbd/adb.c @@ -40,6 +40,8 @@ int HOST = 0; static const char *adb_device_banner = "sideload"; +char ADB_SIDELOAD_FILENAME[255]; + void fatal(const char *fmt, ...) { va_list ap; @@ -378,8 +380,9 @@ static void adb_cleanup(void) usb_cleanup(); } -int adb_main() +int adb_main(const char* path) { + strcpy(ADB_SIDELOAD_FILENAME, path); atexit(adb_cleanup); #if defined(HAVE_FORKEXEC) // No SIGCHLD. Let the service subproc handle its children. @@ -394,6 +397,7 @@ int adb_main() usb_init(); } +/* Remove this so that perms work properly if (setgid(AID_SHELL) != 0) { fprintf(stderr, "failed to setgid to shell\n"); exit(1); @@ -402,8 +406,9 @@ int adb_main() fprintf(stderr, "failed to setuid to shell\n"); exit(1); } - fprintf(stderr, "userid is %d\n", getuid()); + fprintf(stderr, "userid is %d\n", getuid()); +*/ D("Event loop starting\n"); fdevent_loop(); -- cgit v1.2.3