• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root TWRP Recovery And OTA Updates?

kman9637

Well-Known Member
So, yesterday I finally unlocked the bootloader and rooted my Nexus 5 of 3 mos.using the tool in this thread. Yes, I know Nexus' are extremely easy using ADB but I've never used it before, so I didn't want to cause any problems. My question is, what will happen when the 4.4.3 update (eventually) comes out? I'm thinking one of three things.
1)It will unroot my phone, and the update will go fine
2)The update will fail and soft-brick my device. or
3)The update will fail and hard brick my device
Does anyone know what will happen? If it makes a difference I'm running TWRP recovery v2.7.0.0 and stock android 4.4.2. Any help would be greatly appreciated!! Also, if I need to install stock recovery, how do you do this?
 
Well depending on the upgrade you May or may not lose root. I had my lg g2 rooted and it updated to kit Kat fine no problems. Imho I don't think there will be an issue but don't trust me on that with your phone every time I did this it worked.
 
The easies way on the N5 if you are just on stock Rom with only root and TWRP recovery installed... Is to just download load the 4.4.3 OTA.zip and SuperSU v1.65 to your sdcard and download TWRP v2.7 to your PC.

Then boot into TWRP recovery and perform a factory set and then use TWRP and navigate to sdcard/downloads and install the 4.4.3 OTA.zip
Then reboot the N5.

The OTA.zip will replace your TWRP recovery with the stock recovery and you will also lose root.

Next:
Make sure to rename TWRPv2.7.zip to recovery.img and put it in your "android/sdk/platform-tools" folder, where your adb and fastboot.exe's are. Then connect your device to your PC with USB debugging. Enable it on the device, phone/settings/developer options/ check USB debugging.

Open command prompt on the PC and type :

adb devices

(Will list attached devices)

Type:
adb reboot fastboot

(Will reboot device to fastboot)

Type:
fastboot flash recovery recovery.img

(Will fastboot flash TWRP recovery)
Once TWRP is done flashing

Type:
fastboot reboot recovery

(Will reboot device to recovery)

On the N5 Navigate through TWRP to sdcard/downloads to SuperSU.zip and then flash SuperSu to gain root access.

Reboot device and done.

Otherwise you would have to revert back to factory stock image first before flashing the 4.4.3 OTA.

Just checking to see if you have xposed framework and any modules installed or a custom kernel? If so that would change the OTA update process.
 
Ok but if I were to update what would happen?

Probably it would fail. The OTA will check a few things. One of these is the recovery. A custom recovery will usually cause the update to fail.

As mentioned above. Just flash the zip which will find its way onto the net within seconds of being released.

Or wait for a rooted version of the update to be released and just flash it in TWRP
 
@ the OP
to be honest this method looks way too complicated than simple adb/fastboot route. with fastboot you know what usb drivers work in your case (google or lg or universal naked etc), what recovery you are using (cwm or tcwm or twrp or phills touch etc), what superuser binary you are using (supersu or superuser etc).
that being said if you know answers to these questions, they will definitely come in handy in the future.
rule of thumb is you will loose root (unless you have premium version of supersu binary and enabled root sur****l mode before updating. i do not know anything like that exists for superuser binary or not)
if you have any kind of custom recovery installed, xposed framework and modules installed, did any system level editing like buildprop modification, changing screen dpi, uninstalling any stock apps etc. the update will fail. you should flash back to stock, apply the update, redo the rooting again.
by looking at the screenshots of the link you posted the easiest thing seems to be "sideloading the update" if you are on stock recovery. or if you have a custom recovery installed, restore stock recovery + sideload the update. or flash stock + unroot, apply ota, root again.
 
Yes, as both GrenW and akmsr pointed-out, having a non-stock recovery will indeed cause an OTA installation to fail.

This is because the over-the-air (OTA) update contains edify commands that cross-checks various files and partitions on your device to make sure they match what is expected / needed for the update's patching or replacement process.

Typically, the apply_patch_check edify commands test this against various files by comparing a given file's SHA1 checksum against a known good/expected value. Should they not match, the OTA will fail because it doesn't want to try to patch a file that is not of the same version as expected.

The boot and recovery partitions are certainly ones that are typically checked.

So, if you are rooted, before you attempt to install an OTA, it's always a good idea to have a Nandroid backup taken and saved off of your device for safe-keeping.

Then, make sure you're as closely back to stock as possible, bearing in mind that if you have modified any system components, those are likely to cause the OTA to see a mis-match and fail.

The alternative would be to wait for a version of the OTA.zip file that has been specifically modified (and tested) to allow it to be flashed via a custom recovery. Versions like this would have, of course, their validation checks for the recovery image removed.

Hope that helps!

Cheers :).
 
Ah, thanks, xdrc45! :thumbup: :)

That's a very good write-up by XDA's El Daddy!

By the way, I've got a totally re-written version of my OTA Verifier app that I'm putting the finishing touches on. The old version didn't like some of the newer edify commands in the updater-script files that were being released, causing me to wholly re-engineer how I parse and process the edify commands.

If anyone want's a preview / test version of the apk, send me an email to scary.alien@gmail.com and I'll send you the newer, test version.

Thanks!
 
Back
Top Bottom