Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

android

adb

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 msg,

D:\>adb devices List of devices attached 5A3C000600000001        device 

Is there anyone who knows how the device ID(5A3C000600000001) string generated? And how can I change the device ID string?

like image 208
user1280781 Avatar asked Mar 20 '12 12:03

user1280781


People also ask

How do I change my adb device ID?

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.

How do I find my adb device name?

You can now connect your device with USB. You can verify that your device is connected by executing adb devices from the android_sdk /platform-tools/ directory. If connected, you'll see the device name listed as a "device." Note: When you connect a device running Android 4.2.

How do I refer to a device with adb?

Use the -s option followed by a device name to select on which device the adb command should run. The -s options should be first in line, before the command.

How do I set up adb devices?

Connect your Android device and run the adb devices command on the Linux terminal. On your Android device, check the box for “Always allow” and then tap on the “Ok” button.


2 Answers

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...

like image 182
Chris Avatar answered Sep 22 '22 15:09

Chris


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.

like image 31
Michael Allen Avatar answered Sep 21 '22 15:09

Michael Allen