tiann / KernelSU

A Kernel based root solution for Android
https://kernelsu.org
GNU General Public License v3.0
9.92k stars 1.61k forks source link

ADB not working after flashing a simple module #1710

Closed powellnorma closed 4 months ago

powellnorma commented 4 months ago

Please check before submitting an issue

Describe the bug

After flashing a simple module that just overwrites /system/etc/hosts and rebooting, adb is not working anymore. The device simply does not show up anymore, no matter what I try.

Deleting /data/adb/ksu/modules.img via termux and rebooting fixes the issue. In termux I can also see that /system/etc/hosts does get correctly replaced / over-mounted.

One thing that looks suspicious to me:

[   18.812591] [pid:1,cpu0,init]init: Service 'exec 5 (/data/adb/ksud)' (pid 701) exited with status 0 waiting took 0.150053 seconds
[   18.812652] [pid:1,cpu0,init]init: Wait for exec took 0.150207 seconds
[   18.814117] [pid:1,cpu0,init]init: processing action (sys.usb.config=hisuite,mtp,mass_storage,adb && sys.usb.configfs=1)
[   18.814331] [pid:1,cpu0,init]init: write_file: Unable to write to '/config/usb_gadget/g1/UDC': No such device
[   18.814727] [pid:1,cpu0,init]init: Service 'macaddr' (pid 693) exited with status 0
[   18.815124] [pid:1,cpu0,init]init: cannot find '/sbin/adbd', disabling 'adbd': No such file or directory

In dmesg.log.old, cannot find '/sbin/adbd', disabling 'adbd' does not appear.

I know this kernel is quite old, and it could be a weird kernel bug. So I don't expect anyone to spend much time with this. Just wanted to ask in case someone as an idea. Thank you!

KernelSU_bugreport_2024-05-08_10_23.tar.gz

To Reproduce

No response

Expected behavior

No response

Screenshots

No response

Logs

No response

Device info

Additional context

No response

tiann commented 4 months ago

Your android version is too low, try change this: https://github.com/tiann/KernelSU/blob/e0267a22f81650f222e275d6383d36e805cf5da1/userspace/ksud/src/defs.rs#L32