I was looking at changing the device name on my phone and the only instructions I found were to either root the device or use adb.

This got me thinking: is changing the device name restricted because the device name is packed with device specific information?

What, if anything, does the android device name reveal and what value does it have for tracking users/devices?

As requested an example device name: android-8ad48b628850044

  • 1
    @peterh i agree the question is too broad. As the name of the device is just a tag the subject of how that can be used doesn't fit this question. – Robert Feb 3 '17 at 9:13

The device name is constructed as follows on first use:

    // setup our unique device name
    if (TextUtils.isEmpty(SystemProperties.get("net.hostname"))) {
        String id = Settings.Secure.getString(context.getContentResolver(),
        if (id != null && id.length() > 0) {
            String name = new String("android-").concat(id);
            SystemProperties.set("net.hostname", name);

Where ANDROID_ID is a random 64-bit number.

So essentially the device name is unique and does not change during the lifetime of the device. While it does not reveal anything about the device itself, it might be used to track the device.

  • 3
    It's not clear from that whether a factory reset would clear the device name. That may be interesting if you treat it as identifying then dispose of the phone. – Chris H Feb 3 '17 at 10:57
  • 1
    That often depends on the manufacturer (ROM) and the type of reset used. In general a full reset including the system partition will cause it to be regenerated. – Rolf ツ Feb 3 '17 at 11:14
  • System apps can change the ANDROID_ID, such apps already exist in Play Store. – molnarm Feb 3 '17 at 12:00
  • 1
    Also it isn't unique to the device, different users on the device will have different ids. – Malcolm Feb 3 '17 at 14:59
  • Re "it might be used to track the device": ...but one could also use the MAC address for that, which will not be changed even by a full factory reset of the device. (Although it seems that Google has introduced MAC address randomization to Android with version 6.0, following the lead of iOS.) – user2428118 Feb 3 '17 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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