I am developing a firewall application in android where I need to identify apps based on uid. I have created a vpn service and I am able to capture packets and get destination ip address.
Is there any way to get uid of apps from packets or datagram sockets.