DivestOS/Patches/LineageOS-16.0/android_system_core/0004-ptrace_scope.patch
Tad c777c74717 16.0 Backports
- hosts toggle
- auto reboot
- bluetooth timeout
- unprivileged microG
- ptrace toggle
- exec spawning toggle

TODO: needs work

Signed-off-by: Tad <tad@spotco.us>
2023-07-27 16:35:00 -04:00

27 lines
888 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: flawedworld <38294951+flawedworld@users.noreply.github.com>
Date: Mon, 5 Apr 2021 03:02:51 +0100
Subject: [PATCH] add a property for controlling ptrace_scope
---
rootdir/init.rc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/rootdir/init.rc b/rootdir/init.rc
index eca5a9f9c..50576e056 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -737,6 +737,12 @@ on property:sys.sysctl.extra_free_kbytes=*
on property:sys.sysctl.tcp_def_init_rwnd=*
write /proc/sys/net/ipv4/tcp_default_init_rwnd ${sys.sysctl.tcp_def_init_rwnd}
+on property:persist.native_debug=true
+ write /proc/sys/kernel/yama/ptrace_scope 0
+
+on property:persist.native_debug=false
+ write /proc/sys/kernel/yama/ptrace_scope 2
+
on property:security.perf_harden=0
write /proc/sys/kernel/perf_event_paranoid 1