From 38ad98892460a1d3a675c6bad15e8fc9a82e445d Mon Sep 17 00:00:00 2001 From: Tad Date: Fri, 26 Mar 2021 16:32:02 -0400 Subject: [PATCH] Potentially fixup manta - Deblobber: don't remove mfc_fw.bin, used for media decode - Deblobber: don't remove es305_fw.bin, used for audio processing - don't force dexpreopt on manta, likely breaks Wi-Fi - fix some SELinux denials on manta --- Scripts/Common/Deblob.sh | 3 +-- Scripts/LineageOS-14.1/Functions.sh | 2 +- Scripts/LineageOS-14.1/Patch.sh | 6 +++++- Scripts/LineageOS-18.1/Patch.sh | 1 - 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Scripts/Common/Deblob.sh b/Scripts/Common/Deblob.sh index b14072f0..ce7a1f1a 100644 --- a/Scripts/Common/Deblob.sh +++ b/Scripts/Common/Deblob.sh @@ -132,7 +132,6 @@ echo "Deblobbing..."; #DivX (DRM) [DivX] blobs=$blobs"|libDivxDrm.so|libSHIMDivxDrm.so"; - blobs=$blobs"|mfc_fw.bin"; #DPM (Data Power Management) [Qualcomm] #https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/dpm/ [headers] @@ -500,7 +499,7 @@ echo "Deblobbing..."; #blobs=$blobs"|libadpcmdec.so|sound_trigger.primary.*.so|libgcs.*.so|libsmwrapper.so"; blobs=$blobs"|audiomonitor|qvop-daemon"; blobs=$blobs"|HotwordEnrollment.apk|HotwordEnrollment.*.apk"; - blobs=$blobs"|es305_fw.bin"; + #blobs=$blobs"|es305_fw.bin"; #XXX: breaks audio #blobs=$blobs"|aonvr1.bin|aonvr2.bin"; #XXX: required by adspd, likely for more than VR blobs=$blobs"|vendor.qti.voiceprint.*"; #makes=$makes"|android.hardware.soundtrigger.*|libsoundtriggerservice"; diff --git a/Scripts/LineageOS-14.1/Functions.sh b/Scripts/LineageOS-14.1/Functions.sh index c1e53a43..f7866ff4 100644 --- a/Scripts/LineageOS-14.1/Functions.sh +++ b/Scripts/LineageOS-14.1/Functions.sh @@ -119,7 +119,7 @@ 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 [ "$1" != "device/amazon/thor" ] && [ "$1" != "device/samsung/i9100" ] && [ "$1" != "device/samsung/maguro" ] && [ "$1" != "device/samsung/toro" ] && [ "$1" != "device/samsung/toroplus" ] && [ "$1" != "device/samsung/tuna" ] && [ "$1" != "device/asus/grouper" ]; then + if [ "$1" != "device/amazon/thor" ] && [ "$1" != "device/asus/grouper" ] && [ "$1" != "device/samsung/i9100" ] && [ "$1" != "device/samsung/maguro" ] && [ "$1" != "device/samsung/manta" ] && [ "$1" != "device/samsung/toro" ] && [ "$1" != "device/samsung/toroplus" ] && [ "$1" != "device/samsung/tuna" ]; then if [ -f BoardConfig.mk ]; then echo "WITH_DEXPREOPT := true" >> BoardConfig.mk; echo "WITH_DEXPREOPT_PIC := true" >> BoardConfig.mk; diff --git a/Scripts/LineageOS-14.1/Patch.sh b/Scripts/LineageOS-14.1/Patch.sh index 45d50da8..72edee20 100644 --- a/Scripts/LineageOS-14.1/Patch.sh +++ b/Scripts/LineageOS-14.1/Patch.sh @@ -265,8 +265,12 @@ rm board-info.txt; #Never restrict installation enterAndClear "device/samsung/exynos5420-common"; awk -i inplace '!/shell su/' sepolicy/shell.te; #neverallow -#enterAndClear "device/samsung/manta"; +enterAndClear "device/samsung/manta"; #git revert --no-edit e55bbff1c8aa50e25ffe39c8936ea3dc92a4a575; #restore releasetools #TODO +echo "allow audioserver sensorservice_service:service_manager find;" >> sepolicy/audioserver.te; +echo "allow mediacodec audio_device:chr_file getattr;" >> sepolicy/mediacodec.te; +echo "allow mediacodec camera_device:chr_file getattr;" >> sepolicy/mediacodec.te; +echo "allow mediacodec sysfs:file read;" >> sepolicy/mediacodec.te; enterAndClear "device/samsung/toroplus"; awk -i inplace '!/additional_system_update/' overlay/packages/apps/Settings/res/values*/*.xml; diff --git a/Scripts/LineageOS-18.1/Patch.sh b/Scripts/LineageOS-18.1/Patch.sh index 4593b3c8..a8f1dc71 100644 --- a/Scripts/LineageOS-18.1/Patch.sh +++ b/Scripts/LineageOS-18.1/Patch.sh @@ -249,7 +249,6 @@ sed -i '3itypeattribute hwaddrs misc_block_device_exception;' sepolicy/hwaddrs.t awk -i inplace '!/TARGET_RELEASETOOLS_EXTENSIONS/' BoardConfigCommon.mk; #broken releasetools enterAndClear "device/lge/mako"; -git revert --no-edit 6081a4436b3d20536650cb11c37e64709bd33159; #Fix vibrator logspam 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