• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such softwareNintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)CUSTOM ROMS You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspension / ban.

[GUIDE] USB OTG / USB Host

7 posts in this topic

Posted (edited)

First bad news: u8815 ignore state of ID pin - driver cannot switch automatically to usb host mode. But we can force host mode by hands!

 

Run in adb shell (over network) or directly in android terminal:

echo host > /d/otg/mode

 

If you want check current state:

cat /d/otg/info

 

u8815 not provide power to external device. You should connect power source to it: 

http://forum.xda-developers.com/showthread.php?t=1450298

 

For return to normal (peripheral) mode:

echo peripheral > /d/otg/mode

But in this case driver ignore connect/disconnect to usb. To fix this we should patch kernel: https://github.com/MihailZenkov/android_kernel_huawei_u8815/commit/1fc2282e1e00bac8d1410872363616ff155b6c2d

 

At now I try add some kind of auto switch to host mode and back.

 

P.S. Tested on cm-10.1-20130913 (Dazzozo)

Edited by Mihail Zenkov
1

Share this post


Link to post
Share on other sites

Posted (edited)

Oh my god! :D :D :D

If this works, this is massive news!

I think this should be pinned :)

Thanks :)

Edited by george109
0

Share this post


Link to post
Share on other sites

Posted

Apologies if it's a dumb question :o but I presume that the main benefit of USB OTG is the ability to connect external storage (e.g. a flash drive)?

Presumably it will drain the battery even faster than normal (which seems to be fast enough generally with the G300 - at least in my experience)?

I'm on stock GB B895 based superslim-v1 and my /d folder is empty... 

0

Share this post


Link to post
Share on other sites

Posted

Apologies if it's a dumb question :o but I presume that the main benefit of USB OTG is the ability to connect external storage (e.g. a flash drive)?

Presumably it will drain the battery even faster than normal (which seems to be fast enough generally with the G300 - at least in my experience)?

I'm on stock GB B895 based superslim-v1 and my /d folder is empty... 

Sorry, I forget mention - u8815 (as and many other device) need external power for peripheral device. I add this to first post.

0

Share this post


Link to post
Share on other sites

Posted

Sorry, I forget mention - u8815 (as and many other device) need external power for peripheral device. I add this to first post.

 

What's the worst that can happen if there's no external power? Just doesn't work or could it kill the G300!?

0

Share this post


Link to post
Share on other sites

Posted

could it kill the G300!?

No. Without external power host work, but don't detect any external device.

0

Share this post


Link to post
Share on other sites

Posted

I would like to share my experience with Y300 and connected 16GB USB 2.0 flash memory.

 

+ I got Y300 with SlimKat ROM 9.0 with chil360's kernel v0.53, with OTG support since v0.33 and Y-USB cable connected to phone with USB flash mem. and other end connected to +5V power supply (USB port)!

+ I execute commands in Terminal emulator: "su" and "echo host > /d/otg/mode"

+ And with "cat /d/otg/info</", I got

   OTG State: a_wait_bcon,

   OTG mode: 1

   OTG Inputs: 1xa

+ I had installed "USB Host Check" app and got that "handheld_core_hardware.xml" is OK, and "android.hardware.usb.host.xml" is not readable.

+ I change permitions of android.hardware.usb.host.xml from r------- to r--r--r--

Restarting phone, got me nothing special. "USB Host check" got 2 OK, OTG support is manualy started, OTG State is: a_host, but still no detected USB mem. I had try even "StickMount v0.26" app but got no result.

 

Finally, after installing "USB OTG Helper" and clicking on "Mount drive", application mounted no drive, BUT drive is VISIBLE and FULLY working on path /storage/UsbOtgDrives/drive_1 !!!

To dismount USB, go to "USB OTG Helper" and clicking on "Unmount drive" and go to Terminal emulator and execute: "su" and "echo peripheral > /d/otg/mode"

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.