Android VNDK
Build system help to check depedencies between modules, build a vendor-specific variant for vendor modules and automatically installs these modules into designed directories.
When the dependencies are invisible to the build system (e.g. shared libraries that may be opened with dlopen() in runtime), you should specify the module names in PRODUCT_PACKAGES to install those modules explicitly.
The Vendor Native Development Kit (VNDK) is a set of libraries used by other libraries or binaries, in the vendor or product partition, on runtime for dlopen.
These libraries are used by the vendor image, on the system image.
Type | Used by System image | Used by Vendor image | Install | Example | Comments |
---|---|---|---|---|---|
Core | Yes | No | System image | cc_library { | |
Vendor-only | No | Yes | Vendor image | cc_library { | |
vendor_available | No | Yes | Vendor image | cc_library { | |
VNDK | N/A | Yes | System image | cc_library { | When a lib is marked as vendor_available:true, it’s built twice: Once for platform (and thus installed to /system/lib) Once for vendor (and thus installed to /vendor/lib or VNDK APEX) |
vndk-sp | Yes | Yes | System image | cc_library { | |
llndk | Yes | Yes | System image /system/lib[64] | cc_library { |
参考资料:
- https://source.android.com/docs/core/architecture/vndk/enabling
- https://source.android.com/docs/core/architecture/vndk