History log of /system/core/adb/usb_linux.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8bbae239156cb51fd36300368588e9bf8d42613d 10-May-2011 Omari Stephens <xsdg@android.com> Add a 1000msec timeout for adb's USB control packets

Includes a version bump to make it possible to determine if a given
binary has this fix or not.

Bug: 4111855
Change-Id: I86d902a7fa0c4b906264141d2467b7bdddb61801
/system/core/adb/usb_linux.c
408fa57864c01113deaa213e5c1848a9c594ae92 16-Mar-2011 JP Abgrall <jpa@google.com> adb: fix subprocess exit handling, oom adjust fixes, extra debugging.

* Add support for correctly handling subprocess termination in shell service (b/3400254 b/3482112 b/2249397)
- have a waitpid() track the subprocess, then notify the fdevent via a socket
- force an eof on the pty master in fdevent's new subproc handler.
- modify fdevent to force-read the pty after an exit.
* Migrate the "shell:blabla" handling to "#if !ADB_HOST" sections, where it
belongs.
* Fix the race around OOM adjusting.
- Do it in the child before exec() instead of the in the parent as the
child could already have started or not (no /proc/pid/... yet).
* Allow for multi-threaded D() invocations to not clobber each other.
- Allow locks across object files.
- Add lock within D()
- Make sure sysdesp init (mutex init also) is called early.
* Add some missing close(fd) calls
- Match similar existing practices near dup2()
* Add extra D() invocations related to FD handling.
* Warn about using debugging as stderr/stdout is used for protocol.
* Fix some errno handling and make D() correctly handle it.
* Add new adb trace_mask: services.
* Make fdevent_loop's handle BADFDs more gracefully (could occur some subproc closed its pts explicitely).
* Remove obsolete commandline args reported in help. (b/3509092)


Change-Id: I928287fdf4f1a86777e22ce105f9581685f46e35
/system/core/adb/usb_linux.c
0e7c4274c687446dbe30a814278d7a6b99da8c4e 24-Feb-2011 JP Abgrall <jpa@google.com> Revert "Fix adb hang when subprocess dies early."

This is for http://b/3482112 "adb interactions with device causing test harness failures".

This reverts commit 69c5c4c45bd4f1575ae8bdba13795297be7deb8c.

Change-Id: I630bf2e04d2ecf0223bd2af4e87136754ff880d3
/system/core/adb/usb_linux.c
69c5c4c45bd4f1575ae8bdba13795297be7deb8c 18-Feb-2011 JP Abgrall <jpa@google.com> Fix adb hang when subprocess dies early.

* Handling of the subprocess and its FD.
This fixes http://b/3400254 "Many bugreports getting hung at the end in monkey"
- Start up a service thread that waits on the subprocess to terminate,
then closes the FD associated with it.
- Have the event handler select() with a timeout so that it can
detect the closed FD. Select() with no timeout does not return when an FD is closed.
- Have the event handler force a read on the closed FD to trigger the close sequence.
- Migrate the "shell:blabla" handling to "#if !ADB_HOST" sections.
* Fix the race around OOM adjusting.
- Do it in the child before exec() instead of the in the parent as the
child could already have started or not (no /proc/pid/... yet).
* Allow for multi-threaded D() invocations to not clobber each other.
- Allow locks across object files.
- Add lock within D()
* Add some missing close(fd) calls
- Match similar existing practices near dup2()
* Add extra D() invocations related to FD handling.
* Warn about using debugging as stderr/stdout is used for protocol.

Change-Id: Ie5c4a5e6bfbe3f22201adf5f9a205d32e069bf9d
Signed-off-by: JP Abgrall <jpa@google.com>
/system/core/adb/usb_linux.c
b596608f098937049fd98c5896cf72ebbf3584ae 08-Jan-2011 Mike Lockwood <lockwood@android.com> adb: Increase device descriptor buffer size in Linux host USB support

256 bytes wasn't big enough for some complicated USB configurations

Change-Id: I31f7841953d73b06958f44040f58166b159faff4
Signed-off-by: Mike Lockwood <lockwood@android.com>
/system/core/adb/usb_linux.c
6f703a2e85a3098b3546a0ce254349b72b440628 22-Sep-2010 Marcus Comstedt <marcus@mc.pp.se> Fix USB endianness bugs on Linux.

The fields device->idVendor and device->idProduct should not be
converted from little endian to native byteorder, because the
kernel has in fact done so already!

On the other hand, the descriptors read using raw ioctl:s in
register_device() do need to be converted.

Change-Id: I5fe08b626b14ead56a592b68d026690e343c2656
/system/core/adb/usb_linux.c
fe582b5d32d08d075be87f4c9193e24029963361 19-Feb-2010 Mike Lockwood <lockwood@android.com> adb: Add five second timeout for USB writes on Linux host.

This helps us recover when things go wrong during automated testing.

Change-Id: I006dbfaff7f70d51398ff12fbddcaee751453b78
Signed-off-by: Mike Lockwood <lockwood@android.com>
/system/core/adb/usb_linux.c
07e8f7e8758d5ce44fe6cf3bacb670962750a92e 17-Jan-2010 Mike Lockwood <lockwood@android.com> adb: Fix problems detecting adb in more complicated USB configurations.

Change-Id: Ib5b13960a1c75efc97abeca46204c85bba905c71
Signed-off-by: Mike Lockwood <lockwood@android.com>
/system/core/adb/usb_linux.c
d70dc73d8d17a24a2a6dcdaa38f31dce47dd92aa 11-Aug-2009 Mike Lockwood <lockwood@android.com> adb: Fix infinite loop in Linux host device discovery.

Signed-off-by: Mike Lockwood <lockwood@android.com>
/system/core/adb/usb_linux.c
0927bf9690127bc45cf8837a1467759e9720399a 08-Aug-2009 Mike Lockwood <lockwood@android.com> adb: On Linux, detect USB devices for which adb does not have permissions to communicate with.

adb devices will now list devices without adequate file system permissions in /dev/bus/usb as:

List of devices attached
???????????? no permissions

Signed-off-by: Mike Lockwood <lockwood@android.com>
/system/core/adb/usb_linux.c
de6f62a609120c3d9e4e53689c3b309842ec874b 24-Jul-2009 Xavier Ducrohet <xav@android.com> Add support for Samsung and Motorola devices.

Also update the linux code. Some devices have more complex USB descriptors
which can't be parsed with the simple assumption of just skipping the
endpoint descriptors.
/system/core/adb/usb_linux.c
3d9b265b7d34d886a2f44e486c25e402d7df791b 08-Jul-2009 Mike Lockwood <lockwood@android.com> adb: Use correct language ID when retrieving USB serial number.

Fixes http://code.google.com/p/android/issues/detail?id=2609

Signed-off-by: Mike Lockwood <lockwood@android.com>
/system/core/adb/usb_linux.c
dd7bc3319deb2b77c5d07a51b7d6cd7e11b5beb0 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/system/core/adb/usb_linux.c
e54eebbf1a908d65ee8cf80bab62821c05666d70 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/system/core/adb/usb_linux.c
13f797da7f190e9ea52f2f3d235210b8a4963b21 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/system/core/adb/usb_linux.c
4f6e8d7a00cbeda1e70cc15be9c4af1018bdad53 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/system/core/adb/usb_linux.c