2

When I connect my device to Android Debug Bridge (ADB) over USB using this command:

> adb device

then I get the following (encrypted) 16 characters:

df23582e162esfd2 device

What are these characters? Are they generated by Windows or ADB? Are those characters temporarily stored or shown anywhere else?

Maarten Bodewes
  • 90,524
  • 13
  • 150
  • 263
Amor Lov
  • 41
  • 6

2 Answers2

3

It is not encrypted at all. Check out Settings.Secure#ANDROID_ID if you want to know more about Android ID, the unique 64-bit device identificator usually presented as an hex string. (Also a must read for any developer is the wikipedia article on UUIDs because, you know, there are standards for these things and we should all be using them)

Code for retrieving it in an android application:

import android.provider.Settings.Secure;

private String android_id = Secure.getString(getContext().getContentResolver(),
                                                        Secure.ANDROID_ID); 
NotGaeL
  • 8,344
  • 5
  • 40
  • 70
2

This does not appear to be encrypted, but (at least on the device in front of me) to simply match the value of the ro.serialno property, which you can obtain via

adb shell getprop ro.serialno

How a given manufacturer assigns serial numbers is probably up to them.

Chris Stratton
  • 39,853
  • 6
  • 84
  • 117
  • Thanks but I don't want to match the values I am quite sure that its encrypted IMEI of the device. Do you know where I can find the documentation related to adb and is it even open source or not. – Amor Lov Feb 23 '15 at 18:54
  • 1
    You can find the sources of adb in the AOSP sources, but what you are looking for won't be in there, since adb is just passing the value through and not creating it. This number comes from the device vendor - how they create it is up to them. If you want to see where it is getting filled in at runtime, look through where this property gets set in the vendor build, -if that is something that has been released for your device. – Chris Stratton Feb 23 '15 at 19:32