summaryrefslogtreecommitdiffstats
path: root/prebuilt
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2015-10-09 18:15:26 +0200
committerEthan Yonker <dees_troy@teamw.in>2015-10-09 18:15:29 +0200
commitc798c9cd2486e0ff83776002c74f113677b10a84 (patch)
treed128a80cbc58e63a622fda2774e727611f9d2cd4 /prebuilt
parentAdd TW_IGNORE_ABS_MT_TRACKING_ID (diff)
parentmerge in mnc-release history after reset to mnc-dev (diff)
downloadandroid_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar.gz
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar.bz2
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar.lz
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar.xz
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar.zst
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.zip
Diffstat (limited to 'prebuilt')
-rw-r--r--prebuilt/Android.mk33
-rwxr-xr-xprebuilt/permissive.sh8
-rwxr-xr-xprebuilt/relink.sh2
3 files changed, 38 insertions, 5 deletions
diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk
index a3cbd7a0e..25c31478e 100644
--- a/prebuilt/Android.mk
+++ b/prebuilt/Android.mk
@@ -18,6 +18,9 @@ ifneq ($(TW_USE_TOOLBOX), true)
else
RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/sh
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
+ ifneq (,$(filter $(PLATFORM_SDK_VERSION), 23))
+ RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/toybox
+ endif
endif
RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/pigz
RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dosfsck
@@ -41,7 +44,6 @@ RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libc.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcutils.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrecovery.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libusbhost.so
-RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libgccdemangle.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libutils.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libdl.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_com_err.so
@@ -73,8 +75,12 @@ RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libblkid.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmmcutils.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbmlutils.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libflashutils.so
-RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstlport.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libfusesideload.so
+ifeq (,$(filter $(PLATFORM_SDK_VERSION), 23))
+ # These libraries are no longer present in M
+ RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstlport.so
+ RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libgccdemangle.so
+endif
ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22))
# libraries from lollipop
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbacktrace.so
@@ -83,8 +89,18 @@ ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22))
# Dynamically loaded by lollipop libc and may prevent unmounting system if it is not present in sbin
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libnetd_client.so
else
- # Not available in lollipop
- RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcorkscrew.so
+ ifneq (,$(filter $(PLATFORM_SDK_VERSION), 23))
+ # Android M libraries
+ RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbacktrace.so
+ RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libunwind.so
+ RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbase.so
+ RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libc++.so
+ # Dynamically loaded by libc and may prevent unmounting system if it is not present in sbin
+ RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libnetd_client.so
+ else
+ # Not available in lollipop
+ RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcorkscrew.so
+ endif
endif
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmincrypttwrp.so
RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/toolbox
@@ -183,6 +199,15 @@ LOCAL_GENERATED_SOURCES := $(GEN)
LOCAL_SRC_FILES := teamwin $(GEN)
include $(BUILD_PREBUILT)
+#permissive.sh
+include $(CLEAR_VARS)
+LOCAL_MODULE := permissive.sh
+LOCAL_MODULE_TAGS := eng
+LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
+LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
+LOCAL_SRC_FILES := $(LOCAL_MODULE)
+include $(BUILD_PREBUILT)
+
#fix_permissions
include $(CLEAR_VARS)
LOCAL_MODULE := fix_permissions.sh
diff --git a/prebuilt/permissive.sh b/prebuilt/permissive.sh
new file mode 100755
index 000000000..f1046f94e
--- /dev/null
+++ b/prebuilt/permissive.sh
@@ -0,0 +1,8 @@
+#!/sbin/sh
+
+# We use this shell script because the script will follow symlinks and
+# different trees will use different binaries to supply the setenforce
+# tool. Before M we use toolbox, M and beyond will use toybox. The init
+# binary and init.rc will not follow symlinks.
+
+setenforce 0
diff --git a/prebuilt/relink.sh b/prebuilt/relink.sh
index 48be3fcb9..2dd56147e 100755
--- a/prebuilt/relink.sh
+++ b/prebuilt/relink.sh
@@ -11,7 +11,7 @@ process_file()
cp -f -p $src $dst
fi
- sed "s|/system/bin/linker64\x0|/sbin/linker64\x0\x0\x0\x0\x0\x0\x0|g" $src | sed "s|/system/bin/linker\x0|/sbin/linker\x0\x0\x0\x0\x0\x0\x0|g" | sed "s|/system/bin/sh\x0|/sbin/sh\x0\x0\x0\x0\x0\x0\x0|g" > $dst
+ sed "s|/system/bin/linker64\x0|/sbin/linker64\x0\x0\x0\x0\x0\x0\x0|g" $src | sed "s|/system/bin/linker\x0|/sbin/linker\x0\x0\x0\x0\x0\x0\x0|g" | sed "s|/system/bin/sh\x0|/sbin/sh\x0\x0\x0\x0\x0\x0\x0|g" | sed "s|/system/lib64\x0|/sbin\x0\x0\x0\x0\x0\x0\x0\x0\x0|g" | sed "s|/system/lib\x0|/sbin\x0\x0\x0\x0\x0\x0\x0|g" > $dst
if [ $1 == $(dirname $2) ]; then
rm -f $src