From be6b03fe9637f6a3383f5f796c8e790e2122aea8 Mon Sep 17 00:00:00 2001 From: Tad Date: Wed, 13 Apr 2022 11:39:11 -0400 Subject: [PATCH] Churn Signed-off-by: Tad --- .../target/product/lowram-inprocess-phone.mk | 21 ------------------- .../build/target/product/lowram-inprocess.mk | 21 ------------------- .../build/target/product/lowram.mk | 5 +---- .../0010-Exec_Based_Spawning-1.patch | 2 +- .../0010-Exec_Based_Spawning-10.patch | 2 +- .../0010-Exec_Based_Spawning-1.patch | 2 +- .../0010-Exec_Based_Spawning-3.patch | 2 +- .../0009-exec_spawning_toggle.patch | 2 +- Scripts/LineageOS-14.1/Patch.sh | 1 + Scripts/LineageOS-17.1/Functions.sh | 5 +---- Scripts/LineageOS-17.1/Patch.sh | 13 ++++++------ Scripts/LineageOS-18.1/Functions.sh | 8 +------ Scripts/LineageOS-18.1/Patch.sh | 9 ++++---- Scripts/LineageOS-19.1/Functions.sh | 2 -- Scripts/LineageOS-19.1/Patch.sh | 1 + 15 files changed, 22 insertions(+), 74 deletions(-) delete mode 100644 Patches/Common/android_vendor_divested/build/target/product/lowram-inprocess-phone.mk delete mode 100644 Patches/Common/android_vendor_divested/build/target/product/lowram-inprocess.mk diff --git a/Patches/Common/android_vendor_divested/build/target/product/lowram-inprocess-phone.mk b/Patches/Common/android_vendor_divested/build/target/product/lowram-inprocess-phone.mk deleted file mode 100644 index 77a8fac3..00000000 --- a/Patches/Common/android_vendor_divested/build/target/product/lowram-inprocess-phone.mk +++ /dev/null @@ -1,21 +0,0 @@ -# -# Copyright (C) 2017 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Changes various properties to reduce memory usage - -# Do not spin up a separate process, use an in-process APK. -PRODUCT_PACKAGES += CellBroadcastAppPlatform -PRODUCT_PACKAGES += CellBroadcastServiceModulePlatform diff --git a/Patches/Common/android_vendor_divested/build/target/product/lowram-inprocess.mk b/Patches/Common/android_vendor_divested/build/target/product/lowram-inprocess.mk deleted file mode 100644 index 823481ac..00000000 --- a/Patches/Common/android_vendor_divested/build/target/product/lowram-inprocess.mk +++ /dev/null @@ -1,21 +0,0 @@ -# -# Copyright (C) 2017 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Changes various properties to reduce memory usage - -# Do not spin up a separate process, use an in-process APK. -PRODUCT_PACKAGES += InProcessNetworkStack -PRODUCT_PACKAGES += com.android.tethering.inprocess diff --git a/Patches/Common/android_vendor_divested/build/target/product/lowram.mk b/Patches/Common/android_vendor_divested/build/target/product/lowram.mk index 1292c923..f39ea7a3 100644 --- a/Patches/Common/android_vendor_divested/build/target/product/lowram.mk +++ b/Patches/Common/android_vendor_divested/build/target/product/lowram.mk @@ -32,13 +32,10 @@ PRODUCT_PROPERTY_OVERRIDES += \ persist.traced.enable=0 # set threshold to filter unused apps -PRODUCT_PROPERTY_OVERRIDES += \ - pm.dexopt.downgrade_after_inactive_days=10 +PRODUCT_PROPERTY_OVERRIDES += pm.dexopt.downgrade_after_inactive_days=10 # Speed profile services and wifi-service to reduce RAM and storage. -ifeq ($(findstring mako,$(TARGET_PRODUCT)),) PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := speed-profile -endif # Always preopt extracted APKs to prevent extracting out of the APK for gms # modules. diff --git a/Patches/LineageOS-16.0/android_frameworks_base/0010-Exec_Based_Spawning-1.patch b/Patches/LineageOS-16.0/android_frameworks_base/0010-Exec_Based_Spawning-1.patch index 4dffdcc9..cfbf8239 100644 --- a/Patches/LineageOS-16.0/android_frameworks_base/0010-Exec_Based_Spawning-1.patch +++ b/Patches/LineageOS-16.0/android_frameworks_base/0010-Exec_Based_Spawning-1.patch @@ -145,7 +145,7 @@ index f0e779694c90..9f41a4136db9 100644 OsConstants._LINUX_CAPABILITY_VERSION_3, 0); StructCapUserData[] data; diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java -index f537e3e2897b..7d51be259c20 100644 +index f537e3e2897b..84a3731576a2 100644 --- a/core/java/com/android/internal/os/ZygoteConnection.java +++ b/core/java/com/android/internal/os/ZygoteConnection.java @@ -880,6 +880,13 @@ class ZygoteConnection { diff --git a/Patches/LineageOS-16.0/android_frameworks_base/0010-Exec_Based_Spawning-10.patch b/Patches/LineageOS-16.0/android_frameworks_base/0010-Exec_Based_Spawning-10.patch index 122bea10..7ea69977 100644 --- a/Patches/LineageOS-16.0/android_frameworks_base/0010-Exec_Based_Spawning-10.patch +++ b/Patches/LineageOS-16.0/android_frameworks_base/0010-Exec_Based_Spawning-10.patch @@ -10,7 +10,7 @@ spawning when doing debugging. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java -index 7d51be259c20..48a68d96e84c 100644 +index 84a3731576a2..752f6c64c76d 100644 --- a/core/java/com/android/internal/os/ZygoteConnection.java +++ b/core/java/com/android/internal/os/ZygoteConnection.java @@ -880,7 +880,7 @@ class ZygoteConnection { diff --git a/Patches/LineageOS-17.1/android_frameworks_base/0010-Exec_Based_Spawning-1.patch b/Patches/LineageOS-17.1/android_frameworks_base/0010-Exec_Based_Spawning-1.patch index 5a8b4418..daa70614 100644 --- a/Patches/LineageOS-17.1/android_frameworks_base/0010-Exec_Based_Spawning-1.patch +++ b/Patches/LineageOS-17.1/android_frameworks_base/0010-Exec_Based_Spawning-1.patch @@ -145,7 +145,7 @@ index f0e779694c90..9f41a4136db9 100644 OsConstants._LINUX_CAPABILITY_VERSION_3, 0); StructCapUserData[] data; diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java -index 52d0adba0a05..96348aa30b87 100644 +index 52d0adba0a05..478ccfb2f568 100644 --- a/core/java/com/android/internal/os/ZygoteConnection.java +++ b/core/java/com/android/internal/os/ZygoteConnection.java @@ -33,6 +33,7 @@ import android.net.Credentials; diff --git a/Patches/LineageOS-17.1/android_frameworks_base/0010-Exec_Based_Spawning-3.patch b/Patches/LineageOS-17.1/android_frameworks_base/0010-Exec_Based_Spawning-3.patch index 5708f00a..be57a30a 100644 --- a/Patches/LineageOS-17.1/android_frameworks_base/0010-Exec_Based_Spawning-3.patch +++ b/Patches/LineageOS-17.1/android_frameworks_base/0010-Exec_Based_Spawning-3.patch @@ -10,7 +10,7 @@ spawning when doing debugging. 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java -index 96348aa30b87..a3051979e341 100644 +index 478ccfb2f568..355c1115fb4f 100644 --- a/core/java/com/android/internal/os/ZygoteConnection.java +++ b/core/java/com/android/internal/os/ZygoteConnection.java @@ -596,7 +596,8 @@ class ZygoteConnection { diff --git a/Patches/LineageOS-17.1/android_packages_apps_Settings/0009-exec_spawning_toggle.patch b/Patches/LineageOS-17.1/android_packages_apps_Settings/0009-exec_spawning_toggle.patch index ee9cff64..e7e6b123 100644 --- a/Patches/LineageOS-17.1/android_packages_apps_Settings/0009-exec_spawning_toggle.patch +++ b/Patches/LineageOS-17.1/android_packages_apps_Settings/0009-exec_spawning_toggle.patch @@ -43,7 +43,7 @@ index 2c7b006f8b..08328ad7b6 100644 android:title="@string/native_debug_title" diff --git a/src/com/android/settings/security/ExecSpawnPreferenceController.java b/src/com/android/settings/security/ExecSpawnPreferenceController.java new file mode 100644 -index 0000000000..78f021210a +index 0000000000..98cc3c29e1 --- /dev/null +++ b/src/com/android/settings/security/ExecSpawnPreferenceController.java @@ -0,0 +1,106 @@ diff --git a/Scripts/LineageOS-14.1/Patch.sh b/Scripts/LineageOS-14.1/Patch.sh index efba13c8..2558a518 100644 --- a/Scripts/LineageOS-14.1/Patch.sh +++ b/Scripts/LineageOS-14.1/Patch.sh @@ -305,6 +305,7 @@ if enter "vendor/divested"; then if [ "$DOS_MICROG_INCLUDED" != "NONE" ]; then echo "PRODUCT_PACKAGES += DejaVuNlpBackend IchnaeaNlpBackend NominatimNlpBackend" >> packages.mk; fi; #Include UnifiedNlp backends if [ "$DOS_MICROG_INCLUDED" = "NLP" ]; then echo "PRODUCT_PACKAGES += UnifiedNLP" >> packages.mk; fi; #Include UnifiedNlp sed -i 's/TalkBack/TalkBackLegacy/' packages.mk; +awk -i inplace '!/downgrade_after_inactive_days/' build/target/product/lowram.mk; #exceeds length limit fi; # #END OF ROM CHANGES diff --git a/Scripts/LineageOS-17.1/Functions.sh b/Scripts/LineageOS-17.1/Functions.sh index d145d75b..34ee7e7e 100644 --- a/Scripts/LineageOS-17.1/Functions.sh +++ b/Scripts/LineageOS-17.1/Functions.sh @@ -126,10 +126,7 @@ export -f enableDexPreOpt; enableLowRam() { cd "$DOS_BUILD_BASE$1"; - if [ -f lineage_$2.mk ]; then - echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage_$2.mk; - #if [ "$3" = true ]; echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram-inprocess.mk)' >> lineage_$2.mk; fi; - fi; + if [ -f lineage_$2.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage_$2.mk; fi; if [ -f BoardConfig.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfig.mk; fi; if [ -f BoardConfigCommon.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfigCommon.mk; fi; echo "Enabled lowram for $1"; diff --git a/Scripts/LineageOS-17.1/Patch.sh b/Scripts/LineageOS-17.1/Patch.sh index 985a3dd2..452d80ab 100644 --- a/Scripts/LineageOS-17.1/Patch.sh +++ b/Scripts/LineageOS-17.1/Patch.sh @@ -406,6 +406,7 @@ if enter "vendor/divested"; then if [ "$DOS_MICROG_INCLUDED" != "NONE" ]; then echo "PRODUCT_PACKAGES += DejaVuNlpBackend IchnaeaNlpBackend NominatimNlpBackend" >> packages.mk; fi; #Include UnifiedNlp backends if [ "$DOS_MICROG_INCLUDED" = "NLP" ]; then echo "PRODUCT_PACKAGES += UnifiedNLP" >> packages.mk; fi; #Include UnifiedNlp echo "PRODUCT_PACKAGES += vendor.lineage.trust@1.0-service" >> packages.mk; #Add deny usb service, all of our kernels have the necessary patch +awk -i inplace '!/speed-profile/' build/target/product/lowram.mk; #breaks compile on some dexpreopt devices fi; # #END OF ROM CHANGES @@ -477,12 +478,12 @@ removeBuildFingerprints || true; enableAutoVarInit || true; #Tweaks for <2GB RAM devices -enableLowRam "device/asus/fugu" "fugu" true; -enableLowRam "device/motorola/harpia" "harpia" true; -enableLowRam "device/motorola/merlin" "merlin" true; -enableLowRam "device/motorola/msm8916-common" "msm8916-common" true; -enableLowRam "device/motorola/osprey" "osprey" true; -enableLowRam "device/motorola/surnia" "surnia" true; +enableLowRam "device/asus/fugu" "fugu"; +enableLowRam "device/motorola/harpia" "harpia"; +enableLowRam "device/motorola/merlin" "merlin"; +enableLowRam "device/motorola/msm8916-common" "msm8916-common"; +enableLowRam "device/motorola/osprey" "osprey"; +enableLowRam "device/motorola/surnia" "surnia"; #Tweaks for <3GB RAM devices enableLowRam "device/cyanogen/msm8916-common" "msm8916-common"; enableLowRam "device/motorola/clark" "clark"; diff --git a/Scripts/LineageOS-18.1/Functions.sh b/Scripts/LineageOS-18.1/Functions.sh index 93cbe06d..67c1bd6e 100644 --- a/Scripts/LineageOS-18.1/Functions.sh +++ b/Scripts/LineageOS-18.1/Functions.sh @@ -187,13 +187,7 @@ export -f enableDexPreOpt; enableLowRam() { cd "$DOS_BUILD_BASE$1"; - if [ -f lineage_$2.mk ]; then - echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage_$2.mk; - #if [ "$3" = true ]; echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram-inprocess.mk)' >> lineage_$2.mk; fi; - #if [ "$4" = true ]; echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram-inprocess-phone.mk)' >> lineage_$2.mk; fi; - fi; - #if [ -f BoardConfig.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfig.mk; fi; #XXX: Disables use of scudo hardened memory allocator - #if [ -f BoardConfigCommon.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfigCommon.mk; fi; + if [ -f lineage_$2.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage_$2.mk; fi; echo "Enabled lowram for $1"; cd "$DOS_BUILD_BASE"; } diff --git a/Scripts/LineageOS-18.1/Patch.sh b/Scripts/LineageOS-18.1/Patch.sh index 7ddce1ff..57e6d277 100644 --- a/Scripts/LineageOS-18.1/Patch.sh +++ b/Scripts/LineageOS-18.1/Patch.sh @@ -418,6 +418,7 @@ if [ "$DOS_MICROG_INCLUDED" != "NONE" ]; then echo "PRODUCT_PACKAGES += DejaVuNl if [ "$DOS_MICROG_INCLUDED" = "NLP" ]; then echo "PRODUCT_PACKAGES += UnifiedNLP" >> packages.mk; fi; #Include UnifiedNlp echo "PRODUCT_PACKAGES += vendor.lineage.trust@1.0-service" >> packages.mk; #Add deny usb service, all of our kernels have the necessary patch echo "PRODUCT_PACKAGES += eSpeakNG" >> packages.mk; #PicoTTS needs work to compile on 18.1, use eSpeak-NG instead +awk -i inplace '!/speed-profile/' build/target/product/lowram.mk; #breaks compile on some dexpreopt devices fi; # #END OF ROM CHANGES @@ -559,10 +560,10 @@ removeBuildFingerprints || true; enableAutoVarInit || true; #Tweaks for <2GB RAM devices -enableLowRam "device/samsung/msm8930-common" "msm8930-common" true true; -enableLowRam "device/samsung/serrano3gxx" "serrano3gxx" true true; -enableLowRam "device/samsung/serrano-common" "serrano-common" true true; -enableLowRam "device/samsung/serranoltexx" "serranoltexx" true true; +enableLowRam "device/samsung/msm8930-common" "msm8930-common"; +enableLowRam "device/samsung/serrano3gxx" "serrano3gxx"; +enableLowRam "device/samsung/serrano-common" "serrano-common"; +enableLowRam "device/samsung/serranoltexx" "serranoltexx"; #Tweaks for <3GB RAM devices enableLowRam "device/asus/flox" "flox"; enableLowRam "device/fairphone/FP2" "FP2"; diff --git a/Scripts/LineageOS-19.1/Functions.sh b/Scripts/LineageOS-19.1/Functions.sh index 7769d35e..81188d18 100644 --- a/Scripts/LineageOS-19.1/Functions.sh +++ b/Scripts/LineageOS-19.1/Functions.sh @@ -129,8 +129,6 @@ export -f enableDexPreOpt; enableLowRam() { cd "$DOS_BUILD_BASE$1"; if [ -f lineage_$2.mk ]; then echo -e '\n$(call inherit-product, vendor/divested/build/target/product/lowram.mk)' >> lineage_$2.mk; fi; - #if [ -f BoardConfig.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfig.mk; fi; #XXX: Disables use of scudo hardened memory allocator - #if [ -f BoardConfigCommon.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfigCommon.mk; fi; echo "Enabled lowram for $1"; cd "$DOS_BUILD_BASE"; } diff --git a/Scripts/LineageOS-19.1/Patch.sh b/Scripts/LineageOS-19.1/Patch.sh index 23c21f8a..8e52b78e 100644 --- a/Scripts/LineageOS-19.1/Patch.sh +++ b/Scripts/LineageOS-19.1/Patch.sh @@ -373,6 +373,7 @@ if [ "$DOS_MICROG_INCLUDED" != "NONE" ]; then echo "PRODUCT_PACKAGES += DejaVuNl if [ "$DOS_MICROG_INCLUDED" = "NLP" ]; then echo "PRODUCT_PACKAGES += UnifiedNLP" >> packages.mk; fi; #Include UnifiedNlp #echo "PRODUCT_PACKAGES += vendor.lineage.trust@1.0-service" >> packages.mk; #Add deny usb service, all of our kernels have the necessary patch #XXX 19REBASE: is this necessary? echo "PRODUCT_PACKAGES += eSpeakNG" >> packages.mk; #PicoTTS needs work to compile on 18.1, use eSpeak-NG instead +awk -i inplace '!/speed-profile/' build/target/product/lowram.mk; #breaks compile on some dexpreopt devices sed -i 's/wifi,cell/internet/' overlay/common/frameworks/base/packages/SystemUI/res/values/config.xml; #Use the modern quick tile fi; #