3

This should be really easy to find, but I've done a bunch of google searching and haven't found anything that works. On Linux, you just type hostname and it tells you, but that doesn't work on my phone.

I know I've changed the hostname in the past (was android-r at one point), but I don't remember how. All I want to do right now is see what it is, though, so I can connect to it without knowing the dynamic LAN IP address.

6

There's a way to retrieve your device's hostname, but you'll have to meet one requirement, which is to have a Terminal Emulator installed on your device.

Once you have one, just open an instance of the emulator and issue the following command, followed by Enter:

getprop net.hostname

Your phone will then answer with its hostname.

2

This depends on the device.
Some devices don't send their hostname to the router or that hostname is already used, so they are only reachable via their IP address or network local hostname (not device local hostname).

On Windows run tracert <ip> and you see the locally valid hostname of any device.

Example output:

1    94 ms     7 ms     9 ms  android-ce166eae64b93da4.fritz.box [192.168.178.24]´

So the hostname is android-ce166eae64b93da4.fritz.box for this specific network.
Usually the part in front of the network suffix (in this case fritz.box) is unique and works across networks (remember: only local).

  • yeah this didn't work for me, but I was hoping for something I could look at or run on the phone itself anyway – endolith Feb 27 '16 at 18:09
  • This worked correctly, as long as the IP address for the phone is known. This is extremely useful as my phone's IP changes a lot – tisaconundrum Jul 26 at 23: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.