yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] ziddey:
Thanks for the report. Will compile a version without msm mdp commit. Reason behind the reverts is Franco hasn't updated sources for JWR build.
[Nexus 4 Original Android Development] :
I supposed.. Take your time man. So you're on a JSS ROM?

Nexus 4|PA 3.99|Franco Kernel
[Nexus 4 Original Android Development] ziddey:
Yes, CM all the way.

Try this one: ziddey-otg-r182-09032019.zip

Thanks
[Nexus 4 Original Android Development] aoaleman:
Same issues going on here, thank you ziddey!
[Nexus 4 Original Android Development] cooku:
Thanks for your help.

I found that it is my USB disk's problem. When i change another USB disk, the phone can recognize USB disk fine.

However, i have one more question. when i disconnect my OTG line, the notification bar shows that " Removed USB storage - USB storage removed. Insert new media. " and this notification cannot be removed unless reboot my phone. Do you know how to resolve this problem?

thanks in advanced.
[Nexus 4 Original Android Development] ziddey:
That's a bug with the stock code. I'm not sure but there might be an xposed module that works around that (I know there's one regarding wakelocks on Samsung devices). Otherwise, Cyanogenmod doesn't have that bug.
[Nexus 4 Original Android Development] :
I'll give it a try. Will let you know in a moment. Thanks a lot.

Nexus 4|PA 3.99|Franco Kernel

---------- Post added at 12:28 PM ---------- Previous post was at 12:23 PM ----------

It works perfectly. Lotsa thanks man..

Nexus 4|PA 3.99|Franco Kernel

---------- Post added at 01:12 PM ---------- Previous post was at 12:28 PM ----------

Touch Control does not seem to work. Does this come with module support or Touch Control previous modules do not support this yet?

Nexus 4|PA 3.99|Franco Kernel
[Nexus 4 Original Android Development] dexim:
This is from a few days ago, but I didn't see that anyone corrected it. OTG will not work on the Nexus 4 with this hack/mod without power getting to the phone with either a y-cable, or a powered USB hub. A powered device, such as an external hard drive, will not work without power getting to the phone as described.
[Nexus 4 Original Android Development] ziddey:
I had mentioned this in the TC thread, but these are the only changes to the kernel config:

echo "CONFIG_INPUT_JOYSTICK=y" >> .config
echo "CONFIG_JOYSTICK_XPAD=m" >> .config
echo "CONFIG_JOYSTICK_XPAD_FF=y" >> .config
echo "CONFIG_JOYSTICK_XPAD_LEDS=y" >> .config
echo "CONFIG_INPUT_FF_MEMLESS=m" >> .config
echo "CONFIG_HID_LOGITECH=m" >> .config
echo "CONFIG_LOGITECH_FF=y" >> .config
echo "CONFIG_LOGIRUMBLEPAD2_FF=y" >> .config
echo "CONFIG_LOGIG940_FF=y" >> .config
echo "CONFIG_LOGIWHEELS_FF=y" >> .config
echo "CONFIG_HID_DRAGONRISE=m" >> .config
echo "CONFIG_DRAGONRISE_FF=y" >> .config
echo "CONFIG_NTFS_FS=y" >> .config
echo "CONFIG_MODULE_UNLOAD=y" >> .config
echo "CONFIG_MODULE_FORCE_UNLOAD=y" >> .config
#echo "CONFIG_MODVERSIONS=y" >> .config
echo "CONFIG_WAKELOCK_STAT=y" >> .config

I have enabled module (force) unloading, along with read-only ntfs support and kernel wakelock stats. The other settings are for modules (game controllers and such).

Here's a build without module unloading: ziddey-otg-r182-09040100.zip Refer to first post for links

If it works, I'll build future releases that way. Otherwise, Touch Control is not something I'm looking to somehow actively maintain support for. Franco already pushed two commits specifically bypassing module "kosherness" checks to support TC, which I'm quite surprised about... https://github.com/franciscofranco/mako/commit/2aa466eacb70b8309ef8945b31db0ad1d85efe6d and https://github.com/franciscofranco/mako/commit/0f449451eb1092ea06e59b1341a143b413d73cf3

Further, it's not useful to simply say that it "doesn't work." Does it kernel panic/crash/reboot? Or does it simply fail to work/load? If the latter, post what dmesg (/proc/kmsg) shows _WHILE_ loading the module. The former is far more likely though since his module is exempt from checks..

On an unrelated note, has anyone using stock ROM (or similar?) tried using a NTFS USB drive natively? I am imagining that the stock implementation is not capable of mounting NTFS partitions. If this is the case, I'll stop including the read-only NTFS kernel driver (Franco dropped it a while ago). CyanogenMod has natively supported read-write NTFS for a while now (using ntfs-3g, so the kernel driver is still not needed).
[Nexus 4 Original Android Development] ritchea:
I don't know if this helps; previously I had formatted a 2gb flash drive to ntfs just to find do out. Natively on stock, nothing. The drive was accessible with stickmount, fwiw.
[Nexus 4 Original Android Development] Faiz5z:
will it work with faux kernel..??
[Nexus 4 Original Android Development] :
Hi ziddy, the latest build works now with touch control, thanks a lot.

To tell you in detail, in the previous builds of r182, modules were downloaded successfully but after giving root permission via superuser, the boot reboots.

I had my power button fixed already but having touch control actually makes locking/unlocking faster and more convenient in most situations.

Anyway, thanks..

Nexus 4|PA 3.99|Franco Kernel
[Nexus 4 Original Android Development] ziddey:
Hmm that's interesting. You're referring to ziddey-otg-r182-09040100.zip? Devhost is reporting 0 downloads for that file. Assuming that's a glitch, I guess I'll remove module unloading support...
[Nexus 4 Original Android Development] :
I was referring to ziddey-otg-r182-09032019.zip. This build didn't work with Touch Control. The one you quoted above works well.

Nexus 4|PA 3.99|Franco Kernel
[Nexus 4 Original Android Development] keyra74:
same here!

04100 works like a charm with TC

btw is there an otg version of latest TW recovery?
[Nexus 4 Original Android Development] keyra74:
i'll stick with modded 2.6 so :)

haha, i was going to post the thread but you already posted the same message there
[Nexus 4 Original Android Development] :
Just a heads up guys. Careful with upgrading to TWRP 2.6.1.0. because it cannot write modem/radio when flashing/reflashing. It's better to stick with 2.6.0.0 with OTG support.

Nexus 4|PA 3.99|Franco Kernel
[Nexus 4 Original Android Development] ramjet73:
TWRP 2.6.1.1 is out and fixes outstanding issues including the radio flashing problem.

ramjet73
[Nexus 4 Original Android Development] ziddey:
You do realize you've been saying the exact same thing for I don't know how many posts now. I have run out of ways to reiterate why it's not working.
[Nexus 4 Original Android Development] baltac:
Cheap 2€ no brand Y cable took in a chinese shop. Cheap 3€ OTG cable (this one: http://ema-tec.com/product_detail.php?ProId=227) in the same shop... I bought that cheap material just for a try. I wasn't sure if that was the right pieces to build up the connections. Luckily they are... :)
[Nexus 4 Original Android Development] sga999:
I apologize. But in my most recent posts before this one, my attempt to get it working with your kernel wasn't working at all, and I said I'd try to figure that out. Then I remembered that I had to do the echo command, so I wanted to clear up my comments on that unfinished test.

You said in post 71:

"What I've been trying to say is that both of your setups theoretically produce an electrically IDENTICAL scenario. If one works and not the other, then it's mostly something you are overlooking (connecting to laptop for power vs wall for example) or a defect in one of your components (far less likely since host mode is being activated). I'm not saying it's impossible that there's a problem with the code, just that it is treating both of your setups in exactly the same way. Again, if it's not detecting power, it would not be able to switch to host mode (and it also sets the charger type at the same time)."

I can eliminate some of your possibilities for my problem. Connecting to laptop for power for both failing and successful cases, so that's not a variable (also tried wall cable with same behavior) . Defect in the Y-cable is possible, but that cable does work in cases already described. About your code, that's the only thing I can't comment on.

I promise that I'm not trying to be difficult, but I'm just itching to know why it's not working for me...even though I have another cable that DOES work! It's just the way I am. So...if I get another Y-cable that works, I'll let you know, but otherwise, I won't mention this again.

EDIT: Changed to indicate only echo command is needed, not stickmount, in order to see /storage/usbdisk0.

Thanks again for your great work.

---------- Post added at 05:39 PM ---------- Previous post was at 05:34 PM ----------

Thanks, baltac. I don't guess I'll be going to that shop in China for the Y-cable! But I'm sure there are lots of them here in the US...finding a good one may be not be easy. Glad it's working so well for you.
[Nexus 4 Original Android Development] ritchea:
I haven't read the rest of the new thread posts yet. What ziddey said about my hub is exactly what I suspected. I did redo the line for echo with the extra space and seemed to get a return but the drive was still not visible. Yes, I understand about the power source and Y cable (which was no longer available on ebay last I checked). I could make a Y cable; however, for the moment, I am going to try the wireless device since it may meet my needs. The $ is just a little more at most for that device vs a power supply and a y cable. EDIT: I have now read posts. At one point, I did install StickMount to see what would happen. That may have messed up the last attempt. I don't remember. Now, I have to get a Y cable to try again. I guess I just like puzzles. I was so focused on the "powered" hub idea that I didn't realize I could draw the needed power from my PC.

This morning I noticed my phone had not charged. Was it the echo line? I had 7% battery (24 hours with a lot of reboots, etc so that was good) which was enough to reflash stock kernel and charging returned. I had read something about the usb charge function possibly being affected under certain commands. I re-flashed ziddey kernel and charging is good.

Anyway, I'm still following the adventure here as I really like to see that challenge paying off.

---------- Post added at 07:33 AM ---------- Previous post was at 06:47 AM ----------

I appreciate your most precise listing of the connections. Theoretically, the cable should work if I I plug a thumb drive directly into the female drive (where you attach to the hub)? One male to the OTG adapter plugged into the phone and the other male into the PC. I'm going to order that cable and try it.
[Nexus 4 Original Android Development] info.brandenburg:
Slimport and OTG

First of all:

Thank you for the great work, its realy beautiful! It all works very nice with a powered OTG Cable.

Now I have a question. Does the Slimport Adapter from Amazon support USB OTG? In Example can I connect my Nexus 4 with the Slimport to the TV and then use the microUSB port from the Slimport Adapter for USB OTG?

Has someone this Slimport Adapter to test this?

Without USB OTG, I will not buy it.

Thank you!

Link to the Slimport Adapter:

http://www.amazon.de/dp/B009UZBLSG
[Nexus 4 Original Android Development] ziddey:
There aren't any hacks to ensure that setting mode manually won't get caught in some state. The only hack there was to enable /sys/kernel/debug/msm_otg/mode itself. I've never used CaptainMuon's kernel, but I am imagining that all issues will still apply. It's more for debugging purposes at this point. I'm busy with some other things at the moment, but I may eventually go back and try to safeguard all scenarios. I can see it being useful when the usb device is being independently powered, and not sending power back upstream to the phone (e.g. some powered hubs, external hard drives). Since the current method of detection relies on receiving power, it won't be able to automatically enable host mode, so a way to manually set it would be necessary. Otherwise, there shouldn't ever be a situation where you'd need to manually enable host mode.

As for Slimport, Analogix claims to be able to pass through OTG data, but the code (drivers/usb/otg/msm_otg.c) in its current state seems to essentially bail out if it detects Slimport, so I can't imagine host mode working concurrently with Slimport for now. I don't have a Slimport adapter to test with, but if anyone does want to do some testing, I can try commenting out the detection to allow host mode to start. However, I have no idea if it'd actually work..
[Nexus 4 Original Android Development] sga999:
ritchea, I got that specific Y-cable from eBay over a month ago, it "worked partially", not fully, but I never tried to return it to eBay because I got another type of Y-cable (not requiring the separate OTG cable) that worked well for me. I'm not saying that one won't work for you. .I may have been unique in getting a bad one from that vendor...I hope you have better luck.

Today I went to a local store (Central Computers in CA), hoping to find one of these Y-cables that would work. They have oodles of them, and guess what....the new one works perfectly!

Other than my lengthy discussion about my failing attempt being bothersome to readers here, I'm glad to have gone through the process. Bugs, problems, roadblocks are always good for me because I learn more that way. Sorry others had to suffer in the process!

Thanks again, ziddey.
[Nexus 4 Original Android Development] unixon:
I've read through some pages searching so forgive me if this question has already been asked

If I install this, can I still use the Franco Updater App? I can't tell if this is a full on Kernel or just a little piece of one.
[Nexus 4 Original Android Development] alanwyl:
Re: [OTG] [19MAR13] [DIRTY HACKS] Externally Powered USB OTG (Seeking Devs)

Yes, the app works on all kernels, it just flash over the old kernel.
[Nexus 4 Original Android Development] sga999:
I think this is Franco's "full kernel", but there are modifications to make OTG work. I have Franco's app, but I haven't tried to do much with it. My guess is that most of the features of his app will work, but I do notice that the "Color Control" seems to be limited to changing RGB values but not Gamma values. Maybe someone who is more familiar with the app's features can tell you more. Or....if you'd like to ask me a specific question about which option you'd like me to try with ziddey's kernel, I'd be glad to try it for you.
[Nexus 4 Original Android Development] ritchea:
No worries. I understand about the cables, but for $3., I was willing to try it. It may work. I'll never find anything locally. I, for one, appreciate your public process. I'm detailed and holistic at the same time. I have to see the whole of it but want to understand the parts. Obviously have limited knowledge in this area but still like to experiment. Reading your "saga" helps me understand. Also, this particular thread seems to have attracted "kind souls" so I don't feel so intimidated to seek answers. Not so with all xda threads.
[Nexus 4 Original Android Development] sga999:
ritchea, thanks for your complimentary post....you are one of those "kind souls"! I do hope that my saga helps others, so it's nice to hear your opinion about it. Like you, my knowledge is very limited, but I love to try things and learn And when something doesn't work, it's very hard for me to ever give up trying to figure it out!

I really hope you can get a good cable. I wrote that seller yesterday, explaining that I had ordered the cable over a month ago, so I didn't expect a refund or replacement. But I just wanted them to know about my problems with it so that maybe they could test it more before sending them out (unlikely). I just got a response that said I have a choice of a refund or a replacement! Very nice of them! (Aha, I just looked, and I ordered it on 3/17 but it arrived on 3/23, so maybe I just barely got in under 30 days by notifying them yesterday. Or maybe they're just nice).

I look forward to hearing if the cable works for you. If it doesn't work, here's mine. $5.95 but worth it! I got it right at the store 2 miles away, but it's great to see it online! There was a plastic bin there, holding maybe 200 of them!

http://www.centralcomputers.com/commerce/catalog/product.jsp?product_id=69519&czuid=1363969976875
[Nexus 4 Original Android Development] hamzab:
Will this work with a Note II/GT-N7105 LTE model that has been rooted using anoother ROM such as Wanamlite or Jedi X Rom?
[Nexus 4 Original Android Development] ragnarokx:
No, because the flashable files posted are specific to the Nexus 4.
[Nexus 4 Original Android Development] ziddey:
You guys are so nice :silly:
[Nexus 4 Original Android Development] hamzab:
Any chance you could do this for the Note 2?
[Nexus 4 Original Android Development] ziddey:
I don't understand how you got here and think you need this for OTG or that it would possibly work. I don't know anything about the Note 2, but a quick search reveals that it uses a completely different chip and IT SUPPORTS OTG OUT OF BOX.
[Nexus 4 Original Android Development] hamzab:
Sorry, I didn't explain fully. Yes the Note 2 supports OTG natively however it doesn't provide USB OTG and Charging simultaneously. Any idea on how it could work for the Note 2?
[Nexus 4 Original Android Development] ziddey:
That's well out of the scope of this thread, but you should see if the Note 2 supports ACA. If so, you'd need to buy an appropriate accessory charger adapter, or hack your otg cable to provide the proper resistance between the ID pin and ground: http://en.wikipedia.org/wiki/USB_On-The-Go#OTG_Micro_Plugs. Barring that, ask your Note 2 kernel devs to modify their kernel accordingly.
[Nexus 4 Original Android Development] hamzab:
Sorry, I'm a complete noob at this.

I'm going after either the Wanamlite Rom or the Jedi X Rom. Do I ask the ROM creators to look into modifying the Kernel?
[Nexus 4 Original Android Development] ritchea:
back to sd card

I just received this card reader. I plugged it in and it worked--mounted in storage, accessible through ES Files. I only tried it once as the female "A" connector on my adapter has a loose piece inside so I don't want to connect/disconnect too much until my replacement from Hong Kong arrives. Hopefully, it was not a fluke or "placebo"; and, hopefully, my new adapter will function correctly. I am running yesterday's CM10.2 nightly, but I'm pretty sure that doesn't have any effect.

Now to "fix" TWRP 2.6.1.0.
[Nexus 4 Original Android Development] gdekatt:
Thanks Ziddey for this!

Is there a way to unmount without tapping through Settings->Storage->(scroll to bottom)->UnMount? Not sure if null'ing /sys/kernel/debug/msm_otg/mode will work or just plain dumb.

I'm basically looking for a way to trigger an unmount via a toggle, widget, Tasker etc. so I can unmount before disconnecting the OTG cable as I get out of my car, or shut off the charger power,
[Nexus 4 Original Android Development] ziddey:
Used the Google for you: http://xdaforums.com/showpost.php?p=40067822&postcount=9

You can use Widgetsoid or whatever to create a 1x1 toggle widget on your homescreen. Unfortunately there's no notification of success (might not unmount if device busy). I'm sure you could get a little creative and figure something out (or just call it a day).
[Nexus 4 Original Android Development] sga999:
There's an app in the Play Store called xShortcut Free (there are several apps that do this same thing, but I really like the developer who wrote this...he also wrote SSLauncher). Click "System Settings", then "Storage Settings", then "Ok". A shortcut will be created that you can use to go directly that screen. You'll still have to go down to USB STORAGE and do your unmount. So this may still be more steps than you like, but I thought I'd mention it.

EDIT: Sorry, that app works just fine, but the one I meant to mention was More Shortcuts...it's by the SSLauncher developer. It's very similar....click Activities, then Storage Settings, and again, you'll have a new shortcut.
[Nexus 4 Original Android Development] gdekatt:
ziddey and sga999, thank you for the suggestions. I had not realized it was a standard system mount managed by vold. New to Android having come from IOS.
[Nexus 4 Original Android Development] runkle6:
have a look at this:

http://www.iconbit.com/catalog/speakers/iconbit_pss990bt/

iconBIT PSS990BT- portable quality mini-speaker with MP3 / FM-radio. Perfect for any laptop, smartphone / tablet, iPhone / iPad or stand-alone. High-capacity USB-rechargeable battery. Plays from USB-flash and microSD card. Integrated subwoofer, headphones-out.

Built-in subwoofer

FM-radio, microSD card

One touch connection with NFC

Handsfree

Mobile power charging 5V 1A

Battery 2200 mAh

Bluetooth

maybe this could be used as external usb otg power/ed device?

i ordered today ...

greetz,

oppen
[Nexus 4 Original Android Development] dellup:
this otg y cable will be ok right?

http://www.amazon.de/System-S-Daten...KKX4/ref=pd_bxgy_ce_img_y/276-4979770-1319651
[Nexus 4 Original Android Development] punitthereddevil:
Yep...that should work fine...

***Hit the "Thanks" button and save yourself the effort of typing it***

NEXUS 4 | STOCK 4.3 JWR66Y | ZIDDEY'S OTG KERNEL | OTG ENABLED TWRP 2.6.1.1
[Nexus 4 Original Android Development] keyra74:
that's weird... i can use otg with twrp in recovery but not in rom even if i use your kernel

anything to do?
[Nexus 4 Original Android Development] punitthereddevil:
Dunno if anyone has already posted this...

I'm able to mount NTFS drives via stickmount...

***Hit the "Thanks" button and save yourself the effort of typing it***

NEXUS 4 | STOCK 4.3 JWR66Y | ZIDDEY'S OTG KERNEL | OTG ENABLED TWRP 2.6.1.1
[Nexus 4 Original Android Development] SpasilliumNexus:
edit: wrong thread
[Nexus 4 Original Android Development] UnitedOceanic:
This is so awesome and so simple!!!

My Y-Cable and my external battery just arrived, flashed your kernel on Carbon Nightly 11/09.

Thank you all for your work!!!!!!!!
[Nexus 4 Original Android Development] VikramW8:
hey ziddey can you make a jwr and jss kernel while rebasing it to franco r178?? Phone gets just too hot too fast..! On PA 3.99
[Nexus 4 Original Android Development] SpasilliumNexus:
He has them in his post. Look closer.
[Nexus 4 Original Android Development] ziddey:
JSS15* 4.3.0: ziddey-otg-r183-JSS-09141713.zip Add SECONDARY_STORAGE env., do ramdisk patching during flash, include CIFS module -- rebase to r183.

JWR66* 4.3.0: ziddey-otg-r183-09141713.zip Add SECONDARY_STORAGE env., do ramdisk patching during flash, include CIFS module -- rebase to r183.

Did you ever get your issue with PA resolved?
[Nexus 4 Original Android Development] SpasilliumNexus:
Did you mean with OTG not mounting in some nightly builds when using your kernel?
[Nexus 4 Original Android Development] ziddey:
I can't remember your message -- you edited it right away and posted in the PA thread. What was your issue? I have only ever tested on CM builds (I daily with a 64gb microsd in a battery-case).
[Nexus 4 Original Android Development] SpasilliumNexus:
Yeah I had posted about it here on colormeparanoid and it was fixed in their RC-1 build / nightly 09/14 build.
[Nexus 4 Original Android Development] keyra74:
is it the same error as mine : empty usb disk ?
[Nexus 4 Original Android Development] EdikNeznanov:
Can I add this mod into NEO kernel somehow? BTW should I do something after flashing kernel or I just should connect my USB install?
[Nexus 4 Original Android Development] keyra74:
r183 + latest pa, no problem
[Nexus 4 Original Android Development] punitthereddevil:
Are u using the rc1 version of PA...?

And do u have any problem using TWRP 2.6.1.1 to flash pa (with OTG support)...?

***Hit the "Thanks" button and save yourself the effort of typing it***

NEXUS 4 | STOCK 4.3 JWR66Y | ZIDDEY'S OTG KERNEL | OTG ENABLED TWRP 2.6.1.1
[Nexus 4 Original Android Development] keyra74:
yup rc1
[Nexus 4 Original Android Development] punitthereddevil:
K thanks...just wanted to verify OTG working on latest PA...gonna flash soon...

***Hit the "Thanks" button and save yourself the effort of typing it***

NEXUS 4 | STOCK 4.3 JWR66Y | ZIDDEY'S OTG KERNEL | OTG ENABLED TWRP 2.6.1.1