Wrong hostname

Message boards : Android : Wrong hostname
Message board moderation

To post messages, you must log in.

AuthorMessage
mirabilos
Avatar

Send message
Joined: 22 May 17
Posts: 7
Message 78130 - Posted: 22 May 2017, 10:51:45 UTC

My device’s rooted and has a custom hostname (CyanogenMod already provides this facility, and I verified it with https://play.google.com/store/apps/details?id=com.tiranodroid.change.hostname&referrer=utm_source%3Ddroidwiki.de%26utm_medium%3Darticle-view%26utm_campaign%3Darticlelink that it’s indeed correct in the system properties.

On WCG, the device turns out as just “android” (all-lowercase), on Enigma@HOME it’s “android_c753fa9d”, and in the event log, I have “reporting hostinfo os name: Android” but nothing about the hostname.

How can this be corrected?

One thing I notice is that /proc/sys/kernel/hostname contains “localhost” and my local PS1 has the device type “trltexx” instead of the chosen hostname…
ID: 78130 · Report as offensive
mirabilos
Avatar

Send message
Joined: 22 May 17
Posts: 7
Message 78285 - Posted: 26 May 2017, 17:58:50 UTC - in response to Message 78153.  

But the hostname is “localhost”, not “android”, so clearly the client uses its own idea of a device name.

(And yes, I can edit such files.)
ID: 78285 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15477
Netherlands
Message 78289 - Posted: 26 May 2017, 18:25:18 UTC - in response to Message 78285.  
Last modified: 26 May 2017, 18:25:39 UTC

If two or more Android devices under the same account sign up as 'localhost', they are seen as one device. Therefore the change was made (4 years back) to name the host 'android-MAC-address'

The server code can check for domain name, IP addr, OS name, processor model and memory size on PC only, not on Android devices. So it cannot differentiate between two wildly differing in hardware Android devices when they're both called localhost.
ID: 78289 · Report as offensive
mirabilos
Avatar

Send message
Joined: 22 May 17
Posts: 7
Message 78573 - Posted: 3 Jun 2017, 23:04:55 UTC - in response to Message 78289.  

But the devices *have* a “host”name. It just happens to not be retrievable using the DNS resolver.
ID: 78573 · Report as offensive

Message boards : Android : Wrong hostname

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.