From 21c97c6967b783c18a66d098ed578b1fc74ade39 Mon Sep 17 00:00:00 2001 From: Tad Date: Mon, 21 Feb 2022 23:30:45 -0500 Subject: [PATCH] Tweak Signed-off-by: Tad --- Scripts/Common/Deblob.sh | 10 ++++++---- Scripts/Common/Functions.sh | 6 ++++-- Scripts/init.sh | 1 + 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Scripts/Common/Deblob.sh b/Scripts/Common/Deblob.sh index 588cade0..b3399047 100644 --- a/Scripts/Common/Deblob.sh +++ b/Scripts/Common/Deblob.sh @@ -60,8 +60,10 @@ echo "Deblobbing..."; makes=$makes"|AntHalService|com.dsi.ant.antradio_library"; #aptX (Bluetooth Audio Compression Codec) [Qualcomm] - blobs=$blobs"|.*aptX.*|libbt-aptx.*.so"; - blobs=$blobs"|aptxui.apk"; + if [ "$DOS_DEBLOBBER_REMOVE_APTX" = true ]; then + blobs=$blobs"|.*aptX.*|libbt-aptx.*.so"; + blobs=$blobs"|aptxui.apk"; + fi; #AT Command Handling/Forwarding (See: https://atcommands.org) blobs=$blobs"|bin[/]atd|drexe|log_serial_arm|at_distributor|connfwexe"; @@ -606,7 +608,7 @@ deblobDevice() { sed -i 's/BOARD_SUPPORTS_SOUND_TRIGGER := true/BOARD_SUPPORTS_SOUND_TRIGGER := false/' BoardConfig*.mk &>/dev/null || true; #Disable Sound Trigger sed -i 's/BOARD_SUPPORTS_SOUND_TRIGGER_HAL := true/BOARD_SUPPORTS_SOUND_TRIGGER_HAL := false/' BoardConfig*.mk &>/dev/null || true; sed -i 's/BOARD_SUPPORTS_SOUND_TRIGGER_5514 := true/BOARD_SUPPORTS_SOUND_TRIGGER_5514 := false/' BoardConfig*.mk &>/dev/null || true; - sed -i 's/AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := true/AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false/' BoardConfig*.mk &>/dev/null || true; #Disable Dolby + if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then sed -i 's/AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := true/AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false/' BoardConfig*.mk &>/dev/null || true; fi; #Disable Dolby sed -i 's/BOARD_ANT_WIRELESS_DEVICE := true/BOARD_ANT_WIRELESS_DEVICE := false/' BoardConfig*.mk &>/dev/null || true; #Disable ANT awk -i inplace '!/BOARD_ANT_WIRELESS_DEVICE/' BoardConfig*.mk &>/dev/null || true; if [ "$DOS_DEBLOBBER_REMOVE_RENDERSCRIPT" = true ] || [ "$DOS_DEBLOBBER_REMOVE_GRAPHICS" = true ]; then @@ -633,7 +635,7 @@ deblobDevice() { awk -i inplace '!/loc.nlp_name/' *.prop *.mk &>/dev/null || true; #Disable QC Location Provider 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_APTX" = true ]; then sed -i 's/bt.enableAptXHD=true/bt.enableAptXHD=false/' *.prop *.mk &>/dev/null || true; fi; #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 if [ "$DOS_DEBLOBBER_REMOVE_DPM" = true ]; then sed -i 's/dpm.feature=11/dpm.feature=0/' *.prop *.mk &>/dev/null || true; #Disable DPM diff --git a/Scripts/Common/Functions.sh b/Scripts/Common/Functions.sh index e58dc28a..8e82c789 100644 --- a/Scripts/Common/Functions.sh +++ b/Scripts/Common/Functions.sh @@ -400,8 +400,10 @@ export -f smallerSystem; deblobAudio() { awk -i inplace '!/BOARD_SUPPORTS_SOUND_TRIGGER/' hardware/qcom/audio-caf/*/configs/*/*.mk &>/dev/null || true; awk -i inplace '!/android.hardware.soundtrigger/' hardware/qcom/audio-caf/*/configs/*/*.mk &>/dev/null || true; - awk -i inplace '!/DOLBY_/' hardware/qcom/audio-caf/*/configs/*/*.mk &>/dev/null || true; - #awk -i inplace '!/vendor.audio.dolby/' hardware/qcom/audio-caf/*/configs/*/*.mk &>/dev/null || true; + if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then + awk -i inplace '!/DOLBY_/' hardware/qcom/audio-caf/*/configs/*/*.mk &>/dev/null || true; + #awk -i inplace '!/vendor.audio.dolby/' hardware/qcom/audio-caf/*/configs/*/*.mk &>/dev/null || true; + fi; } export -f deblobAudio; diff --git a/Scripts/init.sh b/Scripts/init.sh index 62af2ff3..09313c99 100644 --- a/Scripts/init.sh +++ b/Scripts/init.sh @@ -42,6 +42,7 @@ export DOS_REFRESH_PATCHES=true; #Set true to refresh branch-specific patches on export DOS_DEBLOBBER_REMOVE_ACCESSORIES=true; #Set false to allow use of external accessories that depend on blobs export DOS_DEBLOBBER_REMOVE_ATFWD=true; #Set true to remove basic ATFWD blobs export DOS_DEBLOBBER_REMOVE_AUDIOFX=true; #Set true to remove AudioFX +export DOS_DEBLOBBER_REMOVE_APTX=true; #Set true to remove aptX Bluetooth codec export DOS_DEBLOBBER_REMOVE_CNE=true; #Set true to remove all CNE blobs #XXX: Breaks Wi-Fi calling export DOS_DEBLOBBER_REMOVE_DPM=true; #Set true to remove all DPM blobs export DOS_DEBLOBBER_REMOVE_DPP=false; #Set true to remove all Display Post Processing blobs #XXX: Breaks boot on select devices