0

Given the fact that Android doesn't include a trace-route command, how can I implement the network utility within my app? I know a trace-route is just ping until pinging every hop/router on the way - but how can I do this grammatically? I tried searching for libraries on GitHub and Maven repositories but no luck of anything I can use. I don't mind implementing it myself. I hope I don't have to do this from scratch like crafting a packet and using a socket to connect to every router on the way. Another question would be how to obtain the IP of every router to the destination in Java?

leonheess
  • 5,825
  • 6
  • 42
  • 67
miatech
  • 1,976
  • 7
  • 33
  • 61
  • Look into this https://stackoverflow.com/questions/2627706/how-to-icmps-and-traceroutes-in-java – Sambit May 16 '19 at 16:03
  • that's for windows and linux, I want to implement in android... in that post the code access the command through the os. android os doesn't have that option.. thanks – miatech May 16 '19 at 16:07
  • I've seen plenty of android apps developing this traceroute but can't figure out how they did it – miatech May 16 '19 at 16:08
  • So did you find this post: [Traceroute on android](https://stackoverflow.com/q/4203374/295004) and the github project listed as an answer was/wasn't useful? (I see command line 'ping' command in source code which give me doubt) – Morrison Chang May 16 '19 at 17:20

0 Answers0