Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not dectected when launched #45

Open
schmkl opened this issue Jan 24, 2024 · 3 comments
Open

Module not dectected when launched #45

schmkl opened this issue Jan 24, 2024 · 3 comments

Comments

@schmkl
Copy link

schmkl commented Jan 24, 2024

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.

@ppvan
Copy link

ppvan commented Feb 15, 2024

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

@255doesnotexist
Copy link

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

image

and opened a pull request to fully fix this problem.

@cauafroes
Copy link

@ppvan thanks for the info, helped me here. in my case the code was a little different, so i used the the /data/adb/modules directory in the code itself and worked. thanks for your work

-d "/data/adb/modules" ] && MOUNTPATH="/data/adb/modules

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants