4ntoine 4ntoine - 2 years ago 95
Android Question

How to link against android system v8?

The project i'm working uses v8 JavaScript Engine. We embed v8 right in our native library (libfoo-jni.so) to have full control over v8 engine. However it makes file size too large for some apps so we're asked to use system v8. I was unable to find v8 headers in NDK's

platforms/android-Z/arch-arm/usr/include
.

Is there any possibility to link against system V8 that is used for android
WebView
behind the scene? It should work without rooting and not for android devices manufacturers who have access to android platform on the device.

Answer Source

No, that's not supported.

On older versions, it might be possible to do even though it's not officially supported, but in recent Android versions, the platform will refuse to load external libraries except for those that are supported. (See Android 7.0 Behavior Changes for more details.)

In addition to that, there are no guarantees for the API/ABI of the bundled javascript engine - in older versions the platform could even be built with either v8 or JavaScriptCore. Any device manufacturer could be using a different, modified version.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download