device/generic/common
Révision | c00365909daf0b60dce345c9c6c46bbfffc73560 (tree) |
---|---|
l'heure | 2019-11-20 03:02:09 |
Auteur | Michael Goffioul <michael.goffioul@linc...> |
Commiter | Chih-Wei Huang |
Fix native bridge wrapper
- Be more specific about houdini files to delete (avoid deleting
- Use PRODUCT_PROPERTY_OVERRIDES for ro.dalvik.vm.native.bridge to
- Use losetup/mount to mount the houdini sfs image, toybox's mount does
v2: resolve conflict in nativebridge/bin/enable_nativebridge (cwhuang)
@@ -20,7 +20,7 @@ LOCAL_SHARED_LIBRARIES := libcutils libdl liblog | ||
20 | 20 | LOCAL_C_INCLUDES := system/core/libnativebridge/include |
21 | 21 | LOCAL_MULTILIB := both |
22 | 22 | LOCAL_POST_INSTALL_CMD := $(hide) \ |
23 | - rm -rf $(TARGET_OUT)/*/{arm*,*houdini*} {$(TARGET_OUT),$(PRODUCT_OUT)}/vendor/{*/arm*,*/*houdini*}; \ | |
23 | + rm -rf $(TARGET_OUT)/{bin,lib}/{arm*,*houdini*} {$(TARGET_OUT),$(PRODUCT_OUT)}/vendor/{bin,lib}/{arm*,*houdini*}; \ | |
24 | 24 | mkdir -p $(TARGET_OUT)/{lib/arm,$(if $(filter true,$(TARGET_IS_64_BIT)),lib64/arm64)}; \ |
25 | 25 | touch $(TARGET_OUT)/lib/libhoudini.so $(if $(filter true,$(TARGET_IS_64_BIT)),$(TARGET_OUT)/lib64/libhoudini.so) |
26 | 26 |
@@ -15,7 +15,8 @@ urls[5]=http://tinyurl.com/y6g6cx27 | ||
15 | 15 | |
16 | 16 | mount_sfs() |
17 | 17 | { |
18 | - mount -o 'context="u:object_r:system_file:s0"' $1 $2 | |
18 | + lodevice=`losetup -r -f -s $1` | |
19 | + [ -n "$lodevice" ] && mount -o 'context="u:object_r:system_file:s0"' $lodevice $2 | |
19 | 20 | } |
20 | 21 | |
21 | 22 | if [ -z "$1" ]; then |
@@ -32,7 +32,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ | ||
32 | 32 | endif |
33 | 33 | |
34 | 34 | ifneq ($(HOUDINI_PREINSTALL),intel) |
35 | -PRODUCT_DEFAULT_PROPERTY_OVERRIDES := ro.dalvik.vm.native.bridge=libnb.so | |
35 | +PRODUCT_PROPERTY_OVERRIDES := ro.dalvik.vm.native.bridge=libnb.so | |
36 | 36 | |
37 | 37 | PRODUCT_PACKAGES := libnb |
38 | 38 | endif |