Full Version: I found ADB debugging method via USB(OTG) Port
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I really needed ADB debugging via USB(OTG). But it was hard to find the right solution.
At first I was frustrated because I did not have much information about this problem.
I have tried to solve this problem in the last few days.

Through the efforts of the past, we find one way to share.

Modify the USB settings in the sys_config.fex file.
The port PH09 is used as an OTG cellactor, but it does not seem to have much relation with the switcher.(Using S/W Switch)

usbc0_used          = 1
usb_port_type       = 2
usb_detect_type     = 1
usb_id_gpio         = port:PH09<0><1><default><default>
usb_det_vbus_gpio   = "axp_ctrl"
usb_drv_vbus_gpio   = port:power3<1><0><default><0>
usb_host_init_state = 0
usb_regulator_io    = "nocare"
usb_wakeup_suspend  = 0
;---       USB Device
usb_luns            = 3
usb_serial_unique   = 1
usb_serial_number   = "20080411"
rndis_wceis         = 1

After setting as above, boot with new build.
A Type to A Type Prepare the USB cable and connect it to the upper port.

Then issue the following command after the su command:
cat /sys/devices/soc.0/usbc0.5/usb_device
Afterwards, you can see that MTP and ADB are connected.

To use it again as a HOST, issue the following command:
cat /sys/devices/soc.0/usbc0.5/usb_host

I tested it with Android 5.1. (PINE64 LTS Version)

I originally thought that mode conversion should be done automatically using PH09 port, but it did not.
If you have a better idea, you might as well share it.
thx for this post, where to find sys_config.fex file?
I am testing this way with PINE A64 but on Android 6.0.1
Thx for help