android-iperf

November 14, 2021 ยท View on GitHub

Build Status GitHub license

Getting Started

What is iPerf / iPerf3 ?

iPerf3 is a tool for active measurements of the maximum achievable bandwidth on IP networks. It supports tuning of various parameters related to timing, buffers and protocols (TCP, UDP, SCTP with IPv4 and IPv6). For each test it reports the bandwidth, loss, and other parameters. This is a new implementation that shares no code with the original iPerf and also is not backwards compatible. iPerf was orginally developed by NLANR/DAST. iPerf3 is principally developed by ESnet / Lawrence Berkeley National Laboratory. It is released under a three-clause BSD license.

https://iperf.fr/

Remark No iperf/iperf3 source codes are included in this repo

Supported versions

iPerf2

VersionRelease daySource CodeComments
2.0.52010-07-08Source Code
2.0.102017-08-11Source Code
2.0.112018-05-24Source Codecompiled w/o HAVE_AF_PACKET
2.0.122018-06-26Source Codecompiled w/o HAVE_AF_PACKET
2.0.132019-01-22Source Codecompiled w/o HAVE_AF_PACKET
2.1.32021-07-15Source Codecompiled w/o HAVE_AF_PACKET, HAVE_LINUX_UDP_H!
2.1.42021-08-19Source Codecompiled w/o HAVE_AF_PACKET, HAVE_LINUX_UDP_H, HAVE_TUNTAP_TUN, HAVE_TUNTAP_TAP!

iPerf3

VersionRelease daySource Code
3.1.62017-02-02Source Code
3.1.72017-03-03Source Code
3.22017-06-26Source Code
3.2rc12017-06-19Source Code
3.32017-10-30Source Code
3.42018-02-12Source Code
3.52018-02-28Source Code
3.62018-06-22Source Code
3.72019-06-20Source Code
3.82020-06-08Source Code
3.8.12020-06-10Source Code
3.92020-08-17Source Code
3.102021-05-26Source Code
3.10.12021-06-02Source Code

Download

Compiled iperf and iperf3 binaries using SDK 4333796 and NDK r19 for devices with Android 9.0+ (API level 28+) - Travis-CI Deployment.

ABIBinaries
arm64-v8ahere
armeabi-v7ahere
x86here
x86_64here

More about Application Binary Interface (ABI): https://developer.android.com/ndk/guides/abis

To get supported ABI by an Android device:

adb shell getprop ro.product.cpu.abilist

Build

Prerequisites

Docker

Running

  1. Clone this repo
  2. Build image from Dockerfile
docker build -t android-ndk:latest .
  1. Run container and fetch binaries
docker run -d --name android-ndk-container android-ndk
mkdir -p binaries
docker cp -a android-ndk-container:/tmp/libs binaries
docker stop android-ndk-container

Usage

Upload a binary file (with compatible ABI) to an Android device

adb push <LOCAL_PATH_TO_BINARY_FILE>/<BINARY_NAME> /data/local/tmp/<BINARY_NAME>
adb shell chmod 777 /data/local/tmp/<BINARY_NAME>

iperf

Set a default iperf

adb shell ln -s /data/local/tmp/<IPERF2_BINARY_NAME> iperf

Execute iperf

adb shell /data/local/tmp/iperf <IPERF_ARGUMENTS>

iperf3

Set a default iperf3

adb shell ln -s /data/local/tmp/<IPERF3_BINARY_NAME> iperf3

Execute iperf3

adb shell /data/local/tmp/iperf3 <IPERF_ARGUMENTS>

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

iPerf community - iperf.fr