-
Notifications
You must be signed in to change notification settings - Fork 1
LineageOS recovery without adb but g_serial
Sometimes adb is not available when booting Android recovery, aka full OS as well, then there is a need to open another debug tunnel. Here is to mention kernel usb gadget g_serial module. Once compiled in, Android boot img can have a decent boot log viewer.
Here is the most important thing to enable usb g_serial tty. (1) Make sure select as below kernel menuconfig (2) modify android/LineageOS recovery boot.img, by adding “androidboot.console=ttyGS0” to boot cmdline (3) boot it and done.
This can workaround a case where chainloading u-boot->LineageOS recovery then gadget USB configfs is not working. After testing, above mentioned method can have another route to get boot log. Since adb need some more hack on kernel usb composite subsys so there is less willing to “fix” such chainloading problem.
Here is the location to show g_serial module:
│ Symbol: USB_G_SERIAL [=y] │ │ Type : tristate │ │ Defined at drivers/usb/gadget/legacy/Kconfig:291 │ │ Prompt: Serial Gadget (with CDC ACM and CDC OBEX support) │ │ Depends on: USB_SUPPORT [=y] && USB_GADGET [=y] && TTY [=y] │ │ Location: │ │ -> Device Drivers │ │ -> USB support (USB_SUPPORT [=y]) │ │ -> USB Gadget Support (USB_GADGET [=y]) │ │ -> USB Gadget precomposed configurations │ │ -> Serial Gadget (with CDC ACM and CDC OBEX support) (USB_G_SERIAL [=y])