[Dev] USB OTG Tests

Shaky156

Senior Member
Aug 19, 2012
1,199
2,234
0
Recently google said OTG isnt supported on the nexus 4 device

So curiosity has got the better of me and I've requested for people to test a few things, this is a development thread created for USB OTG and getting it to work.

What we know:
The snapdragon s4 soc support otg (running all the time reads mdm as usb device)
Slimport support OTG
kernel supports OTG
Unsure about ROM

This is created from my mobile device, when i receive net access ill update this more

Kernel i built 2 weeks ago or so, supports OTG
If anyone with an OTG Cable can test and provide both logcat and dmesg when plugging in a device, to make it easier would prefer ps3 controller connecting. Ontop of that do 2 tests 1 without supplying power and 1 with supplying power.

Newer kernel http://d-h.st/o0O
Installation ZIP, http://d-h.st/o0O
Works on any ROM
Remember to modify build.prop and add ro.usb_host=1
 
Last edited:

Shaky156

Senior Member
Aug 19, 2012
1,199
2,234
0
Ill test the kernel to make sure its good and boots fine then ill drop the kernel, but i can only test to a certain extent i dont own an OTG Cable, also youll need to modify @ ROM level
 

Shaky156

Senior Member
Aug 19, 2012
1,199
2,234
0
I have an OTG cable I'm not using, willing to send it you for free. PM me if interested. :)
Thanks man really appreciate the offer but that would take days, maybe even weeks to get here, Im in the UK, I was hoping to get the tests done and see if its possible or not pretty quickly

I've already sliced 2 usb cables, on my last one

Link to new kernel for Testing USB OTG, http://d-h.st/l5Y
also put into build.prop ro.usb_host=1

Give it a test, and please provide logs, thank you :)

EDIT: FOR STOCK ROM ONLY
(Thanks to endursa for reminding me)
 
Last edited:
  • Like
Reactions: gnan10 and luckylui

pvillasuso

Senior Member
Apr 16, 2007
1,668
702
143
Here you go :)
Flashable on any ROM
http://d-h.st/o0O

Just remember to put into build.prop
ro.usb_host=1
Hi , Im using latest aokp build

edited the .prop file
and flashed the zip

phone wont bootup

had to get into recovery and flashed again francos latest kernel to boot normally

ps. still just for stock roms ?

Sent from my GT-N7100 using Tapatalk 2
 

Shaky156

Senior Member
Aug 19, 2012
1,199
2,234
0
I don't have a PS3 controller, so this was tested using a standard USB thumbdrive, i also don't have a splitter to make it powered, so i'm afraid i can't test this either, this was the thumb-drive plugged directly into the phone:

dmesg:
http://pastebin.com/rsvsLGQr

logcat:
http://pastebin.com/p8SfDuEX

Both will expire in a day, in case i missed any personal information.
Thanks already see an issue, will try n drop another kernel today

Hi , Im using latest aokp build

edited the .prop file
and flashed the zip

phone wont bootup

had to get into recovery and flashed again francos latest kernel to boot normally

ps. still just for stock roms ?

Sent from my GT-N7100 using Tapatalk 2
It should work :s, it leaves the ramdisk and only flashes the
zImage
 

0.0

Senior Member
Jan 12, 2010
6,829
3,275
0
Hi , Im using latest aokp build

edited the .prop file
and flashed the zip

phone wont bootup

had to get into recovery and flashed again francos latest kernel to boot normally

ps. still just for stock roms ?

Sent from my GT-N7100 using Tapatalk 2
You would need to dirty flash the cm nightly again, then this kernel. I assume you were on Franco's kernel when flashing this one

Sent from my Nexus 4
 

franticjohny

Senior Member
May 13, 2010
73
30
0
I've tried it and flashed on stock rom. Boots fine but OTG doesn't work.The otg cable + thumb drive are working fine on Galaxy S2.

EDIT: I also added ro.usb_host=1 to build.prop
 

estallings15

Senior Member
Apr 22, 2011
6,204
2,545
0
is it a known issue that N4 doesn't have USB +5V power supply?

So what's the purpose of this test? even if you manage to make it work, it won't be useful
Pay attention. He asked for testers to supply their own power as well. If a setup with external power is useful for even one person and he gets it working, then this has served a purpose.

Ordered my Nexus 4 on the 13th. Still waiting.
 
  • Like
Reactions: spences10

FISKER_Q

Senior Member
Feb 25, 2009
437
115
0
is it a known issue that N4 doesn't have USB +5V power supply?

So what's the purpose of this test? even if you manage to make it work, it won't be useful
Yes, OTG was disabled by Google during developement because they found out it couldn't supply 5V

Pay attention. He asked for testers to supply their own power as well. If a setup with external power is useful for even one person and he gets it working, then this has served a purpose.

Ordered my Nexus 4 on the 13th. Still waiting.
I believe in the general complaint thread about no OTG someone spoke of a phone that wasn't able to supply 5V either, but it was infact doable after some modifications(software ones), so it may very well be that similar modifications here could work :)
 
Last edited:

Shaky156

Senior Member
Aug 19, 2012
1,199
2,234
0
Somethings funny
Cause if google advertised the device as USBOTG supported, then theyve setup the kernel for usbotg enabled, theyre saying the issue is no 5v, wouldnt supplying power bring USBOTG back? It isnt, so obviously it was taken away on purpose. If we can get around this and get USBOTG working is theee question.
 

luckylui

Senior Member
Aug 14, 2010
4,416
483
0
Chi-Town
I will try to help as much as I can. I have 2 OTG cables.

Sent from my Nexus 4 using Tapatalk 2

---------- Post added at 11:12 AM ---------- Previous post was at 11:09 AM ----------

Maybe my USB keyboard will work, currently using it on my N7 :)

Sent from my Nexus 4 using Tapatalk 2
 

DangKid

Senior Member
Jun 22, 2011
436
74
0
If you would like me to test OTG functionality, i have a OTG cable, a ps3 controller, card readers, and a few usb drives I can use. I'm on stock rooted right now. Just let me know how I can help out.

Sent from my Nexus 4 using Tapatalk 2