Cross Compile - tcpdump for x86 Cross Compile - tcpdump for x86 android android

Cross Compile - tcpdump for x86


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+ i686root@generic_x86:/data/local/tmp # ./tcpdump  -h                               tcpdump version 4.9.0libpcap version 1.8.1Usage: 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 ]