prebuilt: bash: Copy bash related files to /sbin instead of /system
* It seems that when the system partition is mounted, bash cannot access the ramdisk files it needs to
* This patch addresses the said issue by moving the files bash needs to /sbin
Change-Id: I65788408b2f45b239467613a2c026f2ee410455b
diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk
index 8769926..17636ae 100644
--- a/prebuilt/Android.mk
+++ b/prebuilt/Android.mk
@@ -655,22 +655,12 @@
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)/sbin
LOCAL_REQUIRED_MODULES := bash
- ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
- LOCAL_POST_INSTALL_CMD += \
- mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/system_root/system/etc/bash; \
- cp -rf external/bash/etc/* $(TARGET_RECOVERY_ROOT_OUT)/system_root/system/etc/bash/; \
- sed -i 's/ro.cm.device/ro.product.device/' $(TARGET_RECOVERY_ROOT_OUT)/system_root/system/etc/bash/bashrc; \
- sed -i 's/ro.lineage.device/ro.product.device/' $(TARGET_RECOVERY_ROOT_OUT)/system_root/system/etc/bash/bashrc; \
- sed -i 's/ro.omni.device/ro.product.device/' $(TARGET_RECOVERY_ROOT_OUT)/system_root/system/etc/bash/bashrc; \
- sed -i '/export TERM/d' $(TARGET_RECOVERY_ROOT_OUT)/system_root/system/etc/bash/bashrc;
- else
- LOCAL_POST_INSTALL_CMD += \
- mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/system/etc/bash; \
- cp -rf external/bash/etc/* $(TARGET_RECOVERY_ROOT_OUT)/system/etc/bash/; \
- sed -i 's/ro.cm.device/ro.product.device/' $(TARGET_RECOVERY_ROOT_OUT)/system/etc/bash/bashrc; \
- sed -i 's/ro.lineage.device/ro.product.device/' $(TARGET_RECOVERY_ROOT_OUT)/system/etc/bash/bashrc; \
- sed -i 's/ro.omni.device/ro.product.device/' $(TARGET_RECOVERY_ROOT_OUT)/system/etc/bash/bashrc; \
- sed -i '/export TERM/d' $(TARGET_RECOVERY_ROOT_OUT)/system/etc/bash/bashrc;
- endif
+LOCAL_POST_INSTALL_CMD += \
+ mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/sbin/etc/bash; \
+ cp -rf external/bash/etc/* $(TARGET_RECOVERY_ROOT_OUT)/sbin/etc/bash/; \
+ sed -i 's/ro.cm.device/ro.product.device/' $(TARGET_RECOVERY_ROOT_OUT)/sbin/etc/bash/bashrc; \
+ sed -i 's/ro.lineage.device/ro.product.device/' $(TARGET_RECOVERY_ROOT_OUT)/sbin/etc/bash/bashrc; \
+ sed -i 's/ro.omni.device/ro.product.device/' $(TARGET_RECOVERY_ROOT_OUT)/sbin/etc/bash/bashrc; \
+ sed -i '/export TERM/d' $(TARGET_RECOVERY_ROOT_OUT)/sbin/etc/bash/bashrc;
include $(BUILD_PHONY_PACKAGE)
endif