This commit is contained in:
Ziyang Zhou
2020-12-17 22:18:35 +08:00
parent ce1cc1fd08
commit 319884292f
15 changed files with 194 additions and 36 deletions

7
native_bridge/Dockerfile Normal file
View File

@@ -0,0 +1,7 @@
ARG BASE_IMAGE
FROM $BASE_IMAGE
ADD native-bridge.tar /
# use factory.prop to override prop
COPY factory.prop /factory/factory.prop

35
native_bridge/README.md Normal file
View File

@@ -0,0 +1,35 @@
# Native Bridge Support in ReDroid
There are several choose to support native bridge (typically for arm) in *ReDroid*
- `libndk_translation` from Arm
- `libhoudini` from Intel
- `QEMU`
Prepare the resource and build the image.
And run `docker build --build-arg BASE_IMAGE=<Base Image> .`
```bash
# example structure, be careful the file owner and mode
system/
├── bin
│   ├── arm
│   └── arm64
├── etc
│   ├── binfmt_misc
│   └── init
├── lib
│   ├── arm
│   └── libnb.so
└── lib64
├── arm64
└── libnb.so
# grab libndk_translation from Android 11 Emulator
find /system \( -name 'libndk_translation*' -o -name '*arm*' -o -name 'ndk_translation*' \) | tar -cf native-bridge.tar -T -
```
Example: Patch llibndk_translation in ReDroid 11
![Screenshot of ReDroid 11 with libndk_translation](./redroid_11_libndk_translation.png)

View File

@@ -0,0 +1,10 @@
ro.product.cpu.abilist=x86_64,arm64-v8a,x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=x86_64,arm64-v8a
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.dalvik.vm.isa.arm=x86
ro.dalvik.vm.isa.arm64=x86_64
ro.enable.native.bridge.exec=1
ro.dalvik.vm.native.bridge=libndk_translation.so
# other vendor props
ro.ndk_translation.version=0.2.2

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB