Bug#715238: [android-tools-adb] Does Not Know it is Running
Control: tag -1 +patch Sorry for breaking things. I intend to do another NMU using the attached patch tonight. Cheers, -Hilko Index: android-tools-4.2.2+git20130529/core/adb/adb.c === --- android-tools-4.2.2+git20130529.orig/core/adb/adb.c 2013-05-29 22:16:54.0 +0200 +++ android-tools-4.2.2+git20130529/core/adb/adb.c 2013-07-09 08:35:55.0 +0200 @@ -1154,7 +1154,7 @@ */ void build_local_name(char* target_str, size_t target_size, int server_port) { - snprintf(target_str, target_size, tcp:%d, server_port); + snprintf(target_str, target_size, local:%d, server_port); } #if !ADB_HOST Index: android-tools-4.2.2+git20130529/core/adb/adb_client.c === --- android-tools-4.2.2+git20130529.orig/core/adb/adb_client.c 2013-05-29 22:16:54.0 +0200 +++ android-tools-4.2.2+git20130529/core/adb/adb_client.c 2013-07-09 09:13:06.864543801 +0200 @@ -185,12 +185,12 @@ strcpy(__adb_error, service name too long); return -1; } -snprintf(tmp, sizeof tmp, %04x, len); +snprintf(tmp, sizeof tmp, %d, __adb_server_port); if (__adb_server_name) fd = socket_network_client(__adb_server_name, __adb_server_port, SOCK_STREAM); else -fd = socket_loopback_client(__adb_server_port, SOCK_STREAM); +fd = socket_local_client(tmp, ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_STREAM); if(fd 0) { strcpy(__adb_error, cannot connect to daemon); @@ -201,6 +201,7 @@ return -1; } +snprintf(tmp, sizeof tmp, %04x, len); if(writex(fd, tmp, 4) || writex(fd, service, len)) { strcpy(__adb_error, write failure during connection); adb_close(fd);
Processed: Re: Bug#715238: [android-tools-adb] Does Not Know it is Running
Processing control commands: tag -1 +patch Bug #715238 [android-tools-adb] [android-tools-adb] Does Not Know it is Running Added tag(s) patch. -- 715238: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=715238 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#715238: [android-tools-adb] Does Not Know it is Running
On Tue, 2013-07-09 at 12:33 +0200, Hilko Bengen wrote: Sorry for breaking things. I intend to do another NMU using the attached patch tonight. Let me test it first. Will do a normal upload in 24 hours if the patch is correct this time. Laszlo/GCS -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#715238: [android-tools-adb] Does Not Know it is Running
* Laszlo Boszormenyi (GCS): On Tue, 2013-07-09 at 12:33 +0200, Hilko Bengen wrote: Sorry for breaking things. I intend to do another NMU using the attached patch tonight. Let me test it first. Will do a normal upload in 24 hours if the patch is correct this time. Alright. Sorry for the inconvenience. Cheers, -Hilko -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#715238: [android-tools-adb] Does Not Know it is Running
Hilko Bengen wrote: Yes, -a is probably broken. I still consider that an improvement over #694176 which I intended fix in the first place -- and which blocks the package from reaching testing. Having poked at the adb sources some more, I come to the conclusion that upstream's intention is to provide two modes for setting up an adb daemon: (1) A local TCP socket (default wrong behavior, see #694176) (2) A TCP socket on all interfaces (even less secure, but whatever...) Correct. adb is a debugging tool, almost never run on multi-user systems. I agree that the default behavior is insecure on multi-user systems, and switching to a per-usr socket would make sense. For example, a UNIX domain socket stored in the user's home directory, with permissions set to only allow that user to access it. Nonetheless, I don't believe it makes sense to make this change without coordinating with upstream, and I don't believe #694176 should be release-critical. The security aspect of the bug simply doesn't come up on normal single-user developer systems. So, I'd propose that the correct fix is to revert the NMU completely, upload -2 as -2.2 or -3, reopen #694176 and set its severity to important, and then work with upstream to come up with an alternative default. - Josh Triplett -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#715238: [android-tools-adb] Does Not Know it is Running
same here. As root: root@localhost:~# ps aux | grep adb root@localhost:~# adb start-server * daemon not running. starting it now on port 5037 * * daemon started successfully * root@localhost:~# ps aux | grep adb root 12251 0.0 0.0 170500 1668 pts/1Sl 17:21 0:00 adb -P 5037 fork-server server root@localhost:~# netstat -npl | grep adb unix 2 [ ACC ] STREAM LISTENING 35132 12251/adb /tmp/5037 root@localhost:~# adb devices * daemon not running. starting it now on port 5037 * * daemon started successfully * ** daemon still not running error: cannot connect to daemon # apt-cache show android-tools-adb Package: android-tools-adb Source: android-tools Version: 4.2.2+git20130529-2.1 Installed-Size: 214 Maintainer: Laszlo Boszormenyi (GCS) g...@debian.hu Architecture: amd64 -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#715238: [android-tools-adb] Does Not Know it is Running
Package: android-tools-adb Version: 4.2.2+git20130529-2.1 Severity: grave --- Please enter the report below this line. --- After upgrade to current version git20130529-2.1, either does not know it is indeed running (or maybe it is not though there is a process). Sample session: david@dovidhalevi:~$ adb start-server * daemon not running. starting it now on port 5037 * * daemon started successfully * david@dovidhalevi:~$ adb devices * daemon not running. starting it now on port 5037 * * daemon started successfully * ** daemon still not running error: cannot connect to daemon david@dovidhalevi:~$ pidof adb 16595 16589 --- System information. --- Architecture: i386 Kernel: Linux 3.9-1-amd64 Debian Release: jessie/sid 500 wheezy linux.dropbox.com 500 unstableftp.us.debian.org 500 testing ftp.us.debian.org 500 precise ppa.launchpad.net 1 experimentalftp.us.debian.org --- Package information. --- Depends(Version) | Installed -+-= libc6 (= 2.15) | libssl1.0.0 (= 1.0.0) | zlib1g (= 1:1.1.4) | Package's Recommends field is empty. Package's Suggests field is empty.