Cross Compile - tcpdump for x86

大城市里の小女人 提交于 2019-12-01 02:35:54

Alternatively, you can build tcpdump with NDK using this script build-android-tcpdump.

Steps:

  1. Install NDK: NDK download

  2. Download build-android-tcpdump and simply run:

    sh build-android-tcpdump -n "/PATH/TO/NDK" -t 4.9.0 -l 1.8.1

That's it, it will build tcpdump for all Android arches by default, including x86.

root@generic_x86:/data/local/tmp # uname -srm                                  
Linux 3.10.0+ i686

root@generic_x86:/data/local/tmp # ./tcpdump  -h                               
tcpdump version 4.9.0
libpcap version 1.8.1
Usage: tcpdump [-aAbdDefhHIJKlLnNOpqStuUvxX#] [ -B size ] [ -c count ]
        [ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ]
        [ -i interface ] [ -j tstamptype ] [ -M secret ] [ --number ]
        [ -Q in|out|inout ]
        [ -r file ] [ -s snaplen ] [ --time-stamp-precision precision ]
        [ --immediate-mode ] [ -T type ] [ --version ] [ -V file ]
        [ -w file ] [ -W filecount ] [ -y datalinktype ] [ -z postrotate-command ]
        [ -Z user ] [ expression ]
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!