Originally posted on GitHub
This is a a quick application that I constructed for retrieving the network addresses for the interfaces on Android Phones.
While my phones readily show the addresses for the built in network adapters (Wifi, Mobile, Loopback), it doesn't show the address for peripheral addresses such as by connecting a USB network adapter. I needed a way to retrieve the network address for a USB-C Ethernet adapter and made this application for that purpose.
You can find the blog entry for this code on https://blog.j2i.net/2023/10/09/retrieving-all-of-the-ip-addresses-on-android/.