summaryrefslogtreecommitdiffstats
path: root/fastboot/usb_osx.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix 64-bit host build.Ying Wang2014-08-141-1/+2
| | | | | Bug: 13751317 Change-Id: Ibf62935b7d12a55ffc57242a26a2581b52796847
* Wait for device to disappear after reboot-bootloader.Mark Wachsler2013-10-171-0/+5
| | | | | | | | | | | | | | | | (Linux only for now) With fastboot reading serial numbers from sysfs, it had become possible for a fastboot command issued immediately after rebooting the bootloader to fail, because sysfs still thought the device was online. To prevent this, after reboot-bootloader we wait for the device to disconnect. Also made usb_read and usb_write fail immediately if the descriptor has been closed; this prevents an incorrect error message ("Bad file descriptor") when errors from fb_getvar are ignored (e.g., by fb_format_supported). Also removed unused fd param from filter_usb_device, and simplified logic in usb_write by using do/while instead of a special case for len == 0. Change-Id: I799b857eab411fd8ad25f5777fc61c685152ea86
* resolved conflicts for merge of 13081c69 to masterScott Anderson2012-05-011-0/+8
|\ | | | | | | Change-Id: I631e466fc53e9b0f4a39f24f959b4ae9b626bdda
| * fastboot: Add ability to specify device pathScott Anderson2012-04-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For manufacturing and testing, there is a need to talk to whatever device is connected to a given port on the host. This change modifies fastboot's "-s" option to take either a serial number or a device path. The device paths of the connected devices can be listed using "fastboot -l devices" whose output will resemble: 016B75D60A00600D usb:2-5 fastboot AD3C12020173 usb:1-4.3 fastboot The second column lists the device paths. If the -l option is not given, the output from "fastboot devices" will be the same as it used to be (i.e. the paths will not be printed). Finally, note that the format of the device paths are platform dependent. The example above is from Linux. On OS-X, the paths will be "usb:" followed by hex digits. For Windows, the device paths will be printed as "????????????" and the -s option will not be able to select a device until someone implements the underlying functionality in usb_windows.c. Change-Id: I1f01b8f47acd32edb0ac18db107316a2c923bbde Signed-off-by: Scott Anderson <saa@android.com>
* | Remove trailing whitespacesAnatol Pomazau2012-02-281-14/+14
| | | | | | | | Change-Id: I6f83333a6ee0fbc562a12bb9555c43a44c98768e
* | fastboot: set the language local stringmgross2012-01-231-1/+2
|/ | | | | | | | | | | | Set the language local string to 0x409 (English US / en-us) such that fastboot will successfully read the usb descriptor serial number string. The usbdevfs ioctl fails when the wIndex is not initialized with the local for the unicode of the usb descriptor string. usbdevfs is an obsolete interface and fastboot probably needs a re-write to use libusb like what is in adb. Change-Id: I3687f84643f53c736f14b3ae7793185d9b5cccc0 Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
* Allow OSX fastboot to work with more devices.Nick Pelly2010-07-221-4/+2
| | | | | | | ClearPipeStallBothEnds() appears to fail on some devices, but if we ignore that error then fastboot does work. So ignore the error. Change-Id: Ic866ece28a57c081e34079e1a032fa8155301ddf
* Fix kernel panics in fastboot on OS X.Jeff Brown2010-05-211-1/+22
| | | | | | | | | | | | The kernel panic seems to be related to the driver trying to allocate too many pages from the IO mapper. That may be caused by the fact that we try to perform a 100+ MiB transfer in a single IO operation. This change breaks the transfer down into 1 MiB chunks. So far after a day of testing, no kernel panics have occurred compared to 5 in the previous 24 hours! Change-Id: I8d27a546e0c0bf4fe2f0fc7fcad65a88d3e6bee0
* Make fastboot say "no permissions" for non-writable devices.Elliott Hughes2009-10-061-2/+1
| | | | | | | | | | | | | | Without this patch, "adb devices" will say "no permissions" when it sees a device it can't write to, but "fastboot devices" will silently ignore it. This is confusing to n00bs, especially since it doesn't seem to be widely known that a device's USB id might be different in the bootloader (meaning two udev rules are needed). It can also be confusing if you're sshed in, when you can't access the device because you won't be in the "plugdev" group, but "fastboot devices" won't make this clear. I'm not sure about the Mac OS and Windows changes. AIUI, devices are always writable on those platforms, but I don't use either, so I can't test this. This patch shouldn't alter the behavior on either of those platforms.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+538
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-538/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+538