• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps traceroute on android

I also want to work on this API but i have following quires to discuss with you.

Actually java didnt support low level programming, mean we can capture the UDP packets but to deal with ICMP java didnt support it well for this we have to import external libraries in java case its JPCAP or many available, So my question is : In android is there any kind of inbuilt library to support in capturing the packets or we have to import any external library, if yes then please tell me the library name.

thanks :)
 
Upvote 0
IMHO the problem is not with the Java API. Even if you try to use the NDK/ C socket API, you can't create yourself ICMP packets, because you can't create a socket SOCK_RAW. You need to be root for that. In UNIX/Linux you can execute ping/traceroute thanks to the SETUID bit on the commands (i.e. they run as 'root'). In Android as far as I tested, you can run the 'ping' command, but not 'traceroute' (denied)... It is up those building the OS (google/the operators/the manufacturers) to authorize this I suppose...
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones