[HTC One S] Sneakyghost:
TWRP 2.5.0.0 Viper Installation Fix

TWRP 2.5.0.0 Viper Installation Fix

USE AT YOUR OWN RISK - THIS IS STILL EXPERIMENTAL WHILE TRYING TO FIGURE OUT THE CORRECT SOLUTION - based on a CM binary which might produce other issues i haven't seen yet!​

Courtesy of Dees_Troy (who identified the problem with the installation) and Torxx i am now able to present you a fix (attempt!) for installing Viper 2.1.0 with the later TWRP. This has, however, a downside. The reason for the install fail is rather complex and has to do with changes made to the Kernels used in the later recoveries (JellyBean based). This means, the fix will make the ViperOneS.zip fail to install or install faulty on the older TWRP if you choose to apply it to the ROM.zip. Unfortunately, you cannot have it install good on both.

The nature of the problem means, you have to make up your mind if you want to go with the latest recovery and use this fix, or want to stay with the old recoveries and NOT use this fix.

I tested the fix on TWRP 2.5.0.0 successfully.

I tested the fix on TWRP 2.3.3.0 with numerous errors.

I tested the fix on CWM 6.0.3.1. Philz Touch without errors - it seemed to flash fine but got stuck at splash after the second reboot, implying some issue. It might only need a fastboot erase cache. I did not test further due to lack of time.

What you get with this fix is:

working installation on TWRP 2.5

Full Wipe options in Aroma now (seem to) work.

The Kernel is being erased and flashed correctly in Aroma

What does NOT work on OLDER TWRP:

Kernel Flash fails

Full Wipe not executed correctly due to a bug in EMMC Firmware (recovery suppresses wipe for safety reasons)

Kernel Erase and Flash fail

Random set_perm errors are produced (i could not identify the cause)

What does this fix contain? What is it?

updater-binary-installer from CM10.1 nightlies (there found as updater-binary). The fixed binary Dees_Troy provides for ROM Chefs on Teamw.in has an issue with wipe and flash commands. Dees_Troy is working on it.

The erase_image commands in the Aroma Script now need 5 arguments instead of three to be executed by the new binary.

The write_raw_image command now needs to have a dev path instead of an MTD name as target. Don't ask me why...

The updater-binary change is required to make the zip work correctly with the newer recovery kernels (that's what i understood anyway). If we use that new binary though, the erase and write commands in the updater-script need to be updated to the new logic used by the kernel and the binary. The old syntax doesn't suffice anymore apparently.

Last but not least:

All credits for this go to Dees_Troy, Torxx and other folks with helpful guides i can't recall. My part in this solely was to do a hell of a lot of reading and skimming through literally hundreds of posts in various threads and try to combine and understand the information fragments i found. After i finished this, i realized why neither Torxx nor Dees_Troy have bothered to hunt this issue down: it simply isn't worth the work. Way too much hassle for a little thing. But i have learned something and i am grateful for that. So i do share this in the hope that it at least benefits some.

If there are issues or it doesn't work for you, let me know.

Download: http://d-h.st/8Dr

How to apply:

Open your ViperOneS.zip (2.1. only!!!) with WinRAR or 7zip and insert this META-INF folder, overwrite the one in the zip.

DO NOT use this on any other ROM variant! It is very specific to the Viper 2.1.0!

Common sources of errors and warning:

Changing recoveries a lot sometimes results in /cache not being mountable anymore. FIX: run a restore in TWRP which somehow restores cache. It'll be ok afterwards

TWRP very often has issues installing, mounting and unmounting stuff after mounting/unmounting USB. FIX: reboot recovery before installing anything.

Even though the stock kernel flashes correctly, the ROM might behave odd or not even boot. FIX: goto bootloader and fastboot erase cache.

[UPDATE]

rustykwak, Daiskei and mickey-r could install fault free like i could last night. All files extracted, everything good. Seems my device is acting up again :(