Support shared library in recovery mode

The dyanmic linker and the linker config script for the recovery mode
(*.recovery variants) are added to PRODUCT_PACKAGES.

Also this removes the mountpoint /system_root from the recovery image as the
recovery image is self-contained and the real system image is mounted at
/mnt/system which is created automatically at runtime.

Bug: 63673171
Test: `adb reboot recovery; adb devices` shows the device ID
Test: Select 'mount /system' in the recovery mode, then `adb shell`.
$ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from
the /lib directory.

Change-Id: Ice6c75b0b81bb9be696aaff3e095d87f19278995
This commit is contained in:
Jiyong Park 2018-05-29 16:29:24 +09:00
parent cfbe8cf3bb
commit 53acaeab0a
3 changed files with 2 additions and 4 deletions

View file

@ -1396,10 +1396,6 @@ define build-recoveryimage-target
>> $(TARGET_RECOVERY_ROOT_OUT)/prop.default
$(hide) ln -sf prop.default $(TARGET_RECOVERY_ROOT_OUT)/default.prop
$(BOARD_RECOVERY_IMAGE_PREPARE)
$(if $(filter true,$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)), \
$(hide) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/system_root; \
rm -rf $(TARGET_RECOVERY_ROOT_OUT)/system; \
ln -sf /system_root/system $(TARGET_RECOVERY_ROOT_OUT)/system) # Mount the system_root_image to /system_root and symlink /system.
$(hide) $(MKBOOTFS) -d $(TARGET_OUT) $(TARGET_RECOVERY_ROOT_OUT) | $(MINIGZIP) > $(recovery_ramdisk)
$(if $(filter true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VBOOT)), \
$(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(INTERNAL_MKBOOTIMG_VERSION_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $(1).unsigned, \

View file

@ -71,6 +71,7 @@ PRODUCT_PACKAGES += \
javax.obex \
keystore \
ld.config.txt \
ld.config.recovery.txt \
ld.mc \
libaaudio \
libandroid \

View file

@ -71,6 +71,7 @@ PRODUCT_PACKAGES += \
libui \
libutils \
linker \
linker.recovery \
lmkd \
logcat \
lshal \