FerryAr / lhroot

Linux Chroot Installer & Bootscript Magisk Module.
GNU General Public License v3.0
184 stars 23 forks source link

Module not dectected when launched #45

Open schmkl opened 6 months ago

schmkl commented 6 months ago

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 commented 5 months ago

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 commented 4 months ago

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

image

and opened a pull request to fully fix this problem.