Identifying an Android device by its hostname
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 &amp;&amp; id.length() &gt; 0) {
            String name = new String("android-").concat(id);
            SystemProperties.set("net.hostname", name);
        }
    }