1.8 KiB
1.8 KiB
Build OpenVINO™ Runtime for Android systems
This article describes how to build Inference Engine for Android operating systems.
Software requirements
- CMake 3.13 or higher
- Android NDK (this guide has been validated with r20 release)
How to build
- Download and unpack Android NDK. Let's assume that
~/Downloadsis used as a working folder.
cd ~/Downloads
wget https://dl.google.com/android/repository/android-ndk-r20-linux-x86_64.zip
unzip android-ndk-r20-linux-x86_64.zip
mv android-ndk-r20 android-ndk
- Create a build folder:
mkdir build
- Change working directory to
buildand runcmaketo create makefiles. Then runmake.
cd build
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=~/Downloads/android-ndk/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=x86_64 \
-DANDROID_PLATFORM=21 \
-DANDROID_STL=c++_shared \
-DENABLE_OPENCV=OFF
make --jobs=$(nproc --all)
ANDROID_ABIspecifies target architecture:x86_64for x64 buildarmeabi-v7a with NEONfor ARM with NEON supportarm64-v8afor ARM 64 bits
ANDROID_PLATFORM- Android API versionANDROID_STLspecifies that shared C++ runtime is used. Copy~/Downloads/android-ndk/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_shared.sofrom Android NDK along with built binaries
- To reduce the binaries size, use
striptool from NDK:
~/Downloads/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/x86_64-linux-android/bin/strip openvino/bin/intel64/Release/lib/*.so