I use my android phone(s) as a wifi hotspot, clients get IPs from the network. Previously, when the phone was running android 9, internal name resolution for those clients worked fine, as those were configured to:

[root@laptop1 username]# cat /etc/dhclient.conf 
send host-name = gethostname();

and nslookup laptop1 yielded 192.168.43.xxx on laptop2.

Now, after the change to android 10 (new phone), this no longer works.

It seems like it is because dnsmasq was replaced with something else in A10 (Hotspot mobile network tethering and DNS). How do I get the original behavior back? Thanks.

Rooting is not an option, unfortunately.

  • Unfortunately you cannot force/configure Android's new Java DHCP server to remember host names of DHCP clients for later name resolution by DNS server (which is dnsmasq). Explanation on how things work is in my answer to android.stackexchange.com/a/215878/218526 May 16, 2021 at 8:46
  • Did not find anything about new java dhcpd in android 10 on the page you've linked, unfortunately. To cut it short - a bugreport should be filed against A10 dhcpd, right? This is a clear regression from A9-. Thanks May 17, 2021 at 9:45
  • Android stack exchange is not the right place to discuss Android's internal functioning of DHCP. See the source code for that: android.googlesource.com/platform/packages/modules/NetworkStack/…. But the DHCP server is not configurable as I already stated. You can rebuild your ROM though, with modified source code. My answer linked above explains how DHCP/DNS works regarding local host name resolution. Knowing the inner details, in some cases, you can hack the standard functionality according to your needs. May 17, 2021 at 10:00
  • Thanks for link to the dhcpd source! I'll check what could be done there.. May 17, 2021 at 12:57


You must log in to answer this question.

Browse other questions tagged .