• Home
Name Date Size #Lines LOC

..--

include/nativebridge/06-Sep-2024-485106

tests/06-Sep-2024-2,0431,071

Android.bpD06-Sep-20242.5 KiB10190

README.mdD06-Sep-20241.1 KiB2518

libnativebridge.map.txtD06-Sep-20241.1 KiB3230

native_bridge.ccD06-Sep-202425.3 KiB751543

native_bridge_lazy.ccD06-Sep-20242.8 KiB9459

nb-diagram.pngD06-Sep-2024448.5 KiB

README.md

1# Native Bridge
2
3A native bridge enables apps with native components to run on systems with
4different ISA or ABI.
5
6For example, an application which has only native ARM binaries may run on an x86
7system if there’s a native bridge installed which can translate ARM to x86. This
8is useful to bootstrap devices with an architecture that is not supported by the
9majority of native apps in the app store (it closes the gap between the number
10of apps that can be run on that particular architecture).
11
12Starting from L, AOSP supports native bridges (note that it *does not* provide
13an actual native bridge).
14
15The `libnativebridge` library handles loading of native libraries with a foreign
16ISA (aka *translated* libraries in the *guest* environment) into a managed JVM
17process using the native ISA in the *host* environment. Note that loading
18translated libraries and their dependencies in the guest environment is done by
19a separate linker, which typically uses a different linker config than the host
20one.
21
22![Zygote/app startup integration diagram](nb-diagram.png)
23
24See also [design doc](http://go/native-bridge) (internal only).
25