Bug 199185 - [devel/android-tools-adb][patch] Accept devices w/o serial number
Summary: [devel/android-tools-adb][patch] Accept devices w/o serial number
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-04-05 20:17 UTC by Marcin Cieślak
Modified: 2016-09-28 09:44 UTC (History)
4 users (show)

See Also:


Attachments
Teach usb_libusb.c to use devices without serial number (1.35 KB, patch)
2015-04-05 20:17 UTC, Marcin Cieślak
no flags Details | Diff
Ignore non-ASCII languages (5.40 KB, patch)
2015-06-21 20:44 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Cieślak 2015-04-05 20:17:16 UTC
Created attachment 155214 [details]
Teach usb_libusb.c to use devices without serial number

"adb devices" does not accept my old Huawei Ideos phone running CyanogenMod. It turns out it thinks it really needs a serial number on the USB interface.

I wanted to submit this upstream, but it turns out somebody deleted the BSD support in AOSP master:

https://android-review.googlesource.com/#/c/127904
Comment 1 Jan Beich freebsd_committer 2015-06-21 20:44:42 UTC
Created attachment 157953 [details]
Ignore non-ASCII languages

Comparing with libusb code by hselasky for fastboot, working around serial number language may not be necessary. So, try the following patch instead. adb itself should accept empty serial just fine.

https://android.googlesource.com/platform/system/core/+/c840653%5E!/
https://android.googlesource.com/platform/system/core/+/0927bf9%5E!/

$ adb devices
List of devices attached
????????????    device

or

$ adb devices
List of devices attached
(no serial number)      device
Comment 2 Jan Beich freebsd_committer 2015-06-21 21:08:44 UTC
Kevin is the maintainer, so he should review the patch(es) -> assignee.
Comment 3 Jan Beich freebsd_committer 2015-08-26 13:53:47 UTC
Ping. Can someone from usb@ help with review?
Comment 4 Hans Petter Selasky freebsd_committer 2015-08-27 08:06:04 UTC
Hi,

This patch belongs upstream. I'll to a more through review once they restore the libusb support.

--HPS
Comment 5 Hans Petter Selasky freebsd_committer 2015-08-27 08:06:22 UTC
(In reply to Hans Petter Selasky from comment #4)
s/to/do
Comment 6 Marcin Cieślak 2015-08-27 08:08:32 UTC
Will they?
Comment 7 Jan Beich freebsd_committer 2015-08-30 19:18:25 UTC
Unlikely. usb_libusb.c was basically unmaintained, see my cleanup in ports r390138. My main gripe with working upstream are the following disrespectful requirments:

- Sign up for Google Account (over Tor doesn't work)
- Sign CLA to submit patches

libusb backend in fastboot was abandoned by upstream as well. At least, it was in better shape.

https://code.google.com/p/android/issues/detail?id=15749
https://svnweb.freebsd.org/ports/head/devel/android-tools-fastboot-devel/files/usb_freebsd.cpp
Comment 8 Jan Beich freebsd_committer 2015-10-09 16:18:27 UTC
Assign to new maintainer after ports r398924. usb_libusb.cpp still needs more love, at least in -devel port e.g., try merging

https://android.googlesource.com/platform/system/core/+/3d2904c%5E!/
https://android.googlesource.com/platform/system/core/+/812f030%5E!/
Comment 9 commit-hook freebsd_committer 2016-09-28 09:44:09 UTC
A commit references this bug:

Author: jbeich
Date: Wed Sep 28 09:43:39 UTC 2016
New revision: 422863
URL: https://svnweb.freebsd.org/changeset/ports/422863

Log:
  devel/android-tools-adb{,-devel}: drop unnecessary non-ASCII serial handling

  Linux replaced the code as well in
  https://android.googlesource.com/platform/system/core/+/9309ecbcec42%5E!/

  PR:		199185

Changes:
  head/devel/android-tools-adb/Makefile
  head/devel/android-tools-adb/files/usb_libusb.cpp
  head/devel/android-tools-adb-devel/Makefile
  head/devel/android-tools-adb-devel/files/usb_libusb.cpp