Android’s C libraries, dynamic linkers, NDK API levels, and APK packaging rules differ from desktop Linux distributions. When doing cross-end integration for RKNN or other native libraries, you must choose the official target build respectively.
Read the dependencies of the library first
Use readelf -h and readelf -d on the development machine to check the machine type and required shared libraries. If a library for glibc is mixed into the Android build, changing the file name will not change the dependency. Check the ABI directory and the actual number of process bits in the APK, and confirm that the dependent libraries are complete.
Do a smaller experiment than the full application
First let the minimal JNI method load the target library and return the version, then add a fixed input to perform an inference. When the library can be loaded but the device cannot be opened, the next step is to check the devices exposed by the target image and the allowed calling paths. There is no need to repeatedly change the APK file name.
Fixed two sets of delivery catalogs
Group Linux and Android header files, runtime libraries, examples, and licensing information by target. Recording the required system version, application ABI and target image allows the integrator to determine which set of files should be obtained from the directory.
Check the native libraries that need to be transplanted on the development machine
readelf -h ./libexample.so
readelf -d ./libexample.so
Replace ./libexample.so with the shared library to be checked.
Board documentation and references

- ArmSoM Sige5 · hardware and interface manual · Sige5 · product page
- ABI supported by Android NDK
- Rockchip RKNN-Toolkit2
