Backend: work around KernelSU not processing modules on initial install

- KernelSU currently requires the Manager app be run after first rooted to dump /data/adb/ksud, and then it will process any pending modules_update.img on the next reboot
- the above is problematic since some custom kernels providing KernelSU support will require a working module system to overlay .ko kernel modules needed for feature support and sometimes the ROM won't boot without these matching
- work around this KernelSU behavior by dumping ksud ourselves as-needed during the AK3 helper module installation, allowing seamless initial KernelSU kernel support installation with AK3 helper module .ko support

See: https://github.com/tiann/KernelSU/issues/945
This commit is contained in:
osm0sis committed 2023-09-13 16:01:35 -03:00
1 parent 32afd2e411
commit 04376fbe3e
2 files changed
+5 -1

No files matched your search

@@ -430,6 +430,10 @@ do_modules() {
# this may be the initial KernelSU install or first module so setup as needed
if [ -f $AKHOME/kernelsu_patched ]; then
umask 077;
if [ ! -f /data/adb/ksud ]; then
cp -f /data/app/*/me.weishu.kernelsu*/lib/*/libksud.so /data/adb/ksud;
chmod 755 /data/adb/ksud;
fi;
if [ ! -d /data/adb/modules ]; then
mkdir -p /data/adb/modules;
chmod 777 /data/adb/modules;
+1 -1
View File
@@ -3,4 +3,4 @@
# Dummy file; update-binary is a shell script (DO NOT CHANGE)
#
#
# AK_BASE_VERSION=20230910
# AK_BASE_VERSION=20230913