From 1c9a66f896f33d5816b7a99005003984bd19a419 Mon Sep 17 00:00:00 2001 From: Tad Date: Sat, 29 May 2021 17:29:36 -0400 Subject: [PATCH] Ensure mm-pp-daemon is disabled When not in late_start appears to break boot if not available. Seems to fix oneplus2 and likely ether + others --- Scripts/Common/Deblob.sh | 3 ++- Scripts/LineageOS-15.1/Functions.sh | 14 ++++++++------ Scripts/LineageOS-15.1/Patch.sh | 10 ++++++++++ Scripts/LineageOS-17.1/Functions.sh | 2 +- Scripts/LineageOS-17.1/Patch.sh | 8 +++++++- Scripts/LineageOS-18.1/Patch.sh | 3 +++ 6 files changed, 31 insertions(+), 9 deletions(-) diff --git a/Scripts/Common/Deblob.sh b/Scripts/Common/Deblob.sh index b329f6f9..824697d5 100644 --- a/Scripts/Common/Deblob.sh +++ b/Scripts/Common/Deblob.sh @@ -623,8 +623,8 @@ deblobDevice() { sed -i 's/drm.service.enabled=true/drm.service.enabled=false/' *.prop *.mk &>/dev/null || true; sed -i 's/bt.enableAptXHD=true/bt.enableAptXHD=false/' *.prop *.mk &>/dev/null || true; #Disable aptX if [ "$DOS_DEBLOBBER_REMOVE_CNE" = true ]; then sed -i 's/cne.feature=./cne.feature=0/' *.prop *.mk &>/dev/null || true; fi; #Disable CNE - sed -i 's/dpm.feature=./dpm.feature=0/' *.prop *.mk &>/dev/null || true; #Disable DPM sed -i 's/dpm.feature=11/dpm.feature=0/' *.prop *.mk &>/dev/null || true; #Disable DPM + sed -i 's/dpm.feature=./dpm.feature=0/' *.prop *.mk &>/dev/null || true; #Disable DPM sed -i 's/gps.qc_nlp_in_use=./gps.qc_nlp_in_use=0/' *.prop *.mk &>/dev/null || true; #Disable QC Location Provider sed -i 's/sys.dpmd.nsrm=./sys.dpmd.nsrm=0/' *.prop *.mk &>/dev/null || true; #Disable DPM sed -i 's/bluetooth.emb_wp_mode=true/bluetooth.emb_wp_mode=false/' *.prop *.mk &>/dev/null || true; #Disable WiPower @@ -727,6 +727,7 @@ deblobDevice() { rm -f rootdir/etc/init.qti.ims.sh rootdir/init.qti.ims.sh init.qti.ims.sh; #Remove IMS startup script rm -rf IMSEnabler; #Remove IMS compatibility module fi; + #sed -i '/service ppd /a\ \ \ \ disabled' init.*.rc rootdir/init.*.rc rootdir/etc/init.*.rc &> /dev/null || true; rm -rf ifaa org.ifaa.android.manager; #Remove AliPay if [ "$DOS_DEBLOBBER_REMOVE_IPA" = true ]; then rm -rf data-ipa-cfg-mgr; fi; #Remove IPA rm -rf libshimwvm libshims/wvm_shim.cpp; #Remove Google Widevine compatibility module diff --git a/Scripts/LineageOS-15.1/Functions.sh b/Scripts/LineageOS-15.1/Functions.sh index b360b2c7..ed9ca523 100644 --- a/Scripts/LineageOS-15.1/Functions.sh +++ b/Scripts/LineageOS-15.1/Functions.sh @@ -97,14 +97,16 @@ export -f patchWorkspace; enableDexPreOpt() { cd "$DOS_BUILD_BASE$1"; - #Some devices won't compile, or have too small of a /system partition, or Wi-Fi breaks - if true; then - if [ -f BoardConfig.mk ]; then - echo "WITH_DEXPREOPT := true" >> BoardConfig.mk; - echo "WITH_DEXPREOPT_PIC := true" >> BoardConfig.mk; + if [ -f BoardConfig.mk ]; then + echo "WITH_DEXPREOPT := true" >> BoardConfig.mk; + echo "WITH_DEXPREOPT_DEBUG_INFO := false" >> BoardConfig.mk; + echo "WITH_DEXPREOPT_PIC := true" >> BoardConfig.mk; + if true; then echo "WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := false" >> BoardConfig.mk; - echo "WITH_DEXPREOPT_DEBUG_INFO := false" >> BoardConfig.mk; echo "Enabled full dexpreopt for $1"; + else + echo "WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := true" >> BoardConfig.mk; + echo "Enabled core dexpreopt for $1"; fi; fi; cd "$DOS_BUILD_BASE"; diff --git a/Scripts/LineageOS-15.1/Patch.sh b/Scripts/LineageOS-15.1/Patch.sh index 1de51490..7115bb6f 100644 --- a/Scripts/LineageOS-15.1/Patch.sh +++ b/Scripts/LineageOS-15.1/Patch.sh @@ -228,15 +228,25 @@ echo "/dev/block/platform/msm_sdcc\.1/by-name/misc u:object_r:misc_block_device: enterAndClear "device/asus/msm8916-common"; rm -rf Android.bp sensors; #exact duplicate in asus/flo #XXX be careful with this +enterAndClear "device/huawei/angler"; +sed -i -e '/mm-pp-d/,+4d' init.angler.rc; + enterAndClear "device/lge/msm8996-common"; sed -i '3itypeattribute hwaddrs misc_block_device_exception;' sepolicy/hwaddrs.te; enterAndClear "device/oneplus/oneplus2"; sed -i 's|etc/permissions/qti_libpermissions.xml|vendor/etc/permissions/qti_libpermissions.xml|' proprietary-files.txt; #Fix outdated path +sed -i -e '/mm-pp-d/,+4d' rootdir/etc/init.qcom.rc; #enterAndClear "device/moto/shamu"; #git revert --no-edit 05fb49518049440f90423341ff25d4f75f10bc0c; #restore releasetools #TODO +enterAndClear "device/nextbit/ether"; +sed -i -e '/mm-pp-d/,+4d' rootdir/init.target.rc; + +enterAndClear "device/zte/axon7"; +sed -i -e '/mm-pp-d/,+4d' rootdir/etc/init.qcom.rc; + #Make changes to all devices cd "$DOS_BUILD_BASE"; if [ "$DOS_LOWRAM_ENABLED" = true ]; then find "device" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {} bash -c 'enableLowRam "{}"'; fi; diff --git a/Scripts/LineageOS-17.1/Functions.sh b/Scripts/LineageOS-17.1/Functions.sh index 33a6b1bb..4f785648 100644 --- a/Scripts/LineageOS-17.1/Functions.sh +++ b/Scripts/LineageOS-17.1/Functions.sh @@ -114,7 +114,7 @@ enableDexPreOpt() { if [ -f BoardConfig.mk ]; then echo "WITH_DEXPREOPT := true" >> BoardConfig.mk; echo "WITH_DEXPREOPT_DEBUG_INFO := false" >> BoardConfig.mk; - if [ "$1" != "device/oneplus/oneplus2" ]; then + if true; then echo "WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := false" >> BoardConfig.mk; echo "Enabled full dexpreopt for $1"; else diff --git a/Scripts/LineageOS-17.1/Patch.sh b/Scripts/LineageOS-17.1/Patch.sh index 8be8c750..88714441 100644 --- a/Scripts/LineageOS-17.1/Patch.sh +++ b/Scripts/LineageOS-17.1/Patch.sh @@ -229,6 +229,7 @@ echo "PRODUCT_PACKAGES += vendor.lineage.trust@1.0-service" >> packages.mk; #All # enterAndClear "device/cyanogen/msm8916-common"; awk -i inplace '!/TARGET_RELEASETOOLS_EXTENSIONS/' BoardConfigCommon.mk; #broken releasetools +sed -i -e '/mm-pp-d/,+4d' rootdir/etc/init.qcom.rc; enterAndClear "device/fairphone/FP3"; enableVerity; #Resurrect dm-verity @@ -244,14 +245,19 @@ enterAndClear "device/lge/mako"; echo "pmf=0" >> wifi/wpa_supplicant_overlay.conf; #Wi-Fi chipset doesn't support PMF awk -i inplace '!/TARGET_RELEASETOOLS_EXTENSIONS/' BoardConfig.mk; #broken releasetools -#enterAndClear "device/motorola/clark"; +enterAndClear "device/motorola/clark"; #echo "TARGET_RECOVERY_PERMISSIVE_OVERRIDE := true" >> BoardConfig.mk; #Allow extract_firmware.sh to function +sed -i -e '/mm-pp-d/,+5d' rootdir/init.qcom.rc; + +enterAndClear "device/motorola/griffin"; +sed -i -e '/mm-pp-d/,+4d' rootdir/etc/init.qcom.rc; enterAndClear "device/oneplus/avicii"; enableVerity; #Resurrect dm-verity enterAndClear "device/oneplus/oneplus2"; sed -i 's|etc/permissions/qti_libpermissions.xml|vendor/etc/permissions/qti_libpermissions.xml|' proprietary-files.txt; +sed -i -e '/mm-pp-d/,+5d' rootdir/etc/init.qcom.rc; enterAndClear "device/oneplus/sm8150-common"; enableVerity; #Resurrect dm-verity diff --git a/Scripts/LineageOS-18.1/Patch.sh b/Scripts/LineageOS-18.1/Patch.sh index 992c2c07..22c197be 100644 --- a/Scripts/LineageOS-18.1/Patch.sh +++ b/Scripts/LineageOS-18.1/Patch.sh @@ -258,6 +258,9 @@ enterAndClear "device/moto/shamu"; git revert --no-edit 0ba2cb240e8483fa85fcc831328f70f65eeb7180 2be3c88c331387f03978b75ebc118e09738216d0 ff98fee8fc40d00e1c8b296fd4bb20077bc056d6; #breakage #git revert --no-edit 05fb49518049440f90423341ff25d4f75f10bc0c; #restore releasetools #TODO +enterAndClear "device/nextbit/ether"; +sed -i -e '/mm-pp-d/,+4d' rootdir/init.target.rc; + enterAndClear "device/oneplus/msm8998-common"; awk -i inplace '!/TARGET_RELEASETOOLS_EXTENSIONS/' BoardConfigCommon.mk; #disable releasetools to fix delta ota generation