Porting Iperf to Android to learn the Linux porting to Android example

Source: Internet
Author: User

Iperf Transplant Records

1. Generate the header files required for ARM compilation Config.h


./configure--host=arm
If you need make clean

Make Distclean
2. Add android.mk File

Local_path: = $ (call My-dir)


Include $ (clear_vars)


Local_src_files: = \
Compat/delay.cpp \
COMPAT/ERROR.C \
COMPAT/GETTIMEOFDAY.C \
COMPAT/INET_NTOP.C \
COMPAT/INET_PTON.C \
COMPAT/SIGNAL.C \
COMPAT/SNPRINTF.C \
COMPAT/STRING.C \
Compat/thread.c


Local_src_files + = \
Src/client.cpp \
SRC/EXTRACTOR.C \
SRC/GNU_GETOPT.C \
SRC/GNU_GETOPT_LONG.C \
Src/launch.cpp \
Src/list.cpp \
Src/listener.cpp \
SRC/LOCALE.C \
Src/main.cpp \
Src/perfsocket.cpp \
SRC/REPORTCSV.C \
SRC/REPORTDEFAULT.C \
SRC/REPORTER.C \
Src/server.cpp \
SRC/SERVICE.C \
Src/settings.cpp \
SRC/SOCKETADDR.C \
SRC/SOCKETS.C \
SRC/STDIO.C \
Src/tcp_window_size.c


Local_c_includes + = \
$ (Local_path) \
$ (Local_path)/include


Local_cflags + =-wno-format-security


Local_cflags + =-dhave_config_h
Local_ldlibs + =-lpthread


Local_shared_libraries: = libc libm libcutils libnetutils


Local_module_tags: = Optional
Local_module: = Iperf


Include $ (build_executable)


If you do not add local_cflags + =-wno-format-security
Error compiling prompt:
Format not a string literal and no format arguments [-werror=format-security]
Cc1:some warnings being treated as errors
Modify Android.mk
Local_cflags + =-wno-format-security


3. Execute mm-b under the source directory
Generate the Iperf executable file, and push Iperf to System/bin can be used


The whole transplant process is still relatively smooth, the [-werror=format-security] problem on the card for a long time, the Linux C compilation is not familiar.

Porting Iperf to Android to learn the Linux porting to Android example

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.