From 6222ce9ee96227db1078f95d8dd80625f3a9091b Mon Sep 17 00:00:00 2001 From: Tad Date: Sat, 2 Sep 2023 10:28:52 -0400 Subject: [PATCH] Adjust deblob - Put face unlock on a flag - Don't remove the (non-executable) files for Google Camera to silence complaints Signed-off-by: Tad --- Scripts/Common/Deblob.sh | 18 +++++++++++------- Scripts/init.sh | 1 + 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Scripts/Common/Deblob.sh b/Scripts/Common/Deblob.sh index d1a33741..f0f8a719 100644 --- a/Scripts/Common/Deblob.sh +++ b/Scripts/Common/Deblob.sh @@ -229,10 +229,12 @@ echo "Deblobbing..."; #Face Unlock [Google] blobs=$blobs"|libfacenet.so|libfilterpack_facedetect.so|libfrsdk.so"; #legacy - #blobs=$blobs"|android.hardware.biometrics.face.*"; #modern, depends on airbrush - #blobs=$blobs"|manifest_face.xml"; - #blobs=$blobs"|firmware/faceauth"; - #makes=$makes"|android.hardware.biometrics.face.*"; + if [ "$DOS_DEBLOBBER_REMOVE_FACE" = true ]; then #modern + blobs=$blobs"|android.hardware.biometrics.face.*"; #depends on airbrush + blobs=$blobs"|manifest_face.xml"; + #blobs=$blobs"|firmware/faceauth"; + makes=$makes"|android.hardware.biometrics.face.*"; + fi; #GPS [Qualcomm] #blobs=$blobs"|gpsd"; @@ -300,7 +302,7 @@ echo "Deblobbing..."; fi; #Google Camera (app) - blobs=$blobs"|com.google.android.camera.experimental.*"; + #blobs=$blobs"|com.google.android.camera.experimental.*"; #Google Camera (system) Extensions blobs=$blobs"|PixelCameraServices.*.apk"; @@ -895,8 +897,10 @@ deblobVendorBp() { sed -i ':a;N;s/\n/&/3;Ta;/manifest_android.hardware.drm-service.widevine.xml/!{P;D};:b;N;s/\n/&/8;Tb;d' "$bpfile"; sed -i ':a;N;s/\n/&/3;Ta;/manifest_vendor.xiaomi.hardware.mlipay.xml/!{P;D};:b;N;s/\n/&/8;Tb;d' "$bpfile"; sed -i ':a;N;s/\n/&/3;Ta;/vendor.qti.hardware.radio.atcmdfwd@1.0.xml/!{P;D};:b;N;s/\n/&/8;Tb;d' "$bpfile"; - #sed -i ':a;N;s/\n/&/3;Ta;/android.hardware.biometrics.face-service.22.pixel.xml/!{P;D};:b;N;s/\n/&/8;Tb;d' "$bpfile"; - #sed -i ':a;N;s/\n/&/3;Ta;/manifest_face.xml/!{P;D};:b;N;s/\n/&/8;Tb;d' "$bpfile"; + if [ "$DOS_DEBLOBBER_REMOVE_FACE" = true ]; then + sed -i ':a;N;s/\n/&/3;Ta;/android.hardware.biometrics.face-service.22.pixel.xml/!{P;D};:b;N;s/\n/&/8;Tb;d' "$bpfile"; + sed -i ':a;N;s/\n/&/3;Ta;/manifest_face.xml/!{P;D};:b;N;s/\n/&/8;Tb;d' "$bpfile"; + fi; } export -f deblobVendorBp; # diff --git a/Scripts/init.sh b/Scripts/init.sh index 459f2fe2..e646bf00 100644 --- a/Scripts/init.sh +++ b/Scripts/init.sh @@ -45,6 +45,7 @@ export DOS_DEBLOBBER_REMOVE_APTX=false; #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 #XXX: Maybe breaks multi-sim and carrier aggregation (LTE+) export DOS_DEBLOBBER_REMOVE_DPP=false; #Set true to remove all Display Post Processing blobs #XXX: Breaks boot on select devices +export DOS_DEBLOBBER_REMOVE_FACE=false; #Set true to remove all face unlock blobs export DOS_DEBLOBBER_REMOVE_FP=false; #Set true to remove all fingerprint reader blobs export DOS_DEBLOBBER_REMOVE_GRAPHICS=false; #Set true to remove all graphics blobs and use SwiftShader CPU renderer #TODO: Needs work export DOS_DEBLOBBER_REMOVE_EUICC=true; #Set true to remove all Google eUICC blobs