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.