yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] StephenSpig:
Any idea when Francisco will be back?
[Nexus 4 Original Android Development] cobyman7035:
still no OTG on n4 with 4.3?

Via my NeXus⁴ using Tapatalk² app
[Nexus 4 Original Android Development] ritchea:
My guess is, "No," until the modified 4.3 kernel is constructed-which will be coming.
[Nexus 4 Original Android Development] TheManii:
Can we request a build based on the stock JWR66V kernel with the absolute minimum patches to get otg working?

I cant speak for the others, but I want to use the stock kernel (or as close to it as possible anyway) and also have otg.

stock kernels arnt moving targets like franco/faux/<your preferred kernel>, at most they would (hopefully) be 1 update per ota.
[Nexus 4 Original Android Development] ziddey:
Update: Warning. I just did a complete wipe of my phone to test jwr66v. It looks like the framework-res.apk mod is not working properly and results in UI FCs. Looking into it now.

For jwr66v 4.3 _ONLY_:

ziddey-otg-jwr66v-07291840.zip

Take necessary precautions in case it bricks. I am still on 4.2.2 and am releasing this untested.

This is a "stripped-down" version with only the following changes to msm_otg.c:

1136c1136,1137
<	if ((motg->chg_type == USB_ACA_DOCK_CHARGER ||
---
>	// remove charge limit (500mA) in host mode -ziddey
>	/*if ((motg->chg_type == USB_ACA_DOCK_CHARGER ||
1141c1142
<	mA = IDEV_ACA_CHG_LIMIT;
---
>	mA = IDEV_ACA_CHG_LIMIT;*/
2157,2158c2158,2164
<	if (line_state) /* DP > VLGC or/and DM > VLGC */
<	motg->chg_type = USB_PROPRIETARY_CHARGER;
---
>	if (line_state) /* DP > VLGC or/and DM > VLGC */ {
>	// simulate ID_A to force host mode with charging -ziddey
>	//motg->chg_type = USB_PROPRIETARY_CHARGER;
>	pr_info("*** FORCING USB HOST MODE WITH CHARGING ***\n");
>	set_bit(ID_A, &motg->inputs);
>	motg->chg_type = USB_ACA_A_CHARGER;
>	}
2578c2584,2585
<	msm_otg_notify_charger(motg, 0);
---
>	// start charging (compatibility with proprietary chargers) -ziddey
>	msm_otg_notify_charger(motg, IDEV_ACA_CHG_MAX); // originally 0
3014c3021
<	struct usb_otg *otg = motg->phy.otg;
---
>	//struct usb_otg *otg = motg->phy.otg;
3015a3023
>	// need BSV interrupt in A Host Mode to detect cable unplug -ziddey
3017,3018c3025,3026
<	if (otg->phy->state >= OTG_STATE_A_IDLE)
<	return;
---
>	/*if (otg->phy->state >= OTG_STATE_A_IDLE)
>	return;*/
3025a3034,3040
>
>	// disable host mode (if enabled) -ziddey
>	if (test_and_clear_bit(ID_A, &motg->inputs)) {
>	pr_info("*** UNFORCING USB HOST MODE ***\n");
>	motg->chg_state = USB_CHG_STATE_UNDEFINED;
>	motg->chg_type = USB_INVALID_CHARGER;
>	}

There is no manual otg nor way of disabling charging in host mode. The 500mA charge limit in host mode is removed. It charges right off the bat, allowing use of Apple-compatible chargers. Modules are included, but I'm imagining there's no init.d script capability (essentially stock kernel).

I may make some tweaks to it down the road, but consider it more or less a one-time thing.
[Nexus 4 Original Android Development] TheManii:
Thanks!

In the process of testing it:

It boots and gets into android fine, going to try usb things on it.

Edit: unfortunately the usb part doesnt seem to work, plugged in a usb mouse onto a self powered usb hub and it still doesnt detect it.

the mouse is detected on my 2013 N7 though.

Edit2: tested setup with touchpad to be sure and it works there, still doesnt on N4

(the touchpad also requires a powered usb hub/external power to work)

Thanks for trying at least :(
[Nexus 4 Original Android Development] drshafi:
Franco's latest build is r165 and your latest build is r163, can i flash it with franco's r165?
[Nexus 4 Original Android Development] ziddey:
2013.07.29 1101ET: ziddey-otg-r165-07291101.zip Maintenance build-- rebase to Franco r165.
[Nexus 4 Original Android Development] etcman:
Hi guys, would a cable like this work? http://www.ebay.com/itm/141008683230
[Nexus 4 Original Android Development] RussianBear:
Yup, looks to be ok.
[Nexus 4 Original Android Development] ziddey:
I jumped the gun and dirty-flashed cm10.2 (jss15j) so I could do some testing.

So far, I've added the 5 kernel commits jss15j has over jwr66v and managed to compile it with the 4.7 toolchain. I had to swap the bfd linker in place of the gold one (see http://xdaforums.com/showpost.php?p=27427105&postcount=8).

I haven't compared ramdisks (Franco vs cm10.2) or comprehensively tested it, but it seems to be working without any flickering.

Note that this does NOT have usb host mode capabilities. It's simply Franco's r173 with the 5 jss15j commits.

Now to see what's changed in msm_otg.c.. Once that's all squared away, I'll do a one-time jwr66v aosp kernel with host mode support.

Update: I ran into issues with superuser, so I diffed Franco's ramdisk vs cm10.2. In the end, I ended up using cm's ramdisk, applying some of Franco's changes to init.mako.rc (related to mpdecision and thermald), and adding busybox and a Franco script. Still haven't done much testing, but for anyone who's on cm10.2/jss15j and wants to try Franco's kernel...

boot.franco-r173-jss15j-UNOFFICIAL.img
[Nexus 4 Original Android Development] ziddey:
That's weird. I'm wrapping things up for the night, but I did get host mode working on jss15j (can't see why jwr66v would have been any different). Going to have to figure out why the framework mod trashes the rom tomorrow. I'm surprised your rom still worked after flashing.

The main issue right now is what to do about the ramdisk. It looks like different devs may be implementing superuser differently.

Will do more testing tomorrow and hopefully release a long-term jwr66v patch.

edit: weird. It looks like the mouse cursor is no longer included in screenshots.
[Nexus 4 Original Android Development] heldgop:
is it possible to intall this patch on the stock rom? i read already several contradicting statements on in the first 2 pages, a simple yes or no would save me a lot of reserach time !

thx!!
[Nexus 4 Original Android Development] info.brandenburg:
From the first post:

"This is an all-in-one patch to enable externally powered OTG (technically usb host mode) support. It is based off Franco's kernel sources (thanks Franco), and

should work with any 4.2.2 rom.

Refer to the second post for details on modifications and additions."

Is it realy so hard to read the first post?

So the answer to your question is YES.

Android 4.3 is currently excluded.
[Nexus 4 Original Android Development] TheManii:
Well it booted just fine.

I only flashed the bare boot.img without the framework mods though, as the framework mods are mainly to enable otg storage support from within settings isnt it? You dont need the edits if you just want like usbhid support and/or use stickmount.(?)

You can always retest the first build of course if you want to eliminate my results and personally confirm if it does/doesnt work.

Are they including supersu in their ramdisks? If the goal is to only have otg storage it's not even needed per se once the rom has been patched for otg.

Well I cant speak for the others, but I plan on just using the stock ramdisk (or at least with minimal mods) once I can confirm that the patch works.
[Nexus 4 Original Android Development] vargasjj:
Hello. I have a chinese wholesales' MTK6589 JB 4.2.1 smartphone.

I flashed this ziddey.zip file using CWM but I still can't connect pendrives or anything OTG. USB Host Controller prompted "S3C USB Host driver NOT found!" and USB Host Diagnostics prompted "Claims support: NO"

My kernel is 3.4.5. Does anyone know how to get the correct kernel for getting USB OTG on this kind of phone?

Thank you
[Nexus 4 Original Android Development] ziddey:
I just did a full factory wipe (really wished I backed up the "sdcard" but I decided it was time for a fresh start) to test jwr66v. I found that the framework-res.apk mod is not working, but my HID mouse works just fine. Maybe 4.3 requires the android-side configuration for usb host mode to enable the mouse. I can't remember if it existed in 4.2, but it looks like there's now a "pointer speed" option for mice.

Looking into the framework mod now..
[Nexus 4 Original Android Development] yellowdie:
LOL! I'm almost tempted to hit your Thanks just for the laugh! But seriously, no.

This kernel is specifically designed for Lucky-Goldstar's (LG Corp) Korean made Google Nexus 4. Nothing else. A kernel is device specific. This will NOT work on anything else.

Chances are the Chinese phones (while the price is great and tempting) will not have many devs working on them--and pretty much there's a good chance you're just out of luck. Sorry. :eek:
[Nexus 4 Original Android Development] Matze5800:
The pointer speed option already existed in 4.2 :)

Thanks for your hard work, I hope you can sort it out :)

Gesendet von meinem Nexus 4 mit Tapatalk 4 Beta
[Nexus 4 Original Android Development] TheManii:
Hmm I'll retest the kernel again, I would like to hope that fac reset isnt required for it to take affect.

I did test with a usb mouse via a powered usb hub though.

That pointer speed option is there even completely unmodified, it equally affects BT mice I'm guessing.

Does the framework mod require a deodexed rom? Also keep in mind signatures (?)
[Nexus 4 Original Android Development] ziddey:
Factory reset isn't required. I just did it for the hell of it. But android.hardware.usb.host.xml and the build.prop addition may be.

I haven't actually tested on a stock rom before, but have read that the framework mod works on 4.2.2 odexed stock roms just fine.

As a test, I decompiled the framework, made changes to storage_list.xml, recompiled, signed, etc. And it got stuck at the boot screen (vs straight up injecting a modded storage_list.xml gets to the UI but FC-loops)...

I downloaded cm10.2 for the Galaxy Nexus to look at its storage_list.xml, but it's essentially the same as mine, so I don't know..
[Nexus 4 Original Android Development] TheManii:
Well I reflashed it and no change, what was your test setup?

Does it only work with a y cable to inject power?

I also had android.hardware.usb.host.xml the whole time, I forgot to mention it (oops)
[Nexus 4 Original Android Development] ziddey:
The phone needs to see power. If your powered hub does not send 5V up to the host, then you'll need a Y-cable.
[Nexus 4 Original Android Development] TheManii:
Yea looks like my hub doesnt send power, sorry this must be user error then.

I have a bunch of y cables, but none with the right combination of ports to inject power.

I'll buy a y cable and try again.

Sorry for the false report then
[Nexus 4 Original Android Development] punkmexic:
doest it work with android 4.3??

im using android 4.3 does it work with it??

can you associate with cyanogenmod, aokp, paranoid android or a rom maker

to have this in their roms too?
[Nexus 4 Original Android Development] FeintDoxx:
As far as implementation on other ROMs I doubt it as they would have to use the kernel from ziddeys patch and would most likely make it harder for them. Then again I really don't know myself but the idea just seems unlikely.

sent from the lone wolf next door with a Nexus 4 using XDA Premium.
[Nexus 4 Original Android Development] Javier.D:
I'm making a rom based in CM, and I'd like to add an option in settings to enable/disable USB host storage, but i don't know how can I do it.

Enviado desde mi Nexus 4 usando Tapatalk 4 Beta
[Nexus 4 Original Android Development] ziddey:
Sorry for the delay. I'm not sure why but I haven't been able to get a working storage_list.xml. I'm going to look into building a full cm10.2 to see if I can extract the storage_list.xml that way. Maybe apktool needs to be updated, but everything I've read seems to suggest it's still working with 4.3.
[Nexus 4 Original Android Development] StephenSpig:
Thanks for all of your hard work Ziddey! I actually just got my OTG cable today... Lol!
[Nexus 4 Original Android Development] TheManii:
Could you post/pm me the link to the one you purchased?

The samsung otg adapter I had bought for a different device doesnt seem to pass power though to the N4.

Is this unusual for an adapter to not pass power?
[Nexus 4 Original Android Development] etcman:
This http://www.ebay.com/itm/141008683230 just arrived in the mail today. Works perfectly fine.
[Nexus 4 Original Android Development] StephenSpig:
Any updates Ziddey?
[Nexus 4 Original Android Development] ziddey:
This is an interim release for JSS15J ROMs ONLY: ziddey-otg-r174-08080852.zip

It features a streamlined version of the otg hack (no manual otg, no host mode without charging). I haven't been able to get the storage_list.xml mod to work (looks like there might be a vold issue), so you'll have to use Stickmount or similar or manually mount your drives.

I'll be doing the same for JWR66V soon, but I'd really like to figure out this storage issue soon. As well, I'll re-add support for host mode without charging.

Do NOT flash on any 4.2.x or JWR66V ROMs. As always, take necessary precautions in case something goes south. Because of different ramdisks used by different ROMs, this patch uses the "AnyKernel" approach, patching in Franco's ramdisk specific bits during the flash. I did get one report of issues with the latest PA, so do be diligent.
[Nexus 4 Original Android Development] bhazard451:
It does seem to crash with PA. Thanks for working on this though! I've been dying to try to get my new DAC running on my phone.
[Nexus 4 Original Android Development] Javier.D:
Ok, it doesn't work for me, i' m using CM 10.2, and when i connect the USB Y cable, the phone doesn't reconize the USB, y have use this app: https://play.google.com/store/apps/details?id=hu.sztupy.android.usbhostcontroller and it says this, thanks ;)

Enviado desde mi Nexus 4 usando Tapatalk 4
[Nexus 4 Original Android Development] VikramW8:
Hey guys! I couldn't find a self powered hub and don't wish to purchase online. So what I did was, I flashed the latest mod on top of trinity and official CM 10.1 nightlies. It replaced my trinity kernel as my colors seemed washed out. Then I connected a normal usb hub(non-self powered) directly to a wall charger then I connected it a normal data cable(Female-Female) Then, I connected a thumb drive to the usb hub. After all this, I connected the entire setup to my nexus 4 using a normal otg cable. The hub was receiving power and so was the thumb drive as the hub was connected to the wall charger. But when I connected this setup to my nexus 4 the screen stopped responding but the phone was charging itself. But there was no notification that the device is one host mode.

I know this is crazy and complicated and not so easy to understand only by reading it but the setup is actually very simple..?? I'll go looking for the cable once again today.. But anyone any ideas about this? Should this work? I think this should as all the devices are getting powered.. Please reply!!!
[Nexus 4 Original Android Development] forfeit:
is it working with stock 4.3?
[Nexus 4 Original Android Development] ziddey:
http://source.android.com/devices/tech/storage/index.html

https://gist.github.com/steven676/6091619

Won't be able to get any work done for a few days. Hopefully will have a release by midweek.
[Nexus 4 Original Android Development] TheManii:
If you only flash the kernel part of:

then it works like on the 2013 N7 (otg works, but must use stickmount for flash drives)

If you use a normal otg cable and a Y cable, make sure it actually charges the N4.

The 2 otg adapters I had wouldnt pass power back to the N4, I had to get the combination otg+Y cable in the OP to make it charge.
[Nexus 4 Original Android Development] StephenSpig:
Mounted? Or Not...?

As one can clearly see, my setup (comprised of an external solar power pack, a USB-OTG Y-cable, and an 8 GB thumb drive), works to the extent that StickMount Pro says that it mounted the drive...

But just as clearly, one can see that it isn't showing up in 'Settings' > 'Storage'

I'm using Ziddey's 'Interim' basic JSS15J OTG variant of Franco.Kernel, based off of r174.

CyanogenMod 10.2 unofficial nightly, 08/10/2013...

Please help!

P.S. What is that 'SELinux' thing all the way on the bottom of 'Settings' > 'About Phone'
[Nexus 4 Original Android Development] rejanmanis:
Stock Kernel 4.3 JWR66V with OTG support

Stock image and stock kernel 4.3 is awesome.

Could please provide stock kernel JWR66V with OTG support.

Thank's very much in advance.
[Nexus 4 Original Android Development] ziddey:
If settings->storage worked, you wouldn't need stickmount. It's saying it's mounted. Is it?
[Nexus 4 Original Android Development] StephenSpig:
Yeah... I posted a screenshot of my notification tray that says 'Drive Mounted' or something to that extent...

But it's not showing that I have expanded memory...
[Nexus 4 Original Android Development] cobyman7035:
Wow getting close to OTA on next!!!

Via my Iconia™ A200 tablet using tapatalk²
[Nexus 4 Original Android Development] StephenSpig:
I'm not quite sure I understood what you wrote...?
[Nexus 4 Original Android Development] StephenSpig:
Ziddey, will there ever be a possibility to run OTG WITHOUT an external power source...?

As in, running a thumb drive with a regular USB OTG host cable?

(Not a Y cable...?!)

Has this been possible in the past?

Many thanks!
[Nexus 4 Original Android Development] adidas007:
I did the same thing, it worked for me. But then I bought a cable off eBay, though it took 40 days for delivery.
[Nexus 4 Original Android Development] ziddey:
4.3

JSS15J

ONLY. IF YOU DO NOT UNDERSTAND THIS,

DO NOT FLASH

.

2013.08.13 1533ET: ziddey-otg-r174-08131533.zip (JSS15J) Updated to 4.3's new unified fstab (native mounting support). Based off Franco r174.

Streamlined "OTG" mod. To disable/re-enable charging:

I'm still determining what to do about JWR66V (kind of a tough decision now that PA has gone with a sort of "hybrid").
[Nexus 4 Original Android Development] Javier.D:
Thanks Ziddey!!, you've do it!! :D it works perfectly

Enviado desde mi Nexus 4 usando Tapatalk 4
[Nexus 4 Original Android Development] ElliSkyline:
Thanks A lot Brother!! Working Good On Slimbean and Purified Kernel
[Nexus 4 Original Android Development] Sillik:
As a user on stock, considering moving to PA, I strongly urge you to consider supporting JWR66V! :)

Or I could flash CM, but seeing how PA moved back because of issues with JSS15J, I'm not sure I want to do this...
[Nexus 4 Original Android Development] ritchea:
If you're asking for a JWR66V version, it's in the works.

From ziddey, "I'll be doing the same for JWR66V soon, but I'd really like to figure out this storage issue soon. As well, I'll re-add support for host mode without charging." and "I'm still determining what to do about JWR66V (kind of a tough decision now that PA has gone with a sort of "hybrid")."
[Nexus 4 Original Android Development] Sillik:
Isn't the second statement you quoted implying that he is not sure about implementing it?
[Nexus 4 Original Android Development] ritchea:
Possibly he's not yet sure about how to implement it; but having been with ziddey from the inception of this patch, I believe he will get it figured out if at all possible. Also possible it does mean he's not sure whether to implement it. He seems to try to produce what the users need. He knows many use stock rom, so I do think he will try to work it out.
[Nexus 4 Original Android Development] Sillik:
That's why I posted: so that he knows at least one person is waiting for it! :)
[Nexus 4 Original Android Development] ritchea:
:good:
[Nexus 4 Original Android Development] FeintDoxx:
Boss got my USB otg y cable today :cool:
[Nexus 4 Original Android Development] martintzvetomirov:
+ 1 :)
[Nexus 4 Original Android Development] ziddey:
MAKE SURE TO DOWNLOAD THE RIGHT VERSION FOR YOUR ROM.

JSS15J 4.3.0 2013.08.14 2031ET: ziddey-otg-r176-JSS-08142031.zip Use Franco's ramdisk (plus necessary mods) instead of "anyramdisk" method-- rebase to Franco r176.

JWR66V 4.3.0 2013.08.14 2035ET: ziddey-otg-r176-08142035.zip First release for JWR66V-- based on Franco r176.

JDQ39E 4.2.2 2013.07.29 1101ET: ziddey-otg-r165-07291101.zip Maintenance build-- rebase to Franco r165.

Ramdisks are prebuilt now and not dynamically patched during flash (only the last JSS15J version had this patching). The issue is/was with various implementations of root access. If you are having issues, you may need to flash a different supersu/superuser/etc. Refer to your ROM's thread for details.

Also worth noting that modules support is enabled in the 4.3 kernels.
[Nexus 4 Original Android Development] zellleonhart:
Hey [MENTION=584916]ziddey[/MENTION], r176 JWR does not load the touch control module. Can you check on it? Because the app asks me to choose the nearest kernels instead of loading it directly, and none of them work. Thanks!

(r174 JSS touch control worked well)
[Nexus 4 Original Android Development] CerB:
Yea can confirm that :D
[Nexus 4 Original Android Development] FeintDoxx:
Quick question. Any reason why I can't copy my back up onto my flash drive? I keep on getting this error.
[Nexus 4 Original Android Development] cobyman7035:
Wow USB otg works on franco only?

Via my NeXus™ 7 FHD on Tapatalk⁴
[Nexus 4 Original Android Development] bruce7373:
If you're using TWRP 2.6, I believe that's why. There's been discussion about that in the TWRP thread. That's why I'm sticking with 2.5.
[Nexus 4 Original Android Development] FeintDoxx:
Yes I'm using 2.6. Hmm I'll flash 2.5 then
[Nexus 4 Original Android Development] alahkel:
hello guys, I'd like to ask dev ziddey something. [MENTION=584916]ziddey[/MENTION] could you please add this patch http://xdaforums.com/showthread.php?t=2104706 in your otg kernels? It is for adding kexec-hardboot capabilities to your kernel, so that we can use that on multirom tool. PM for you, sorry to bother.
[Nexus 4 Original Android Development] nikkpap:
hi can i use JDQ39E 4.2.2 2013.07.29 1101ET: ziddey-otg-r165-07291101.zip Maintenance build-- rebase to Franco r165. over this http://xdaforums.com/showthread.php?t=2307463 [KERNEL][LINARO][GPL][-N4-] Linaro franco.Kernel | r165 | Test 6 | 3.4.55+ GCC 4.8.2 -O3 i am on miui v5 4.2.2 and i want a franco kernel with otg suport can this mod work????

thanks
[Nexus 4 Original Android Development] Wis76:
Your monster quote is messing up Tapatalk. >___<
[Nexus 4 Original Android Development] dunghnguyen:
Kind attention to [MENTION=584916]ziddey[/MENTION]:

I have an usb hub the one used for external hdd that it has power integrated. The one is similar to this

http://www.amazon.com/Plugable-Powe...id=1376725444&sr=8-9&keywords=usb+hub+powered

I flashed your batch then used an usb otg calbe (1 end has micro usb otg plugged into Nexus4, the other end is fermale usb to connect to the usb hub).

I tried to plug in usb stick but nothing happen, even hdd.

Note I flashed kernel franco r176 on my rom Cataclysm jwr66v then try but nothing happened.

Can you advise some if I am wrong with that way of connection?

Tk so much for your kind attention.
[Nexus 4 Original Android Development] punitthereddevil:
Can the combination of these 2 work...?

1. A usual otg cable,I.e., male micro USB for the phone with female regular USB

2. A y cable having 2 male USBs with one female USB...

The picture below shows what I have in mind...can this work...?

*****Save your fingers the work and hit "Thanks" instead of typing it...!!*****

NEXUS⁴ Stock Android 4.3
[Nexus 4 Original Android Development] punitthereddevil:
Got my answer...

*****Save your fingers the work and hit "Thanks" instead of typing it...!!*****

NEXUS⁴ Stock Android 4.3

---------- Post added at 04:43 PM ---------- Previous post was at 04:27 PM ----------

I'm gonna use the deodexed stock 4.3 JWR66V ROM with cwm recovery...I downloaded the r176 build...does anyone see anything that might not let this work...?

*****Save your fingers the work and hit "Thanks" instead of typing it...!!*****

NEXUS⁴ Stock Android 4.3
[Nexus 4 Original Android Development] daniel578:
If I flashed the zip file , and I don't want it how can I uninstall it ?
[Nexus 4 Original Android Development] RussianBear:
you need a y-cable. read the first post, please.