lhroot icon indicating copy to clipboard operation
lhroot copied to clipboard

Module not dectected when launched

Open schmkl opened this issue 2 years ago • 3 comments

Hello, I'm receiving an error "Module not detected" when I launch the module by the command (lhroot) on the command line. The error is occurring when use the Busybox NDK or Built-in Busybox, I've tried everything to make it works and it doesnt.

Device Details: Samsung S10e Running Android 12

Hope someone can help me to do a work to my old (but good) phone.

schmkl avatar Jan 24 '24 20:01 schmkl

I got the same issue and be able to fix the script for my device, here is some details

Here is the part cause module not detected module. Take a look before read below

https://github.com/FerryAr/lhroot/blob/7dcff8b709365a95c5dbc1b3c0ed8811f850be2c/system/bin/lhroot#L13C1-L32C1

On my device, modules are located at /data/adb/module and I don't have ksu so the KSU variable is false which cause the MODPATH to MOUNTPATH="$(magisk --path)/.magisk/modules", this directory does not exist on my device, so MODDIR point to an invalid directory and module not detected.

The fix is simple though, I login using adb root then adb shell create a dupplication of the script

cp /system/bin/lhroot /data/sdcard/myscript.sh

Edit the script with vi and change the line

which ksud >/dev/null && KSU=true || KSU=false

to

KSU=true

run myscript with

sh /data/sdcard/myscript.sh

Note: I'm not sure about your device and I am not a magisk module expert, just have some experience with programing and bash

ppvan avatar Feb 15 '24 15:02 ppvan

@ppvan I tried your fix and it works. thanks.

image

and opened a pull request to fully fix this problem.

255doesnotexist avatar Mar 20 '24 21:03 255doesnotexist