Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
Tad 2022-04-13 11:39:11 -04:00
parent 486e358050
commit be6b03fe96
15 changed files with 22 additions and 74 deletions

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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 {

View File

@ -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 {

View File

@ -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;

View File

@ -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 {

View File

@ -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 @@

View File

@ -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

View File

@ -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";

View File

@ -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";

View File

@ -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";
}

View File

@ -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";

View File

@ -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";
}

View File

@ -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;
#