Try to fixup cell service on crackling

netmgrd appears incompatible with hmalloc
noted by @fishy1337
https://github.com/Divested-Mobile/DivestOS-Build/issues/204#issuecomment-1676439970

Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
Tad 2023-08-18 11:24:02 -04:00
parent ceec1584a9
commit 43e55668fd
No known key found for this signature in database
GPG Key ID: B286E9F57A07424B
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,29 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Fri, 18 Aug 2023 11:22:58 -0400
Subject: [PATCH] Add workaround for netmgrd
Signed-off-by: Tad <tad@spotco.us>
Change-Id: Id889f2a24e534bc3fa42f59726ade7ba615090a5
---
h_malloc.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/h_malloc.c b/h_malloc.c
index f680fa6..2cbb22e 100644
--- a/h_malloc.c
+++ b/h_malloc.c
@@ -1070,6 +1070,13 @@ COLD static void handle_bugs(void) {
if (strcmp(audio_service, path) == 0) {
ro.slot_randomize = false;
}
+
+ // Qualcomm network manager daemon incompatibility
+ if (strstr(path, "netmgrd") != NULL && (strncmp("/system", path, 7) == 0 || strncmp("/vendor", path, 7) == 0)) {
+ ro.zero_on_free = false;
+ ro.purge_slabs = false;
+ ro.region_quarantine_protect = false;
+ }
}
COLD static void init_slow_path(void) {

View File

@ -132,6 +132,7 @@ fi;
if [ "$DOS_GRAPHENE_MALLOC" = true ]; then
if enterAndClear "external/hardened_malloc"; then
applyPatch "$DOS_PATCHES/android_external_hardened_malloc/0001-Broken_Cameras.patch"; #Expand workaround to all camera executables (DivestOS)
applyPatch "$DOS_PATCHES/android_external_hardened_malloc/0002-Broken_netmgrd.patch"; #Add workaround for netmgrd (DivestOS)
fi;
fi;