Skip to content

Commit 87c1be0

Browse files
committed
Initial version
1 parent cad99c1 commit 87c1be0

File tree

2 files changed

+463
-2
lines changed

2 files changed

+463
-2
lines changed

README.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,46 @@
1-
# build-android-tcpdump
2-
Automatically download and compile tcpdump for Android devices
1+
Overview
2+
--------
3+
This script downloads and compiles tcpdump for use on Android devices.
4+
5+
It creates PIE (Position Independant Executable) files, so they also work on Lollipop and Marshmallow.
6+
7+
How to use
8+
----------
9+
Install the latest [Android NDK](http://developer.android.com/ndk/downloads/index.html) then:
10+
11+
export NDK=/path/to/ndk
12+
./build-android-tcpdump
13+
14+
Options
15+
-------
16+
The script allows to download the latest stable version or the latest version from the GIT repository.
17+
Also it's capable of creating tcpdump for multiple architectures.
18+
19+
./build-android-tcpdump -h
20+
Usage: build-android-tcpdump [OPTIONS]
21+
Version: 1.0
22+
Automatically download and build tcpdump for Android devices
23+
Also valid for Lollipop and Marshmallow
24+
25+
OPTIONS:
26+
-h Show this help
27+
-a=ARCHS Space separated architectures to build or all. Default: all
28+
Valid architectures: arm arm64 mips mips64 x86 x86_64
29+
-n=NDK_PATH Path of the Android NDK root
30+
Default: Value of the NDK environment variable
31+
-b=BUILD_DIR Destination of the compiled tcpdump. Default: build
32+
-s Don't strip the final executable
33+
-j=NPROCS Number of simultaneous jobs when compiling
34+
Default: Number of cores of the machine
35+
-t=TCPDUMP_VER Version of tcpdump or "master" for the latest revision in the repository
36+
Default: 4.7.4
37+
-l=LIBPCAP_VER Version of libpcap or "master" for the latest revision in the repository
38+
Default: 1.7.4
39+
-u=TCPDUMP_DIR Don't download tcpdump. Use the one in the specified directory
40+
-m=LIBPCAP_DIR Don't download libpcap. Use the one in the specified directory
41+
42+
Notes
43+
-----
44+
The latest current stable libpcap version 1.7.4 doesn't compile for architectures using Android platforms < 21 (arm, mips and x86). For the moment, as a workaround you can use the GIT version for libpcap:
45+
46+
./build-android-tcpdump -l master

0 commit comments

Comments
 (0)