Basically, there's a file /etc/dhcpcd/dhcpcd.conf . Is this file or dhcpcd used at all? My phone runs Android 7.1.2 and I wanted to change the default hostname using the hostname somename line in this file, but it looks like it was ignored (there was no change in dhcp request).

I've read something about "legacy Android DHCP client" in the dev options, but I don't have this position there, and also I couldn't find anything about the modern DHCP client, which I think is used now - does it have any config file like dhcpcd?


1 Answer 1


dhcpcd is not used in Android 6+, it was deprecated in favor of Java DHCP client. "Legacy DHCP client" option was available during transition phase but was removed in Android 7 (1, 2). Quoted from source:

The legacy DHCP client has been removed from the platform. The only DHCP client that the platform supports is the DHCP client introduced in M.

net.hostname is set (up to Android 7) by ConnectivityService (runs in Java stack), and DhcpClient uses it (at least up to Android 10). You can set it manually using setprop command or add in some init's .rc file to set on every boot.

does it have any config file like dhcpcd?

No. Java processes running in system_server are not configurable except through some command-line tools e.g. /system/bin/service. However no method is available to set net.hostname.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .