May 2017
Beginner to intermediate
470 pages
10h 49m
English
Since the libnb.so library is the key starting point for Native Bridge support in Android-x86, we will dive into the details of it now. The Makefile to build libnb.so can be found at device/generic/common/nativebridge/Android.mk. The source code for libnb.so includes only one file, libnb.cpp, as follows:
#define LOG_TAG "libnb" #include <dlfcn.h> #include <cutils/log.h> #include <cutils/properties.h> #include "nativebridge/native_bridge.h" namespace android { static void *native_handle = nullptr; static NativeBridgeCallbacks *get_callbacks() { static NativeBridgeCallbacks *callbacks = nullptr; if (!callbacks) { const char *libnb = "/system/" #ifdef __LP64__ "lib64/arm64/" #else "lib/arm/" #endif "libhoudini.so"; ...Read now
Unlock full access