[RECOVERY/MOD] TWRP 188.8.131.52+ with externally-powered USB-OTG support [2013-10-05]
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 184.108.40.206 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 from
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.
- 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 220.127.116.11, 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)
Installation (zip method)
- 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
- 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.
usbotg-replace-recovery-kernel-20131005.zip - 5.71 MB
openrecovery-twrp-18.104.22.168-mako-usbotg.img - 7.11 MB
openrecovery-twrp-22.214.171.124-mako-usbotg.zip - 7.24 MB
- 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
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.
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.
Nexus 7 2013 - Carbon
Nexus 4 - CM10.2
Nexus 7 - CM10.2
Epic 4G - CM10
HTC Hero (cdma) - CM7