Posting this over here.
Mostly clean fork of OmniROM/android_bootable_recovery, with patches from TechV/android_bootable_recovery and my modifications.
Meant for OS2SD, so you can flash things not meant specifically for the Optimus V (like pa_gapps, or other things I once recommended but don't sit well with trying to walk people through getting working anymore, like CrossBreeder,) and have it flash correctly to the OS2SD /system and /data partitions which most recoveries won't do without some natty prodding through ADB. And sometimes not even then.
You'll need this for my kitkat ROM. With the recent androidarmv6 TLS-enabling and swapping /system and /data partitions in the kernel, this is now the ONLY recovery that will properly flash my ROMs.
partition 1 is still /sdcard.
partition 2 is system. I moved it arbitrarily several times because it seems I'm the only one actively developing for thunderc right now, and now it matches HardLight's p500 OS2SD setup.
partition 3 is swap.
partition 4 is now ext4 /data. It was, in the first iteration of OS2SD, ext4 /cache, but I moved that back to mtdblock1 for speed and space.
The OS2SD partitioner knows the new layout: /sdcard, /system, /swap, /data. In Internal mode it knows the internal layout, /sdcard, /sd-ext, swap.
Now a unified Internal/OS2SD recovery!
Things that are different from stock TWRP:
In the title bar it tells if in Internal or OS2SD mode.
Whichever mode it is in, it will flash generic zips like CrossBreeder or whatever, to the appropriate partitions.
Under Advanced is a button to switch modes, labelled with whichever mode it's NOT in. It gives an abort option and swiper to activate the switch.
v4 release fixes mode switch bug.
It will flash internal roms correctly whichever mode it is in. also OS2SD roms formatted like mine where it's mount EMMC /system in the updater script.
The main point to the multi is to be able to flash the generic zips without modifying them to either internal or os2sd as wished. And to be able to format internal or OS2SD partitions separately without changing their names.
And also, the partitioner is different in each mode to reflect the partitions used.
In OS2SD, it makes vfat, system, swap, data.
In Internal it makes vfat, sd-ext, swap.
I made it multi mode because I still support internal builds for thunderc even though I don't use em myself.
Has all the TWRP 18.104.22.168 goodies like 'Repair or Change File System' under Advanced Wipe, and text wraparound.
If it gives and update-binary error, flash the old TLS internal recovery from the download folder first, reboot recovery, then flash the multi version.
IMPORTANT: When you flash the new recovery, reboot recovery to be sure it works, before flashing ROM.
Thanks to TechVendetta for his source or I'd not have messed with TWRP at all.
Not to mention the partitioning code.
Thanks to androidarmv6 for the android_device_lge_p500/msm7x27-common tweaks for TWRP which I shamelessly kanged with credit given, from thunderg to thunderc, like my 3.0 kernel and much of my device folder setup.
And thanks to @Dees_Troy
et al for TWRP source code. Very very pretty, fun to modify, and I love
the terminal and file manager.
If any original devs of TWRP happen to see this, my apologies for mangling the source
to my own ends. It's a work in progress and I take full responsibility for any bugs or glitches. And thank you again for sharing.