My app needs to know the peer device’s IP address when my device is a group owner (GO) in a wifi-direct P2P connection (usually GO acts as DHCP server and peer station receives the IP from the server). I figured out that the DHCP client list is stored in /data/misc/dhcp/dnsmasq.leases file, but the app has to be part of “dhcp” group to read that file and I am getting EACCES (Permission denied) when trying to read it.
Is there a permission that I can add in the manifest to read that file? Or is there any other way to get this DHCP client list from java/native Android framework without root?