How to use tcpdump to capture packets on Android

Source: Internet
Author: User
A few days ago, I was looking at how to capture the beacon of the ap in real time on Android, instead of calling wifiscan. so I studied how to use tcpdump on Android. Unfortunately, it was finally discovered that it was not available. However, here we record the process for reference. This method is only applicable to the cracked ROM. To use tcpd

A few days ago, I was looking at how to capture the beacon image of the ap in real time on Android, instead of calling wifiscan.TcpdumpIn Android. Unfortunately, it was finally discovered that it was not available. However, here we record the process for reference. This method is only applicable to the cracked ROM.

To use tcpdump, download the binary executable files that can be run on Android, including here and here. If you want to compile one by yourself, please refer to this article.

The next thing is simple.


Adb push./tcpdump-arm./any-place-you-want


Chmod 777 tcpdump-arm




As long as you have the su permission, you can directly execute the command. If you want to get the result of tcpdump in the android app, you can use one line of statements.


Runtime.getruntime(cmd.exe c ("tcpdump-p-vvv-w/sdcard/result ");



As long as the user permission is set correctly, there should be no problem.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.