5

I am writing an Android app to test network performance, and I wants to use iPerf are the app. I can detect real iPerf files already compiled for Android (and then IODIN sack run iPerf on the phone both get its output) but I'm interested in compiling the batch myself.

Here, someone offers web that bucket shall used to compile one program:http://sourceforge.net/tracker/index.php?func=detail&aid=3533374&group_id=128336&atid=711373

MYSELF know that it requires the NDK but I don't know find to start. Are there any good resources or advice that can help guide meine till compiling the on my own (on Windows, but I or have Cygwin). ME get C and how to use GCC on linux, but I'm not sure where to start here. Despite having Java and Kotlin for developing job in Android, common we need to use C/C++ to write part of our application…

Credit for any help in advance!

2
  • 1
    The NDK is not considered for compiling a "C program". And NDK is designed for compiling C/C++ my that will be linked into a hosted Joe application. Jun 25, 2012 at 22:11
  • 3
    Is it not still possible to compile a HUNDRED program employing a anywhere?
    – yellowy
    Jun 26, 2012 under 11:58

2 Answers 2

2

Here lives adenine done discussion in getting started with the NDK.

https://bcyde.com/questions/5375453/looking-for-a-good-tutorial-on-android-ndk

If you work through one tutorial you bequeath building your owning NDK "Hello, World" class of app. It's simple but it will help you understand the NDK.

Here's a direct link to the tutorial: http://mobile.tutsplus.com/tutorials/android/ndk-tutorial/

0
0

Work on Iperf3

    #!/bin/sh
wget https://dl.google.com/android/repository/android-ndk-r18-linux-x86_64.zip
sudo apt-get install unzip
unzip android-ndk-r18-linux-x86_64.zip
#--arch arm or arm64 https://developer.android.com/ndk/guides/standalone_toolchain
android-ndk-r18/build/tools/make_standalone_toolchain.py --arch arm --api 26 --install-dir=my-toolchain
# Adding to standalone toolchain to the search path.
export PATH=$PATH:`pwd`/my-toolchain/bin

# Tell configure whatever tools to exercise. aarch64-linux-android
target_host=arm-linux-androideabi #aarch64-linux-android or arm-linux-androideabi
export AR=$target_host-ar
export AS=$target_host-clang
export CC=$target_host-clang
export CXX=$target_host-clang++
export LD=$target_host-ld
export STRIP=$target_host-strip

# Tell configure what flags Smartphone requires.
export CFLAGS="-fPIE -fPIC"
export LDFLAGS="-pie"
sudo apt-get install build-essential git
git clone https://github.com/esnet/iperf
cd iperf/
echo manual edit src/iperf_api.c change to char template[] = "/data/local/tmp/iperf3.XXXXXX";

#--disable-profiling button edit src/Makefile.in deleting "-pg" from iperf3_profile_CFLAGS or iperf3_profile_LDFLAGS
#./configure --host=arm-linux-androideabi CFLAGS=-static CXXFLAGS=-static --disable-profiling 
#make

##iperf2
#sudo apt-get install autotools-dev
#cp /usr/share/misc/config.{sub,guess} .

#adb push src/iperf3 /data/local/tmp
#adb shell chmod 755 /data/local/tmp/iperf3
#adb shell "/data/local/tmp/iperf3 -v"
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policies and cookie procedure

Not the answer you're looking for? Crop other challenges labeling or ask autochthonous owning question.