[HTC Sensation] krazy_about_technology:
Security Update (India Version)

Just now the update has become available in India. Updating now.

EDIT: OK Guys, I have identified and got past some issues while successfully updating my phone. People who have changed their CIDs to 11111111 to flash some custom or even stock rom for some other country and then rooted their phone (MY case, I flashed an Indian ROM on Sensation imported from Indonesia) will not be able to apply this update as it is.

If you will try to update, it will download and will get deleted instantly saying that you have tempered with your system and will delete the file.

If you try to flash the original recovery, u either will not be able to flash (remote system does not allow error) or after flashing while trying to boot into recovery will get a red exclamation mark.

Here is the workaround I used:

1. Install ClockWorkRecoveryMOd again.

2. Now we need to get the update file. But FOTA process keeps on deleting it saying that phone has been tempered with. So we would need to apply a trick. let the update download and meanwhile go to the folder /sdcard/download using ES File Explorer and copy the update file. Now go to some other folder and wait till the download reaches 99%. At that time, open the copy/paste drawer and repeatedly try to paste the file in quick successions, till u get the message file copied successfully. Basically the idea is to copy the file before the FOTA process detects a tempered system and deletes it. Move the file to root of the SDCard and rename it to Update.zip.

3. If you try to flash it using CWM now, you will get assert failures quoting "Error 7". This is because the updater script file inside the update.zip has some assert statements which check for a valid CID. To get past this, we need to remove these asserts. Now send this file to PC and open it with an Archive manager like 7Zip. In the folder, \META-INF\com\google\android\ you will find a file called updater-script. This is the file that needs to be modified. Extract it on desktop and open it with an editor that can handle unix line breaks like EditPlus. U will find lines similar to these at the beginning:

[B]assert(file_getprop("/system/build.prop", "ro.build.fingerprint") == "htc_asia_india/htc_pyramid/pyramid:2.3.4/GRJ22/125597.1:user/release-keys" ||
file_getprop("/system/build.prop", "ro.build.fingerprint") == "htc_asia_india/htc_pyramid/pyramid:2.3.4/GRJ22/125597.2:user/release-keys");
[/B]

[B]ifelse( is_ship_bootloader(getprop("ro.bootloader")) == "t" ,
assert(check_cid(getprop("ro.cid"), "00000000" , "11111111" ,
"22222222" , "33333333" , "44444444" , "55555555" , "66666666" ,
"77777777" , "88888888" , "99999999" , "HTC__038") == "t");
);
ifelse( is_ship_bootloader(getprop("ro.bootloader")) == "t" ,
assert(check_mid("full", "PG5813000") == "t");,
assert(check_mid("simple", "PG5813000") == "t");
);
[/B]

[B]assert(getprop("ro.product.device") == "pyramid" ||
getprop("ro.build.product") == "pyramid");
[/B]

Just remove these 3 asserts from the file, save it and put it back in the update.zip file. Put the update.zip in root directory of sdcard, boot to recovery and flash it from there. It will work for sure. Afterwards, doing a cache partition wipe and a permission fix will help eradicate most issues.

Let me know if it helped someone.