15

Every Android device in our network has the hostname android_[some-hex-number].domain.local. I do have one device which requested 10 IP addresses (different MACs, but always the same hostname). Is there a way to get IMEI or serial number from that hostname?

I found different information about the hostname:

but none of them seems to fit.

PS: MAC addresses are all from "InPro Comm". Maybe there's a way to narrow it down from this side?

  • 6
    AFAIK the hex-number is the ANDROID-ID which is generated randomly when the device is started for the first time (or after a factory reset). Therefore there should not be any relationship to the device, manufacturer or the MAC address. – Robert Oct 13 '16 at 14:09
3

If net.hostname was not preset by device manufacturer during production then Android would use ANDROID_ID to generate the unique android-XXXXXXXXXXXXXXXX host name:

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

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.