[HTC One E8] sanijsnj:
Hi, I found a way to fix this bootloop which happens after you flash the latest ota update if you have unlocked and rooted your stock rom.

I own a HTC E8 China Unicom [M8Sw - dual sim], but I think it will work on other variants.

It is the SU binary/files which are preventing the phone from updating correctly.

You can also restore a clean unrooted TWRP backup and do the OTA update.. it will work just fine.

This tutorial is for those who don't want to lose their app data and modifications.

To be able to update... you need to fully unroot the phone before. Well, this was previously not possible due to system write protection.

(There are also other methods of unrooting. (deleting the SU files manually with the file manager of TWRP recovery) This doesn't work, I have tried it myself..often cause bootloops.)

But now we have a custom recovery mod which enables us to write to the system partition and thus can fully unroot with SuperSU app itself.

Requirements:

-some expertise with adb/flashing/twrp recovery management will be needed.

-stock firmware.zip, inside the OTA zip file, where you will find you stock recovery,boot image, etc

-Stock ROM, rooted with no modified existing system files

-TWRP Recovery from [MENTION=1162986]Captain_Throwback[/MENTION] works fine. I used the 2.8.6.0 one. http://xdaforums.com/one-e8/orig-development/recovery-twrp-touch-recovery-t3060188

-untouched Stock Kernel Modules (IMPORTANT)

-SchKernel Extra 3.3, to gain write permission to /system http://xdaforums.com/one-e8/general/schkernel-extra-3-3-t3200090

[UPDATE: SchKernel Extra has been updated to 3.5 and the old one is not available for download on the other thread. You can find attached at the bottom of this section ver3.3 which I had used. Please don't use ver3.5 as a user has reported having bootloop with that.)

-Battery +80 charge recommended...the process gonna demand a lot of power.

-Patience... loads of it.... :p

Disclaimer: I am not responsible if you brick or damage you phone!!

Before you flash anything, be sure to have a working twrp full backup of you phone! In case anything goes wrong.

STEPS:

1. Copy the untouched kernel 'modules' folder [found in system/lib/ in your phone] to another location ( for e.g. to your internal phone memory), you're gonna need it later.

2. Flash the twrp recovery if you haven't already and boot into TWRP recovery.

3. flash SchKernel Extra 3.3 kernel mod. It will launch the aroma installer. There will be options as overclocking/underclocking etc..

I left everything on STOCK option, disabled Swipe2sleep, unselected the everything in the optional addition page. Then went to install it.

4. Reboot, and open SuperSU app, go into setting, tap the FULL UNROOT option, this might take a while. The first time, when the unrooting notice shows and it seems that the app is not doing anything, you might be required to exit the app by pressing home button. Then open the app again and redo FULL UNROOT option. If you exit the app and when re-opening it, the "unrooting notice" is still there, then it means it is working. This might take a bit of trial and error.

5. Ultimately, SuperSU app will close. Then you will need to reboot. You will see that SuperSU is gone and that you have no root access.

6. Now, turn it off again to go to fastboot. Connect to PC and flash the stock boot.img via adb to restore the stock kernel.

8. Then, in twrp recovery, mount /system partition and got to advanced >> file manager..

9. Now browse to /system/lib/ and delete the 'modules folder'.

This is because the SchKernel Extra 3.3 kernel mod flashed previously has modified your kernel modules and when you will try to update the OTA, the stock recovery will report that the kernel modules (xxxxx.ko) has be modified and it will stop the OTA update process.

10. Remember the previous untouched stock 'modules' folder you copied previously, now move it to /system/lib/HERE , to replace the deleted folder.

[DO STEP 9 BEFORE - Don't try to overwrite the folder, it won't be possible. It said operation failed for me. ]

Optional: You might also want to delete su.d folder in \system and init.d folder in system\etc

these files were for the custom kernel and won't be needed anymore.

11. Reboot into fastboot mode, connect to PC (if not already), flash stock recovery.

12. Now, you're good to flash the OTA updates. :good:

-Download it, if not already done.

If ever you have downloaded from PC and copied it to phone, and for whatever reason the phone is not detecting the zip file and asking for install.

Just move it to you exeternal SD card and rename it to "ptt.zip" , go into stock recovery and go down the list to "apply update from SD card"

and it should flash the zip file. When done, select the reboot option and it will say reboot to flash firmware.zip and the will boot. :fingers-crossed:

When booting it will take some time (3 to 8 mins), and then go to the "Android is updating - optimizing apps" screen. This might take a lot of time if you have a lot of apps installed. The phone might get really hot during this process.

When the OS finally boot completely there will be an "HTC" screen and an exclamatin mark in the notification bar. NO WORRIES, it is the just the update working. It will go away when the update is fully processed.

After OTA update is done, you can make a twrp backup of the unrooted system, so that you can restore it for future OTA updates.

If some steps are confusing, feel free to ask for any clarification ;)

Hope I helped you. Don't forget to hit thanks ;)