Skip to content
No description, website, or topics provided.
C Shell Java HTML
Branch: master
Clone or download
Latest commit 0f2cfa0 Oct 11, 2018

Cross Compile Nginx with RTMP Module for Android

See full Chinese explanation blog here:交叉编译带RTMP模块的Nginx到Android/

Succeed on macOS Sierra 10.12.5, macOS High Sierra 10.13.6, Ubuntu 14.04.5, with Android NDK r15c

Feel free to open issue if you have any question.


  • Download latest stable version source code tarball of Nginx ( will extract it automatically)
  • Download latest stable version source code of nginx-rtmp-module
  • Download and extract latest LTS version source code of openssl and openssl-fips(no need for openssl-1.1.0 series)
  • Download this repo and place source codes as following:
    ├── glob (glob.c and glob.h will be copied to nginx/src/os/unix/ by
    │   ├── glob.c
    │   └── glob.h
    ├── nginx-1.12.0/ (this directory is generated by during extracting the counterpart tarball file)
    │   └── ...
    ├── nginx-1.12.0.tar.gz (Nginx source code tarball file, the version could be different)
    ├── nginx-rtmp-module/
    │   └── ...
    ├── openssl-1.1.0f/ (openssl source code directory, the version could be different)
    │   └── ...
    ├── openssl-fips-2.0.16/ (openssl-fips source code directory, the version could be different, no need for openssl-1.1.0 series)
    │   └── ...
    └── sdcard (this directory will be generated if compile successfully)
        └── nginx
  • Download and install Android SDK if never installed before, make sure adb path is added to environment PATH and it works well
  • Download and install Android NDK if never installed before, modify if needed (ANDROID_NDK_ROOT, _ANDROID_EABI, _ANDROID_API, etc.)


execute these commands in Terminal:

# the leading period is important
. ./
. ./

How to run nginx on Android

See NginxDemo.

License OpenSSL license
glob.c and glob.h(source): BSD-3-Clause License
other files: WTFPL

You can’t perform that action at this time.