4 ms·
DNSResolver was made a modular system component in Android 10 technically, which is why DNS-over-HTTP/3 will also be supported on "some Android 10 devices which
by MishaalRahman 4y ago
DNSResolver was made a modular system component in Android 10 technically, which is why DNS-over-HTTP/3 will also be supported on "some Android 10 devices which adopted Google Play system updates early." Although DNS Resolver was one of the original 13 Project Mainline modules introduced in Android 10, it was optional to implement. It was made mandatory for devices upgrading to or launching with Android 11, however.
Go to "Private DNS" settings under Network & Internet (on Pixel, could be called something else on other OEM devices), select "Private DNS provider hostname", and enter 'dns.google' or 'cloudflare-dns.com' for Google DNS and Cloudflare DNS respectively. Android will add the https:// https:// and /dns-query parts of the URL for you. And yes those two providers are hardcoded right now: https://cs.android.com/android/platform/superproject/+/master:packages/modules/DnsResolver/PrivateDnsConfiguration.h;l=241?q=https:%2F%2Fdns.google%2Fdns-query&ss=android https://cs.android.com/android/platform/superproject/+/maste...
If it doesn't work for you, then DoH support may not have rolled out or be enabled. To check, run this shell command:
cmd device_config get netd_native doh
If it returns '1', then DoH support is enabled. It's enabled by default for Android 13 devices, but for Android 11-12, DNSResolver checks this flag. If it's '0', then you can try running:
cmd device_config put netd_native doh 1
to enable it.