How could adb identify many devices with same serial number?

by Yidong Han » Thu, 25 Feb 2010 19:15:49 GMT

Sponsored Links
 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,


Other Threads

1. How to open new view (call an activity) from options menu defined in XML

I am trying to open another view from the options menu of my program.

My options_menu.xml:
<menu xmlns:android="">
    <item android:id="@+id/settings_button"
          android:icon="@android:drawable/ic_menu_preferences" />
    <item android:id="@+id/about_button"
          android:icon="@android:drawable/ic_menu_myplaces" />

package com.example.mnfsms;

import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

public class mnfsms extends Activity {
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {

        /*        OnClickListener myocl = new View.OnClickListener() {
        public void onClick(View v){
                Intent myi = new Intent(mnfsms.this, mnfsms_settings.class);

    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(, menu);

        MenuItem mi_settings = (MenuItem)findViewById
        mi_settings.setIntent(new Intent(this,

        return true;

mnfsms_settings (another activity) is what I am trying to open.

Whether the Intent is in the onCreateOptionsMenu or onCreate
functions, the application still crashes when it sets the intent to
the item.

What I have used to try to help me:

2. Strange crashing while using OpenGL


I am currently developing an application that uses OpenGL with the
Android 1.6 SDK.
I am testing on both a Nexus One and an I/O Device (Magic).

The application runs perfectly on the Nexus.

On the Magic, the application crashes >50% of the time on the first
frame with a segmentation fault (see end of post). If it does not
crash immediately, it runs fine and exits normally.

The crash occurs when calling glDrawArrays for one of my vertex buffer
Oddly, when I enable lighting and one light, the application no longer
crashes. Unfortunately this is not a solution because the application
runs too slowly with lighting.

I have found reports of crashing with vertex buffer objects when using
non-direct buffers, but I am using direct buffers.

For debugging, I modified my code to Log each gl call before it was
made. Everything looks fine to me but maybe I'm doing something wrong:

Does anyone have any idea what could be causing the segmentation
Any ideas why lighting would affect it, or why everything is fine on
the Nexus?
Is there something in addition to using direct buffers that needs to
be done when using vertex buffer objects?


*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google_ion/google_ion/sapphire/sapphire:1.6/
pid: 536, tid: 553
signal 11 (SIGSEGV), fault addr 001fa000
 r0 001b51b8  r1 001f9ff8  r2 00000003  r3 001b9e70
 r4 001f9ffc  r5 001b9e74  r6 00000014  r7 000003ff
 r8 00000000  r9 001b9e58  10 00000003  fp 001b51a4
 ip 00000002  sp 44847d08  lr 8042b8dc  pc 8043fdd8  cpsr 20000010
         #00  pc 0003fdd8  /system/lib/
         #01  lr 8042b8dc  /system/lib/
    44847cc8  001af0e0  [heap]
    44847ccc  001177e0  [heap]
    44847cd0  4210aecc
    44847cd4  8043bac0  /system/lib/
    44847cd8  001af0e0  [heap]
    44847cdc  00000000
    44847ce0  001b00e0  [heap]
    44847ce4  804251a0  /system/lib/
    44847ce8  001177e0  [heap]
    44847cec  00984300
    44847cf0  001b5198  [heap]
    44847cf4  001af0e0  [heap]
    44847cf8  001afbdc  [heap]
    44847cfc  00000005
    44847d00  df002777
    44847d04  e3a070ad
#00 44847d08  00000400
    44847d0c  001177e0  [heap]
    44847d10  00989300
    44847d14  001b5198  [heap]
    44847d18  001af0e0  [heap]
    44847d1c  001afbdc  [heap]
    44847d20  00000000
    44847d24  00001000
    44847d28  00000008
    44847d2c  00000000
    44847d30  00000000
    44847d34  001af0e0  [heap]
    44847d38  001b00e0  [heap]
    44847d3c  001177e0  [heap]
    44847d40  4210aecc
    44847d44  4210aeb8
    44847d48  000003c0
    44847d4c  8041f79c  /system/lib/

3. Forward locking or copy protection outside the Marketplace

4. HTC S740 Android Porting

5. View.getLocationInWindow() only returns Y (and sometimes not even X)

6. Thx to boss lesjaw

7. Emulator on Ubuntu problem running after first time starting emulator