1. Are you ready for the Galaxy S20? Here is everything we know so far!

traceroute on android

Discussion in 'Android Development' started by loveyoucrazy, Aug 3, 2010.

  1. loveyoucrazy

    loveyoucrazy Lurker
    Thread Starter

    Hi guys,
    I tried to launch traceroute and capture its output in my android app, but I got an IOException, even if I type the command in android's console, it says permission is denied. Any one knows how to solve the problem? Thanks~
     



    1. Download the Forums for Android™ app!


      Download

       
  2. DiscGolfer17

    DiscGolfer17 Newbie

    You need to have root access.
     
  3. 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 :)
     
  4. pweltz

    pweltz Lurker

    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...
     
Loading...
Similar Threads - traceroute android
  1. RedHeadDev
    Replies:
    2
    Views:
    172
  2. Anirudha Deshpande
    Replies:
    0
    Views:
    153
  3. Sunny Rio
    Replies:
    9
    Views:
    347
  4. AntiMorrisey
    Replies:
    2
    Views:
    471
  5. Troubled Koentje
    Replies:
    20
    Views:
    693
  6. Alchemist Studio
    Replies:
    0
    Views:
    330
  7. mlgch1
    Replies:
    8
    Views:
    484
  8. zoezydk
    Replies:
    7
    Views:
    532
  9. ironass
    Replies:
    7
    Views:
    671
  10. ironass
    Replies:
    2
    Views:
    740

Share This Page

Loading...