I found ADB debugging method via USB(OTG) Port
#1
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.

First
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]
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.
  Reply
#2
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
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Lightbulb Why no USB-Debugging possible??? tommypine 4 809 09-27-2016, 04:49 AM
Last Post: pfeerick
  Android USB debugging and OTG device mode jonsmirl 0 2,005 07-25-2016, 10:46 AM
Last Post: jonsmirl
  "script not found! please use a new version image" Ludovic 9 14,028 06-20-2016, 02:09 PM
Last Post: Almac44

Forum Jump:


Users browsing this thread: 1 Guest(s)