<p>The <code>java.net.InetAddress.GetByName(String host)</code> method can only return <code>A</code> records so to lookup other record types I need to be able to send DNS queries using the <code>dnsjava</code> library.</p>

<p>However that normally relies on being able to parse <code>/etc/resolv.conf</code> or similar to find the DNS server addresses and that doesn't work on Android.</p>

<p>The current DNS settings on Android can apparently only be obtained from within a shell by using the <code>getprop</code> command.</p>

<p>Can anyone tell me how to get those settings from Java other than by spawning a shell with <code>Runtime.exec()</code> and parsing the output from <code>getprop</code>?</p>

I don't think it's possible for general case. For WiFi I found this:
```
```
WiFiManager wifi = (WifiManager) getSystemService(WIFI_SERVICE); 
DhcpInfo info = wifi.getDhcpInfo();
```
```