From 8b56cd13c67bd895c0e46b4fbc988cfe887bf069 Mon Sep 17 00:00:00 2001 From: Tad Date: Tue, 22 Dec 2020 13:53:29 -0500 Subject: [PATCH] deblobber: Don't remove CNE - breaks Wi-Fi calling - breaks IMS on marlin/sailfish --- Patches/Wallpapers | 2 +- PrebuiltApps | 2 +- Scripts/LineageOS-16.0/Patch.sh | 2 +- Scripts/LineageOS-17.1/Patch.sh | 3 +-- Scripts/init.sh | 2 +- fix_permissions.sh | 35 +++++++++++++++++++++++++++++++++ 6 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 fix_permissions.sh diff --git a/Patches/Wallpapers b/Patches/Wallpapers index 3d2c2de9..82a4cdbd 160000 --- a/Patches/Wallpapers +++ b/Patches/Wallpapers @@ -1 +1 @@ -Subproject commit 3d2c2de937d986c55b0a24eade1b64d9f2bff509 +Subproject commit 82a4cdbd09fc7d89ee22bac327d659b85d2f7d57 diff --git a/PrebuiltApps b/PrebuiltApps index 977f3daf..b236dc94 160000 --- a/PrebuiltApps +++ b/PrebuiltApps @@ -1 +1 @@ -Subproject commit 977f3daf93d9e30746578fb362af92023995a570 +Subproject commit b236dc94714dfb52458ad260155920f7600cafee diff --git a/Scripts/LineageOS-16.0/Patch.sh b/Scripts/LineageOS-16.0/Patch.sh index ad3874ca..88ad9f27 100644 --- a/Scripts/LineageOS-16.0/Patch.sh +++ b/Scripts/LineageOS-16.0/Patch.sh @@ -142,7 +142,7 @@ enterAndClear "packages/apps/SetupWizard"; patch -p1 < "$DOS_PATCHES/android_packages_apps_SetupWizard/0001-Remove_Analytics.patch"; #Remove analytics enterAndClear "packages/apps/Trebuchet"; -cp $DOS_BUILD_BASE/vendor/divested/overlay/common/packages/apps/Trebuchet/res/xml/default_workspace_*.xml res/xml/; #TODO: Fix default workspace replacement +cp $DOS_BUILD_BASE/vendor/divested/overlay/common/packages/apps/Trebuchet/res/xml/default_workspace_*.xml res/xml/; #XXX: Likely no longer needed enterAndClear "packages/apps/Updater"; patch -p1 < "$DOS_PATCHES_COMMON/android_packages_apps_Updater/0001-Server.patch"; #Switch to our server diff --git a/Scripts/LineageOS-17.1/Patch.sh b/Scripts/LineageOS-17.1/Patch.sh index e0e3f6d3..83191ab9 100644 --- a/Scripts/LineageOS-17.1/Patch.sh +++ b/Scripts/LineageOS-17.1/Patch.sh @@ -152,7 +152,7 @@ git revert --no-edit 578a6c99e291f330786af204d9725abaed5a4a32; #hold off on Seed patch -p1 < "$DOS_PATCHES/android_packages_apps_SetupWizard/0001-Remove_Analytics.patch"; #Remove analytics enterAndClear "packages/apps/Trebuchet"; -cp $DOS_BUILD_BASE/vendor/divested/overlay/common/packages/apps/Trebuchet/res/xml/default_workspace_*.xml res/xml/; #TODO: Fix default workspace replacement +cp $DOS_BUILD_BASE/vendor/divested/overlay/common/packages/apps/Trebuchet/res/xml/default_workspace_*.xml res/xml/; #XXX: Likely no longer needed enterAndClear "packages/apps/Updater"; patch -p1 < "$DOS_PATCHES/android_packages_apps_Updater/0001-Server.patch"; #Switch to our server @@ -205,7 +205,6 @@ awk -i inplace '!/EtarPrebuilt/' packages.mk; #lineage-17.1 calendar is Etar for if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then echo "PRODUCT_PACKAGES += GmsCore GsfProxy FakeStore" >> packages.mk; fi; if [ "$DOS_HOSTS_BLOCKING" = false ]; then echo "PRODUCT_PACKAGES += $DOS_HOSTS_BLOCKING_APP" >> packages.mk; fi; echo "PRODUCT_PACKAGES += vendor.lineage.trust@1.0-service" >> packages.mk; #All of our kernels have deny USB patch added -#TODO: Fix default wallpaper override # #END OF ROM CHANGES # diff --git a/Scripts/init.sh b/Scripts/init.sh index b0ed92d4..3cd21d7f 100644 --- a/Scripts/init.sh +++ b/Scripts/init.sh @@ -39,7 +39,7 @@ export DOS_MALWARE_SCAN_SETTING="quick"; #buildAll() scan speed. Options: quick, #Deblobber export DOS_DEBLOBBER_REMOVE_ACCESSORIES=true; #Set false to allow use of external accessories that depend on blobs export DOS_DEBLOBBER_REMOVE_AUDIOFX=true; #Set true to remove AudioFX -export DOS_DEBLOBBER_REMOVE_CNE=true; #Set true to remove all CNE blobs #XXX: Breaks Wi-Fi calling +export DOS_DEBLOBBER_REMOVE_CNE=false; #Set true to remove all CNE blobs #XXX: Breaks Wi-Fi calling 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_RENDERSCRIPT=false; #Set true to remove RenderScript blobs export DOS_DEBLOBBER_REMOVE_FP=false; #Set true to remove all fingerprint reader blobs diff --git a/fix_permissions.sh b/fix_permissions.sh new file mode 100644 index 00000000..ec738fdb --- /dev/null +++ b/fix_permissions.sh @@ -0,0 +1,35 @@ +#!/bin/bash +#Copyright (c) 2020 Divested Computing Group +#License: GPLv3 + +setStrict() { + if [ -d "$1" ]; then + find "$1" -type d -print0 | xargs -0 chmod -v 0700; + find "$1" -type f -print0 | xargs -0 chmod -v 0600; + fi; +} + +setRelaxed() { + if [ -d "$1" ]; then + find "$1" -type d -print0 | xargs -0 chmod -v 0755; + find "$1" -type f -print0 | xargs -0 chmod -v 0644; + fi; +} + +chmod -v 600 LICENSE* pending_commit.txt TODO; +setStrict Manifests; +setStrict Misc; +setStrict Patches/Common; +setRelaxed Patches/Common/android_timekeep_sepolicy; +setRelaxed Patches/Common/android_vendor_divested; +setStrict Patches/LineageOS-11.0; +setStrict Patches/LineageOS-14.1; +setStrict Patches/LineageOS-15.1; +setStrict Patches/LineageOS-16.0; +setStrict Patches/LineageOS-17.1; +setStrict Patches/Linux; #XXX: move this into the repo +chmod -v 700 Patches/Linux/*.sh; +setStrict Patches/Overclocks; +#PrebuiltApps has its own fix_permissions.sh +#Patches/Wallpapers has its own fix_permissions.sh +setStrict Scripts;