yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Android Development] tnp9008:
Well I'm not having any luck either. [MENTION=1175139]justvarshney[/MENTION] is there any useful information I can provide?

Problem solved; I had USB Fast Charging enabled in HKM.
[Nexus 4 Android Development] fozzie:
Working fine here now. See my edit above.

Btw, have you checked that you don't have 'USB Fast Charging' enabled in your kernel manager? That stops USB OTG from working. Just a thought...
[Nexus 4 Android Development] xanthrax:
Fast charge been always clashing with otg

Sent from my Darkside of LG G2
[Nexus 4 Android Development] tnp9008:
Yep, I had Fast Charging enabled. I don't remember that messing it up before, but turning it off fixed it. All is well now.
[Nexus 4 Android Development] justvarshney:


Thanks for the feedback. I will look into the fast charging issue.
[Nexus 4 Android Development] sakis_the_fraud:
maybe I used the wrong words, of course I'm thankful to those who develop apps for free and I have supported many of them with donations.

On the topic now, I have installed and tested the hells core b47 otg kernel and it works fine with and without stickmount.

:good:
[Nexus 4 Android Development] justvarshney:
Glad to know. Thanks.
[Nexus 4 Android Development] justvarshney:
[MENTION=2034728]Moonshield[/MENTION] and other followers:

Here is Franco's r209 (test build not yet published) with USB OTG as requested.

Please download @ http://d-h.st/cL2 and provide the feedback...
[Nexus 4 Android Development] jphillip:
Thanks for the update, justvarshney. However, I just flashed this to my N4 (wiped cache and Dalvik), and my screen colours went all funky. It was almost like a negative image of everything (the usual Holo blue had gone yellow, it looked like some new version of Android). I switched to a bunch of different display profiles in the Hells-Core Kernel manager but that made no difference. I also tested the USB OTG, but that didn't work for me either. :P (Though I might be using this Y-splitter wrong, Idunno, I'm more concerned with the display)

I'm using a CyanogenMod nightly from 20140618 (4.4.3). Is this patched kernel no good for CM? I had been using Hells Core b47 with no issues. I even switched back to it now, and my screen is normal again.
[Nexus 4 Android Development] tnp9008:
It's most likely not CM compatible. [MENTION=1175139]justvarshney[/MENTION] will probably have to make a separate CM version.
[Nexus 4 Android Development] jphillip:
That explains that, then. Thanks!
[Nexus 4 Android Development] justvarshney:
Yes, this is not Compatible with CM ROM. I will build CM version tomorrow.
[Nexus 4 Android Development] yochananmarqos:
TWRP 2.7.1.0 with the recoverymod.zip can read usb-otg, but my sd-card does not appear in Settings > Storage. All your previous releases have worked great. USB fast charge is disabled.

EDIT:

I just installed StickMount & I was able to mount it. It still does not appear under Storage. ES File Explorer normally shows both my internal & external storage on the homepage, but it does not. I had to dig into Local > USB2002/UsbStorage. It might be how StickMount mounts it, not sure as I've never used it before. Nandroid Manager can read my backups fine, that's mostly what I use my sd-card for.

Thanks again for continuing this project!
[Nexus 4 Android Development] xanthrax:
I'm afraid that storage doesn't show the otg on some roms, it is a Rom implementation problem reason why you must use stickmount

Nexus 4 isn't designed for otg

Sent from my Darkside of LG G2
[Nexus 4 Android Development] sakis_the_fraud:
I'm facing a strange problem here, thats the senario:

Plug in usb hdd

stickmount mounts it

Listen to some music

unmount hdd via stickmount

unplug usb hdd

Then i got the message " removed usb storage usb storage removed. Insert new media. "

I can't swipe it, but it goes away with a reboot.

Is there a way to avoid rebooting my device every time?

I am using stock rom, android 4.4.4 and hells core b47 otg kernel.
[Nexus 4 Android Development] xanthrax:
maybe because the player is still running in background ?
[Nexus 4 Android Development] sakis_the_fraud:
i tried it again several times

close all apps.

1st try:

connect usb hdd, mount, play music, close media player and file explorer, unmount, unplug hdd, same problem

2nd try: connect usb hdd, mount, unmount, unplug, problem still there
[Nexus 4 Android Development] xanthrax:
or maybe not maybe the player , the media scanner as well , check in system/apps and force stop

do you use a hard drive or a pendrive ?
[Nexus 4 Android Development] sakis_the_fraud:
I am testing mostly with my usb hdd (ntfs) but now that you mentioned it i tried with a pendrive (fat32) and the result was the same.

I also tried to force stop the media scanner, but it didn't help.

when i click app info on the notification i see this

i force close it and it goes away. i assume/hope that it starts again right away cause judging by it's name it seems essential!

You can't replicate the problem on your configuration?
[Nexus 4 Android Development] xanthrax:
i`ll try soon, i`m a little bit busy atm :cool:
[Nexus 4 Android Development] bruce7373:
After flashing hell's core b47 and the recovery mod, the pendrive (NTFS) shows up fine when mounted with Stickmount, but I can't enable otg-usb in recovery (TWRP 2.7.0.0). Is there an updated mod I should be flashing for stock 4.4.4? Thx.
[Nexus 4 Android Development] justvarshney:
The current mod should work fine.
[Nexus 4 Android Development] xanthrax:
try this

http://d-h.st/XAG

---------- Post added at 03:50 PM ---------- Previous post was at 03:00 PM ----------

OK, I just flashed b47 otg, everything goes fine, ROM problem?

On storage doesn't show up the SD card, using stick mount pro is all good in file Explorer, solid explorer, c-Rom here, 4.4.3

Sent from my Darkside of LG G2
[Nexus 4 Android Development] sakis_the_fraud:
IMHO, it can't be a ROM "problem", because i'm using the stock ROM!

I have seen many posts about this issue here on xda but none gave a solution to the problem.

Edit: your pendrive is on ntfs or fat32? If it's the second it should be available under storage
[Nexus 4 Android Development] xanthrax:
Well, I haven't searched for this but stock ROM isn't meant to support the external storage in any way, maybe the custom ones has a better support

-=-=-

fat32 and it doesn`t show in storage ... :P

Sent from my Darkside of LG G2
[Nexus 4 Android Development] bruce7373:
Thanks for the link, but that appears to be the same file I already have. I tried it anyway and still no go.
[Nexus 4 Android Development] justvarshney:
I will test on my phone and update.
[Nexus 4 Android Development] xanthrax:
it is working just fine but i think that it may be related to the connecting sequences

first connect the cable to the power source

second connect the otg to the phone

third connect the pendrive

go to mount and mount it

this is what i`ve done
[Nexus 4 Android Development] sakis_the_fraud:
yeah maybe....

it's strange though that it can't detect your fat32 drive.

on my phone it detects everything, if its fat32 it automounts it (without the use of stickmount, at mnt/usbstorage) and if it's an unsipported format like ntfs it says i should format it and blah blah, so i mount it with stickmount, because it supports ntfs. ;)

[MENTION=1175139]justvarshney[/MENTION] do you get the message that i'm talking about?
[Nexus 4 Android Development] :
Has any one tried if this worked on ART? Thanks
[Nexus 4 Android Development] justvarshney:
The patch has auto mount enabled. Stickmount is required for ntfs formatted drives.

For the other issue, I have seen it once but have no solution so far. I will have a look into it
[Nexus 4 Android Development] UnitedOceanic:
This is a android bug. Mahdi Rom has a fix included. I saw a tutorial here on xda once how to decompie the SystemUI.apk change the a few values so the notification is clearable. I will look if I can find the thread again.
[Nexus 4 Android Development] bruce7373:
I went through your steps exactly and it's still not mounting. I tried with the drive formatted with NTFS and FAT32, if that's even a consideration.
[Nexus 4 Android Development] xanthrax:
Try to flash the recovery mod made by ziddey posted above

Sent from my Darkside of LG G2
[Nexus 4 Android Development] justvarshney:
Last Night I tried a xPosed module by the name "UsbStorageUnmountter Be Gone" and I am not getting that annoying notification.

I am on Purity+ ROM and tried the same with stickmount as well..

worth a try.
[Nexus 4 Android Development] justvarshney:
I have found the fix for Settings-->Storage to show the USB disk. I will be sharing the new Patch soon (Hells core & Franco versions).
[Nexus 4 Android Development] xanthrax:
Hellscore b47 is running great mate, thanks again for your wonderful support !

Sent from my Darkside of LG G2
[Nexus 4 Android Development] justvarshney:
:) My pleasure...
[Nexus 4 Android Development] TheQuarterMile:
Is there is HellsCore CM version?
[Nexus 4 Android Development] fozzie:
For what version of OS/HellsCore?
[Nexus 4 Android Development] jackielam1997:
Any wifi-fix for hellcore b47 kk?
[Nexus 4 Android Development] justvarshney:
You don't need any wifi fix for b47. What exactly are you looking for?
[Nexus 4 Android Development] spadez2727:
I would love to have a CM11 version of HellsCore b47 with otg. :)
[Nexus 4 Android Development] dEris:
[MENTION=1175139]justvarshney[/MENTION] will this new patch work on crom (storage info too)?

-------------------------------------------------------------------------

[ DEVICE : N⁴ ]

[ ROM : CrDROID-4.4.4 ]

[ KERNEL : CrDROID-OTG ]

[ LAUNCHER : NOVA PRIME ]

[ CARRIER : T-MOBILE ]

[ CASE : NAKED/NONE ]

[ SCREENSHOT : MAY.18.2014 ]
[Nexus 4 Android Development] justvarshney:
[MENTION=2133943]dEris[/MENTION], I believe C-ROM is CM based ROM. if that's the case it will not work.

I am compiling CM based kernel and will share soon.
[Nexus 4 Android Development] xanthrax:
C-Rom is aosp, I'm using it along with b47, is working just fine ☺ except storage info

Sent from my Darkside of LG G2
[Nexus 4 Android Development] justvarshney:
[MENTION=2133943]dEris[/MENTION], here is the updated Patch for AOSP ROMs http://d-h.st/eOP (hells-core b47)

[MENTION=5517754]spadez2727[/MENTION], you may try http://d-h.st/Dyh for CM Based ROM.

Both these patches have Settings-->Storage fix.

Please let me know how it goes.
[Nexus 4 Android Development] rohit297:
Can anyone confirm that this is patch working on Mahdi ROM latest build, I m asking this because initially I had storage force close problem with hellscore otg patch on Mahdi rom
[Nexus 4 Android Development] sakis_the_fraud:
Thanks for the update!

Please add version numbers on your zips, to make your troubleshooting easier. ;)

This latest version does not load fat32 on storage, so stickmount is nesessary.

The good thing is that the notification that we were talking earlier is now gone!

Great job man! [emoji106]
[Nexus 4 Android Development] justvarshney:
Thanks. I will have a look at Fat32 and will also add version number.
[Nexus 4 Android Development] jeanpir60:
Hello, i have the same problème with your kernel on Onirom 4.4.4

more i have some FC on android.process.media when i plug a usb calble between phore an PC.

Thanks a lot for your work
[Nexus 4 Android Development] bruce7373:
That's the one I've been using.
[Nexus 4 Android Development] dEris:
Has anyone been able to get PA final working with settings storage?

Sent from my Try n' Buy Moto X (64gb)
[Nexus 4 Android Development] justvarshney:
I think there is some problem with stock or near stock ROM. I will look into it tonight. I am flashing stock 4.4.4 in sometime.
[Nexus 4 Android Development] atulclassic:
stable r209

franco has released stable r209..is there any change from test one..

also if [MENTION=1175139]justvarshney[/MENTION] could release otg version for stable one.
[Nexus 4 Android Development] rohit297:
A little bit off topic

I want to know that can we connect a printer through usb otg on nexus 4, i want to buy a new printer so i am thinking that if i can connect to my phone via usb or think of buying a wireless printer, hope someone has tried this before
[Nexus 4 Android Development] jeanpir60:
I think a wifi ptinter or a lan printer is a better solution
[Nexus 4 Android Development] bruce7373:
Just wanted to report that I flashed Omni's latest nightly (4.4.4), and the patch works perfectly, both within the ROM and in TWRP. So apparently it was something peculiar with the stock ROM which prevented OTG mounting in recovery.
[Nexus 4 Android Development] :
Suggestion: OTG workaround like iPads

Hi guys, I'd like to suggest something to anyone who has a regular OTG cable. Please try this out.

As you know, Apple devices do not also support OTG. But there is a workaround for iPads. I have an iPad Mini Retina, it doesn't support OTG right out of the box because Apple limited the supply of power from the usual 100mAh to only 20mAh for its devices USB ports. But by using a "lightning to USB camera adapter" (the accessory used by iPads to import photos from cameras) + a 4-port USB hub, inserting flash drives works like magic. That's because, the 4-port USB hub tricks the iPad to allocate 20mAh of power to each port, thus, supplying 80mAh of power to the hub which is enough to run run most flash drives.

I only have a modified OTG cable for Nexus 4, so I cannot try this out. I also do not know whether Nexus 4's limitation is similar to an iPad but if anyone has a regular OTG cable, would try this set up? Again, that's Nexus 4 + OTG cable + flash drive.

Thanks
[Nexus 4 Android Development] dEris:
I honestly do not think that will work.
[Nexus 4 Android Development] yochananmarqos:
It won't work as the 5V power rail isn't there to supply power. Hence why we need a powered OTG cable to compensate. ;)
[Nexus 4 Android Development] jeanpir60:
Hello,

I have the same Rom : Omnirom Nightly 20140629, and install http://d-h.st/eOP (hells-Core-b47-USB-OTG_Justvarshney.zip).

But i always have FC and OTG does'nt work

Did you do anything else more ?
[Nexus 4 Android Development] bruce7373:
No, I just flashed the ROM, GAPPs, then the b47 kernel. Are you getting the FC when you plug in the USB/OTG cable?
[Nexus 4 Android Development] jeanpir60:
Thanks for your response.

I confirm the FC issue is just when i plug phone to pc.

When i plug OTG i have no issue. But USB Storage does'nt appear in Storage setting.

I must use Stickmount to mount usb key.
[Nexus 4 Android Development] sakis_the_fraud:
I can confirm the FC when the phone is connected to the pc.
[Nexus 4 Android Development] bruce7373:
Yes, I have to use Stickmount as well with OTG, but I'm not getting any FC simply connecting to my PC via USB. I have to turn off Debugging, but that's all.
[Nexus 4 Android Development] justvarshney:
I am working on fixing this issue. Can someone please share the "framework-res.apk" from Stock 4.4.4 ?

This can be located under /system/framework/
[Nexus 4 Android Development] yochananmarqos:
No FC connecting to PC here. Paranoid SaberDroid (4.4.3) with Franco r209-OTG.
[Nexus 4 Android Development] justvarshney:
OK here we go :

There is a problem with OTG patches on 4.4.4 builds because of some changes in framework-res.apk. I have tried to fix the problem and no more FC on my phone. I am also able to see the Storage in Settings. Please find the Patches for Android 4.4.4 here :

For Android 4.4.4 ROMs :

AOSP ROMs :

[Franco r209] [HellsCore b47]

CM11 ROMs :

[Franco r209 CM] [HellsCore b47 CM]

For Android 4.4.3 ROMs :

AOSP ROMs :

[Franco r209] [HellsCore b47]

CM11 ROMs :

[Franco r209 CM] [HellsCore b47 CM]

Please let me know if these works fine with you.

Pls Note : In case you are getting FC you need to flash the original framework-res.apk before flashing these patches.
[Nexus 4 Android Development] spadez2727:
Thank you! :) I've been using this for a while. So far, no problems encountered. :thumbup: :)
[Nexus 4 Android Development] ramjet73:
I just flashed the hells-core version of the updated mod and it works great on my 4.4.4 stock ROM. The flash drive is auto mounted when the powered adapter is plugged into the phone, it shows correctly in the storage settings while it is mounted and the unmount command works fine, all without any signs of an FC. :) The "Removed USB storage" notification stays on the notification screen and can not be cleared but that doesn't bother me. In fact, the message ends with "insert new media" so it may be that it was intended to remain as a permanent notification once an OTG device is mounted/unmounted.

Thanks a lot for all the work you have put into customizing the kernels and framework, and especially for bringing them up-to-date with the 4.4.4 ROM.

ramjet73
[Nexus 4 Android Development] jeanpir60:
Very good job.

I install hells-core version on Omnirom latest nightly.

(more pa gapps)

No FC, i see external storage into Storage settings, all work fine

Thanks a lot
[Nexus 4 Android Development] justvarshney:
OTG patch is available. Download link above...
[Nexus 4 Android Development] sakis_the_fraud:
I reflashed system.img just to be sure that i have the latest framework-res.apk.

Then i flashed super-su and finally the latest hells core b47 otg for 4.4.4.

First of all, no FC on pc connection.

But the notification is back again :-\
[Nexus 4 Android Development] justvarshney:
I will have a look at the notification again. This is bugging a lot.

I hope you are able to detect the USB and use it properly along with settings-->Storage option.
[Nexus 4 Android Development] sakis_the_fraud:
Yes, the usb drive is detected and auto mounted!
[Nexus 4 Android Development] bombadier:
Having a difficult day updating to 4.4.4 with everything that can go wrong will go wrong :(

[MENTION=1175139]justvarshney[/MENTION]

Have discovered that flashing hells-Core_b47_4.4.4-OTG-justvarshney with the latest Mahdi ROM results in a FC etc that you were trying to fix,have to reflash the rom zip for it to stop,got enough to be fixing before I get to otg but thought you would want to know
[Nexus 4 Android Development] bruce7373:
The new hellscore b47 works beautifully with the latest Omni nightly. And I no longer have to use Stickmount. Thank you! Is the otg_recovery mod still necessary with TWRP? I was able to mount the sd card successfully, but I just flashed the new b47 patch over the existing one, so don't know if that's a hold-over or not.

No FC when connecting via USB to my PC, but I still need to disable Debugging first. It's no big deal, just wondering if that's the way it must be.
[Nexus 4 Android Development] justvarshney:
Glad to know.

You shouldn't need to disable USB debugging for mtp to work. If that is happening I will look into it. Pls confirm. I will flash the same ROM and try it out.
[Nexus 4 Android Development] justvarshney:
I will tests it out on mahadi latest ROM.

Apologies for the inconvenience you had and thanks much for the feedback.
[Nexus 4 Android Development] midograna:
Flashed latest b47 on pa 4.41

Unfortunately got too many FCs .. Had to hard reboot & reflash the ROM .. Please make it work on pa 4.41
[Nexus 4 Android Development] justvarshney:
Pls share the ROM download link.
[Nexus 4 Android Development] eurochild:
http://www.paranoidandroid.co/roms/mako/
[Nexus 4 Android Development] bruce7373:
I'm thinking that maybe it isn't your kernel, because I'm seeing the exact same behaviour when I plug in my Nexus 10 (also running Omni) and I'm using the built in Omni kernel with it. Both devices show up on my PC as a Portable Device in Device Manager, so maybe it's a driver issue (?).
[Nexus 4 Android Development] fozzie:
Yes, it is needed (each time you flash a new recovery). It replaces the _recovery_ kernel with your current kernel. (Flashing a new kernel has no impact on the recovery's kernel.)
[Nexus 4 Android Development] keyra74:
doesn't work on my cm 11

i tried reflashing their framework-res and still android media stopped working
[Nexus 4 Android Development] ramjet73:
For anyone having issues with the OTG mods (or any other problems within Android) it's much more helpful to collect and submit logcat information than just reporting that it's not working. Here's a good summary of how to save a logcat file, which can be done with ADB or applications available on the Play Store. I prefer the app approach and my favorite is CatLog which makes it really easy to start, stop and save logcats.

ramjet73
[Nexus 4 Android Development] keyra74:
haha i submitted more logcat to him than you could imagine..
[Nexus 4 Android Development] ramjet73:
Sorry, I didn't mean to pick on you but that wasn't mentioned in your post. It would be helpful to identify when you have submitted a logcat so users having the same problem know that it has already been documented, even though it wouldn't hurt to submit multiple logcats for the same problem.

If you have already submitted a lot of logcats perhaps you have some additional tips for users that haven't done it yet?

ramjet73
[Nexus 4 Android Development] keyra74:
i use logcat from the sdk most of time or catlog on phone

here goes a recent one with all crashes from otg
[Nexus 4 Android Development] justvarshney:
Looks like the generic approach of adding USB storage under settings-->storage is not working for few ROMs and causing FCs.

please flash the attached zip to revert back the changes. This will just revert back the Storage related change and your SUB will still auto mount and will be accessible through any file browser.
[Nexus 4 Android Development] keyra74:
tested and working :)

usb key mouting too

yeyyyyyyyyyyyyyy
[Nexus 4 Android Development] dEris:
Will someone compile a list of ROMs that work 100% with these kernels? Especially ROMs that do not FC in Settings>Storage

Latest CM11: Settings > Storage causes FC

About to test on SlimKat.

-------------------------------------------------------------------------

[ DEVICE : N⁴ ]

[ ROM : CrDROID-4.4.4 ]

[ KERNEL : CrDROID-OTG ]

[ LAUNCHER : NOVA PRIME ]

[ CARRIER : T-MOBILE ]

[ CASE : NAKED/NONE ]

[ SCREENSHOT : MAY.18.2014 ]
[Nexus 4 Android Development] justvarshney:
I will separate the patch for settings - - > storage from the kernel patch and add multiple versions specific for different ROM along with a patch to revert back the changes in case of FC. Hope that will solve problem for many users.

Apologies for the trouble.
[Nexus 4 Android Development] keyra74:
no FC with storage on cm11 for me since you made the patch
[Nexus 4 Android Development] Midomad:
[MENTION=1175139]justvarshney[/MENTION]

Could you please add support for last semaphore kernel

It's the best kernel i ever used and i need otg!

Thanks in advance.
[Nexus 4 Android Development] dEris:
Right. But Seeing>Storage doesn't have USB info.

-------------------------------------------------------------------------

[ DEVICE : N⁴ ]

[ ROM : CrDROID-4.4.4 ]

[ KERNEL : CrDROID-OTG ]

[ LAUNCHER : NOVA PRIME ]

[ CARRIER : T-MOBILE ]

[ CASE : NAKED/NONE ]

[ SCREENSHOT : MAY.18.2014 ]
[Nexus 4 Android Development] dEris:
Has anyone been able to get OTG (with working settings > storage) on latest PA?
[Nexus 4 Android Development] jeanpir60:
For me on PA 4.41

Storage_FC_Fix_justvarshney.zip with Hells'core Patch

I have FC and Usb storage does'nt appear on Storage settings.

I go back on Omnirom and all works fine.
[Nexus 4 Android Development] atulclassic:
patched fronco r209 working fine on PA
[Nexus 4 Android Development] dEris:
With working storage settings?

-------------------------------------------------------------------------

[ DEVICE : N⁴ ]

[ ROM : CrDROID-4.4.4 ]

[ KERNEL : CrDROID-OTG ]

[ LAUNCHER : NOVA PRIME ]

[ CARRIER : T-MOBILE ]

[ CASE : NAKED/NONE ]

[ SCREENSHOT : MAY.18.2014 ]
[Nexus 4 Android Development] dEris:
Latest PA with working OTG (including settings>storage) ?

-------------------------------------------------------------------------

[ DEVICE : N⁴ ]

[ ROM : CrDROID-4.4.4 ]

[ KERNEL : CrDROID-OTG ]

[ LAUNCHER : NOVA PRIME ]

[ CARRIER : T-MOBILE ]

[ CASE : NAKED/NONE ]

[ SCREENSHOT : MAY.18.2014 ]
[Nexus 4 Android Development] atulclassic:
yes