Loading...

android-kernel@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: [android-kernel] How could adb identify many devices with same serial number? Mike Lockwood Thu Feb 25 20:00:17 2010

In the android devices I have worked on, the serial number is
programmed into flash.  The bootloader passes it to the kernel via the
kernel command line and this is then passed to the USB driver.  See
arch/arm/mach-msm/devices-htc.c in the msm kernel for an example.

Mike

On Thu, Feb 25, 2010 at 9:55 PM, Yidong Han
<[EMAIL PROTECTED]> wrote:
> Hi Mike,
> Thanks a lot for your quick reply.
> But I still get some confusions.
> Like HTC, they assigned device serial number like the followings:
> HT97KL900624 device
> HT94LLZ00229 device
> If they assigned it by this way, HT97KL should be the model name, the
> following digits may be the real serial number, if it is this case, only
> 999999 devices could be assigned for each model, am I correct?
> Another questions is if each device has a unique serial number, how could we
> assign it when we make volume production.
> I mean like we have millions device to make, how could we assigned it
> dynamically? Because I checked the source code
> linux\linux-2.6.29\drivers\usb\gadget\android.c
> It seems we could only change the serial number at
> /* String Table */
> static struct usb_string strings_dev[] = {
> /* These dummy values should be overridden by platform data */
> [STRING_MANUFACTURER_IDX].s = "Android",
> [STRING_PRODUCT_IDX].s = "Android",
> [STRING_SERIAL_IDX].s = "0123456789ABCDEF",
> {  } /* end of list */
> };
> In this case, each time, we have to change it and rebuild the android kernel
> again. Is any other way around for the volume production?
> Thank you so much for your help.
> Best wishes,
> Yidong
>
> 2010/2/26 San Mehat <[EMAIL PROTECTED]>
>>
>>
>> On Thu, Feb 25, 2010 at 11:02 AM, Mike Lockwood <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> Each device needs to have its own unique serial number even if they
>>> are the same model.  That is the whole point of the serial number.
>>> Otherwise there is no way to tell them apart and you have this
>>> problem.
>>>
>>
>> *SMH*
>>
>>>
>>> Mike
>>>
>>> On Wed, Feb 24, 2010 at 9:43 PM, Yidong Han
>>> <[EMAIL PROTECTED]> wrote:
>>> > Now I am trying to plug in many devices with same model and hence same
>>> > serial number to the host Ubuntu PC.
>>> >
>>> > When I execute the command:
>>> > $ adb devices
>>> >
>>> > I got these results:
>>> >
>>> > List of devices attached
>>> > 0123456789ABCDEF        device
>>> > 0123456789ABCDEF        device
>>> > 0123456789ABCDEF        device
>>> > 0123456789ABCDEF        device
>>> > ......
>>> >
>>> > All the above are the real devices with the same serial number.
>>> >
>>> > If I run:
>>> > $ adb shell
>>> >
>>> > error: more than one device and emulator
>>> >
>>> > $adb -s 0123456789ABCDEF shell
>>> > #
>>> >
>>> > But for the last case, the adb just connect the first plugged in
>>> > device, and I could not find way to connect to other devices.
>>> >
>>> > So do you guys know a way to work this problem around?
>>> >
>>> > And I notices, the emulator could be identified by port number, like:
>>> >
>>> >
>>> > List of devices attached
>>> > emulator-5554  device
>>> > emulator-5556  device
>>> > emulator-5558  device
>>> > ...
>>> >
>>> > How could I implement such mechanism for the real devices?
>>> >
>>> > I will thank you so much for your help.
>>> >
>>> > Best wishes,
>>> > Neil
>>> >
>>> > --
>>> > unsubscribe: [EMAIL PROTECTED]
>>> > website: http://groups.google.com/group/android-kernel
>>> >
>>>
>>>
>>>
>>> --
>>> Mike Lockwood
>>> Google android team
>>>
>>> --
>>> unsubscribe: [EMAIL PROTECTED]
>>> website: http://groups.google.com/group/android-kernel
>>
>>
>>
>> --
>> ----------
>> San Mehat
>> Staff Software Engineer
>> Google Inc.
>> o: 650-253-7422
>> c: 408-382-1249
>> [EMAIL PROTECTED]
>>
>> --
>> unsubscribe: [EMAIL PROTECTED]
>> website: http://groups.google.com/group/android-kernel
>



-- 
Mike Lockwood
Google android team

-- 
unsubscribe: [EMAIL PROTECTED]
website: http://groups.google.com/group/android-kernel