How can I change the device name? (adb devices)

前端 未结 5 541
Happy的楠姐
Happy的楠姐 2020-12-05 10:06

I\'d like to change the device ID string which can be seen when I type \'adb devices\' at command prompt. If I type \'adb devices\' at command prompot then I can see below m

相关标签:
5条回答
  • 2020-12-05 10:25

    I have several identical development systems (Odroid A) which report the same device code, thereby preventing me from using more than one on the same host PC with adb. Unfortunately there doesn't seem to be a way of changing this from the gingerbread GUI on this platform as previously suggested.

    The device serial number (as reported by 'adb devices') appears to be set in the kernel, under arch/arm/plat-s5p/devs.c (look for 'device_serial'). This may be different for your device, I'd suggest a grep through the kernel sources for the device ID that is reported by adb devices. Change the string, rebuild the kernel and flash it on...

    Looks to be different on ICS by the way...

    0 讨论(0)
  • 2020-12-05 10:34

    I was also facing the same issue.where two device connected were showing same id in adb devices.

    I found this link which solved my issue. Just downloaded the adb from the following link and replaced my original adb.

    adb got two same serial numbers when connected to two smart phones

    0 讨论(0)
  • 2020-12-05 10:37

    In android go to Settings > Applications > Development and tap on Device Hostname. You can then change the name and it should show up when attached to adb.

    Another solution can be found here: http://forum.xda-developers.com/showthread.php?t=1462320. You will need to get root access and install a terminal client and do some low level hacking to get it fixed.

    Another option is to use the Hosts app mentioned in http://www.thriveforums.org/forum/toshiba-thrive-networking/3157-how-do-i-change-device-name.html, though I haven't been able to find the app he is referring to.

    Best option I think is just install Cyanogenmod on your devices. It's the most stable custom android rom and has lots of helpful other features that aren't in stock android.

    0 讨论(0)
  • 2020-12-05 10:48

    You can set persist.usb.serialno property. I checked it on Galaxy S4/S4 mini and it's persistent, but you need root access:

    adb shell
    su
    setprop persist.usb.serialno Phone1_GalaxyS4
    exit
    adb reboot
    

    Than in adb devices you'll have

    C:\Users\amdc2452>adb devices
    List of devices attached
    Phone1_GalaxyS4    device
    
    0 讨论(0)
  • 2020-12-05 10:49

    If you have root access, you can enter this to a terminal emulator:

    > su (to gain superuser access)
    > getprop net.hostname (this should display the current network name)
    > setprop net.hostname <newhostname>
    

    Disconnect then reconnect from the network to refresh.

    I was on a Samsung Galaxy Note on ICS. Worked like a charm...

    0 讨论(0)
提交回复
热议问题