diff options
author | Dees_Troy <dees_troy@teamw.in> | 2012-09-19 21:09:45 +0200 |
---|---|---|
committer | Dees_Troy <dees_troy@teamw.in> | 2012-09-19 21:11:03 +0200 |
commit | 9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8 (patch) | |
tree | f48db2fe6cee6169c8f5d0165a3ce139496dc79a /minadbd | |
parent | Improve adb sideload -- add cancel (diff) | |
download | android_bootable_recovery-9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8.tar android_bootable_recovery-9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8.tar.gz android_bootable_recovery-9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8.tar.bz2 android_bootable_recovery-9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8.tar.lz android_bootable_recovery-9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8.tar.xz android_bootable_recovery-9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8.tar.zst android_bootable_recovery-9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8.zip |
Diffstat (limited to '')
-rw-r--r-- | minadbd/adb.c | 9 | ||||
-rw-r--r-- | minadbd/adb.h | 5 |
2 files changed, 10 insertions, 4 deletions
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(); diff --git a/minadbd/adb.h b/minadbd/adb.h index 98fa5972e..19c22e8ea 100644 --- a/minadbd/adb.h +++ b/minadbd/adb.h @@ -217,7 +217,7 @@ void send_packet(apacket *p, atransport *t); void get_my_path(char *s, size_t maxLen); int launch_server(int server_port); -int adb_main(); +int adb_main(const char* path); /* transports are ref-counted @@ -413,6 +413,7 @@ extern int SHELL_EXIT_NOTIFY_FD; int sendfailmsg(int fd, const char *reason); int handle_host_request(char *service, transport_type ttype, char* serial, int reply_fd, asocket *s); -#define ADB_SIDELOAD_FILENAME "/tmp/update.zip" +//#define ADB_SIDELOAD_FILENAME "/tmp/update.zip" +extern char ADB_SIDELOAD_FILENAME[255]; #endif |