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

ADB not working after flashing a simple module #1710

Closed
2 of 3 tasks
powellnorma opened this issue May 8, 2024 · 1 comment · Fixed by #1713
Closed
2 of 3 tasks

ADB not working after flashing a simple module #1710

powellnorma opened this issue May 8, 2024 · 1 comment · Fixed by #1713

Comments

@powellnorma
Copy link
Contributor

Please check before submitting an issue

  • I have searched the issues and haven't found anything relevant
  • I will upload bugreport file in KernelSU Manager - Settings - Report log
  • I know how to reproduce the issue which may not be specific to my device

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
Copy link
Owner

tiann commented May 8, 2024

Your android version is too low, try change this:

pub const TEMP_DIR_LEGACY: &str = "/sbin";

@tiann tiann closed this as completed May 8, 2024
powellnorma pushed a commit to powellnorma/KernelSU that referenced this issue May 8, 2024
powellnorma pushed a commit to powellnorma/KernelSU that referenced this issue May 8, 2024
powellnorma pushed a commit to powellnorma/KernelSU that referenced this issue May 9, 2024
tiann pushed a commit that referenced this issue May 16, 2024
Fixes #1710

What do you think?

* It first uses `TEMP_DIR` (`/debug_ramdisk`) if it exists + is is
empty.
* Otherwise it tries to create a random directory in `/dev`.
* If that fails, it goes through a list of directories (including
`TEMP_DIR_LEGACY`), and chooses the first one that is empty.
* If no empty directory it chooses the first one that exists

---------

Co-authored-by: user <user@localhost>
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

Successfully merging a pull request may close this issue.

2 participants