Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I know that you can find IMEI and MAC address and others by going to Settings -> About phone -> Status. You can also find IMEI by typing *#06# on the keypad. Is there any way to get the ANDROID_ID on the phone itself, as opposed to via this bit of code?

Secure.getString(getApplicationContext().getContentResolver(), Secure.ANDROID_ID);
share|improve this question
    
This was cross posted from StackOverflow and ended up closed. –  t0mm13b Dec 18 '12 at 16:05
add comment

2 Answers 2

up vote 3 down vote accepted

There is no where in the stock system that provides the ID, however there are apps that will provide it, such as Android System Info.

Some stock ROMS hidden menus also contain this info.

share|improve this answer
add comment

You can do this via adb. Does not require root, as far as I know (tested on a Galaxy Nexus running 4.2.1 built from AOSP source):

shell@android:/ $ content query --uri content://settings/secure --projection value --where "name='android_id'"
  settings/secure --projection value --where "name='android_id'"                
  Row: 0 value=<your ID in hexadecimal>
shell@android:/ $
share|improve this answer
2  
If running via a terminal emulator app, root is required. –  Liam W Dec 18 '12 at 15:34
    
adb has more privileges than the local shell user. With Android 4.x (ICS and up), you can even do a full backup via ADB on an unrooted device -- which the shell user for sure cannot. –  Izzy Dec 18 '12 at 17:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.