How can I get OTA Updates while Rooted?

MikeCallery

Member
Aug 23, 2012
21
0
0
Visit site
OTA Updates while Rooted

I asked this on another forum and went no where, maybe someone here knows the answer.

I rooted my N6 and have TWRP installed. A beautiful combination, however, recently I have been getting upgrades from Google for the phone which will not install. The upgrade has the phone reboot into recovery mode, which is TWRP and then it simply does not take place.

I did not want to put on a custom ROM, I simply wanted to get two apps running and for that, I had to be rooted.

Can anyone tell me how I do the upgrades now? I used the WUG kit to even put the phone back to stock and remove TWRP but then when it went to do the upgrade it went to the recovery screen and showed an error when it tried to upgrade. I am not sure if my bootloader was locked or not, maybe that was the culprit.

I'd like to leave the phone rooted with TWRP but still do the upgrades?? How??
 

jj14x

Well-known member
Jan 9, 2011
995
24
0
Visit site
Re: OTA Updates while Rooted

If you are rooted, I'd urge you to keep a custom recovery (TWRP) installed, and most importantly, not lock your bootloader (unless you are absolutely sure you know what you are doing). I've seen enough folks that end up with a soft/hard brick because they lock their bootloader, and are unable to boot up into the OS.

Now, on to your actual question: You are correct - since Lollipop, Google doesn't let the OTA install on top of a modified system. (any modification at all). If you were rooted, and you unroot, the system is still considered "modified".

The suggested way to install the updates would be ignore the OTA completely. Wait for the factory images to be made available on Google's site. Download it, and extract the system.img from that image (also get the radio file if the radio is newer than what you have). Use fastboot to flash the system.img (and radio if newer). Reboot, and reroot using TWRP, and you are done.

If you don't want to wait for the new factory image to be available, you can download the previous factory image, flash it, and then apply the OTA file, and then reroot using TWRP, and done.
 

LeoRex

Retired Moderator
Nov 21, 2012
6,223
0
0
Visit site
Re: OTA Updates while Rooted

Once you modify system stuff... be it root, a recovery, whatnot... you disconnect yourself from the OTA system. The OTA files come with system checks to look for any kind of system modification as part of the requsites to run. If it detects something, it kicks out. And to be honest, I doubt that TWRP would run it in the first place.

Once you modify your phone like that, you are now responsible for any updates. You can either flash back to full stock, load the OTA then re-root and load your customer recovery back on (which isn't exactly all that hard with a Nexus). Or you go out and find a flashable zip that you can load in TWRP yourself.

There are a few other things you can do... but it is still on you, not Google, to update.
 

MikeCallery

Member
Aug 23, 2012
21
0
0
Visit site
Re: OTA Updates while Rooted

Thank you, that is helpful and puts me on the right track. I remember somewhere I read about an app that prevents the phone from getting the OTA's so I might have to look at that.

Again, thanks.
 

LeoRex

Retired Moderator
Nov 21, 2012
6,223
0
0
Visit site
Re: OTA Updates while Rooted

Well... if you search around, you'll find something to disable the OTA checks.
 

Lee_Bo

Well-known member
Apr 4, 2010
929
58
28
Visit site
Re: OTA Updates while Rooted

Go to SETTINGS / SOUND & NOTIFICATION / APP NOTIFICATIONS / GOOGLE PLAY SERVICES

Then choose "never show notifications from this app".

Screenshot_2015-09-16-16-44-36.jpg
 

LeoRex

Retired Moderator
Nov 21, 2012
6,223
0
0
Visit site
Re: OTA Updates while Rooted

The problem with blocking Play Service's notifications is that you end up blocking a lot more than an OTA notification.

The best way to block that I've seen is using a tool that can selectively block certain services from running. There are some flashable zips out there that probably do it. But you can also use a tool like Autostarts to go in and do a surgical strike on only the services that do the OTAs... looking around, here are the services:

com.google.android.gms.update.SystemUpdateService$ Receiver
com.google.android.gms.update.SystemUpdateService$ ActiveReceiver
com.google.android.gms.update.SystemUpdateService$ SecretCodeReceiver

Go do a search for "Disable OTA check nexus 6"... find the method that best suits your needs.
 

biotron2000

Well-known member
Feb 25, 2015
149
0
16
Visit site
Re: OTA Updates while Rooted

I had my phone rooted, but was having trouble with Android Auto and unrooted it and returned it to factory. I still get OTA updates.
 

brogdonbr

New member
Sep 30, 2015
2
0
0
Visit site
I've got a Nexus 7, with the same basic setup (rooted stock + TWRP + Xposed). Quick question--does flashing system.img from the factory image wipe out all of my apps and settings? I know that it does when I've downloaded factory images and ran the "install-all" script in order to return a device to stock.

Thanks!
 

jj14x

Well-known member
Jan 9, 2011
995
24
0
Visit site
I've got a Nexus 7, with the same basic setup (rooted stock + TWRP + Xposed). Quick question--does flashing system.img from the factory image wipe out all of my apps and settings? I know that it does when I've downloaded factory images and ran the "install-all" script in order to return a device to stock.

Thanks!
User Apps and app settings will not be impacted by flashing system.img
The flash-all script will wipe your user apps (unless you override the userdata wipe with the -w)
 

tazmanian200

New member
Dec 2, 2015
3
0
0
Visit site
Re: OTA Updates while Rooted

once I'm rooted and want to update, all I have to do is download image file, extract the system img file and flash it? reroot thru twrp and I'm done, won't loose my apps and data?
 

jj14x

Well-known member
Jan 9, 2011
995
24
0
Visit site
Re: OTA Updates while Rooted

Personally, I flash everything except userdata.img (so, flash cache, system, bootloader, boot, radio...)
Can't reroot just using twrp (with Marshmallow) - need a custom kernel too. But the concept is still the same. Just flash the new image files (skipping userdata), and reroot. Your user data should stay intact
 

tazmanian200

New member
Dec 2, 2015
3
0
0
Visit site
Re: OTA Updates while Rooted

So to get Root back, you have to flash the root boot img file again after your done? do u have to reflash twrp too? then go to twrp and flash superSU again?
 

tazmanian200

New member
Dec 2, 2015
3
0
0
Visit site
Re: OTA Updates while Rooted

So to get Root back, you have to flash the root boot img file again after your done? Do u have to reflash twrp too? then go to twrp and flash superSU again?
 

jj14x

Well-known member
Jan 9, 2011
995
24
0
Visit site
I've stopped rooting my phone, so can't say for sure, but it should be possible to flash the modified boot img (instead of flashing the stock one and then flashing the modified one).
(Edit: You could just skip flashing the boot.img, and retain the custom boot.img)

TWRP - if you flash stock recovery, you'll need to flash TWRP. If you plan to root, just skip the stock recovery. You will need to flash SuperSU for sure because your system.img is wiped
 

anthonymr921

New member
Mar 13, 2016
2
0
0
Visit site
I know this is kinda late. I know that I have to flash the stock system.img in order to install an OTA, but do you have to flash the recovery.img as well? I thought OTAs wouldn't install if you messed with the system and recovery.
 

lephils

Active member
Feb 22, 2014
39
0
0
Visit site
I know this is kinda late. I know that I have to flash the stock system.img in order to install an OTA, but do you have to flash the recovery.img as well? I thought OTAs wouldn't install if you messed with the system and recovery.
Why flash the old system.img and then take the ota update?

Just flash the new system image and you're done.
 

anthonymr921

New member
Mar 13, 2016
2
0
0
Visit site
Well because sometimes theres no image like for monthly security updates.

Okay so, get the system image, flash that while keeping the custom recovery, then reflashing SuperSU?
 

lephils

Active member
Feb 22, 2014
39
0
0
Visit site
Well because sometimes theres no image like for monthly security updates.

Okay so, get the system image, flash that while keeping the custom recovery, then reflashing SuperSU?
1. Google always posts the images a couple of days before the ota update starts rolling.

2. Yes.

So you can update faster if you want, and it's even less trouble. Well I think.