From https://android.stackexchange.com/questions/236298/android-wont-query-dns-server-for-ipv6-addresses-why/257790#257790
Android's hostname resolver (InetAddress.getAllByName(), etc.) will skip AAAA queries unless the device has an IPv6 routing table entry that covers the magic address 2000::.
As a workaround, we could install radvd on some machine on the network and put something like this into its /etc/radvd.conf:
interface eth0 {
AdvSendAdvert on;
AdvDefaultLifetime 0;
route 2000::/64 {}; # Workaround Android DNS resolver bug
};
According to whois, 2000::/64 is not assigned to anybody at present, and hopefully we'll have real IPv6 service by the time that changes.