I have built a flashable zip to replace the kernel in your recovery image with one that supports USB-OTG. I have repacked the TWRP 2.6.0.0 recovery image with a different kernel that enables the use of USB-OTG when booted to recovery. The kernel is taken from Ziddey's patch for externally powered usb-otg and is a modified version of Franko's kernel. See that thread for more info on the kernel. (Note that this won't change the kernel used in your rom, only within TWRP).
Currently, TWRP is the only recovery I know of that supports USB-OTG. So while you can probably run this without problems on other recoveries, it like won't do anything useful either.
I didn't actually develop anything here other than the script in the zip. I just used unpackbootimg to extract the kernel from ziddey's boot.img and extract the ramdisk fromtwrp's recovery.img the recovery installed on your phone, then build a new recovery image using those parts with mkbootimg.
This will not work with a standard, unpowered OTG cable!
Try this at your own risk. It works for me, but I am not responsible if anything goes wrong.
Requirements
Changes
Installation (zip method)
Use
Downloads
usbotg-replace-recovery-kernel-20131005.zip - 5.71 MB
Old Downloads
openrecovery-twrp-2.6.0.0-mako-usbotg.img - 7.11 MB
openrecovery-twrp-2.6.0.0-mako-usbotg.zip - 7.24 MB
Thanks
Ziddey - For his modifications to the kernel that made this possible (see thread linked above)
TeamWin - For TWRP recovery
Franko - For his kernel
Fkrone - For his flashable zip for CWM Recovery that I based mine off of
Koush - For his AnyKernel updater. I used it as an example and for the binaries.
See Also
If you want to or are already using Ziddey's method to enable USB-OTG in your rom, he has made a flashable zip that will copy the kernel installed for your rom to your recovery. See Post #13 for more info and to download.
Currently, TWRP is the only recovery I know of that supports USB-OTG. So while you can probably run this without problems on other recoveries, it like won't do anything useful either.
I didn't actually develop anything here other than the script in the zip. I just used unpackbootimg to extract the kernel from ziddey's boot.img and extract the ramdisk from
This will not work with a standard, unpowered OTG cable!
Try this at your own risk. It works for me, but I am not responsible if anything goes wrong.
Requirements
- An unlocked Nexus 4 (with TWRP installed)
- A USB OTG Y-cable. It should have a female regular USB, and both female and male micro-USB.
- Flash Drive (As of TWRP 2.6.3.0, FAT, exFat, and ext4 format worked, ntfs and f2fs didn't)
- Micro-USB power source (charger, battery, tiny gasoline generator, solar panels, finely tuned potatoes, etc)
Changes
- 2013-10-05
- Complete rebuild to do the work of replacing the kernel on your phone so I don't have to update every time TWRP does.
- Updated to Ziddey's kernel 2013.10.01 1954ET r188 for JSS/JLS
- 2013-09-19
- Original release
Installation (zip method)
- Download the zip file to your phone
- Boot into your phone's recovery (CWM / TWRP)
- Flash the zip
- Reboot to recovery
- Repeat these steps after upgrading your recovery image.
Use
- Boot into recovery
- Connect flash drive and charger to OTG Y-cable.
- Connect Y-cable to phone.
- You should now be about to mount USB-OTG, select it for backup/restore, browse it with file manager, etc
Downloads
usbotg-replace-recovery-kernel-20131005.zip - 5.71 MB
Old Downloads
openrecovery-twrp-2.6.0.0-mako-usbotg.img - 7.11 MB
openrecovery-twrp-2.6.0.0-mako-usbotg.zip - 7.24 MB
Thanks
Ziddey - For his modifications to the kernel that made this possible (see thread linked above)
TeamWin - For TWRP recovery
Franko - For his kernel
Fkrone - For his flashable zip for CWM Recovery that I based mine off of
Koush - For his AnyKernel updater. I used it as an example and for the binaries.
See Also
If you want to or are already using Ziddey's method to enable USB-OTG in your rom, he has made a flashable zip that will copy the kernel installed for your rom to your recovery. See Post #13 for more info and to download.
Last edited:
