Saturday, October 15, 2016
How to Install an Android OTA Update Without Losing Root Access
How to Install an Android OTA Update Without Losing Root Access
Over-the-air updates have long been the bane of many rooted Android users existences. Its an endless battle: installing the update breaks root or wont flash at all, but everyone wants the latest version of their mobile OS. Thanks to a new tool called FlashFire, the struggle may be over.
Why OTA Updates Dont Play Nicely with Rooted Phones
The root process also installs an application like SuperSU, which controls access to the su binary, so you can choose which applications are allowed to have root access.Android is based on Linux, so Android devices come with a root user that functions like the Administrator user account on Windows. By default, Android doesnt give you access to the root account. Rooting is the process of enabling access to the root account, installing the su binary. Applications can call su to gain elevated privileges, so they can break free from Androids security sandbox and do more powerful things. Android doesnt come pre-rooted because of the security problems this could lead to, especially for less technically inclined users.
Youll usually lose your root access when you install an operating system update. On Lollipop and earlier versions of Android, the over-the-air (OTA) update sets your Android system partition back to its factory state, removing the su binary. On newer devices with systemless root, it overwrites the boot image. And if you have a custom recovery, the OTA update may not be able to install itself at all.
Once upon a time, SuperSU had an Survival Mode that would let you flash updates, but thats no longer around. Enter FlashFire.
What Is FlashFire?
FlashFire is powerful tool from Chainfire, the maker of SuperSU, that allows rooted users to perform a variety of actions, like flashing OTA updates and full zip files, create and restore backups, wipe data, and much more. It effectively eliminates the need to use recovery to manually backup or restore, and automatically handles un-rooting and re-rooting when flashing update files.
On many devices, having root will prevent OTAs from downloading and flashing. On some devices it will actually download, but you would need a tool like FlashFire to successfully flash it. On other devices, it will not actually download, so youd have to get the OTA file some other way, and then maybe you can flash it with a tool like FlashFire. If you cant get the OTA file, you may be out of luck.Theoretically, it should work on many, if not most, Android 4.2+ handsets. However, there are caveats.
Furthermore, if youre running a rooted device thats getting a full version updatefrom Lollipop to Marshmallow, for examplethings get murkier. Since theres no way to root Marshmallow without an unlocked bootloader, youll completely lose root access if your devices bootloader is locked. Thats unavoidable. If youve unlocked the bootloader, however, FlashFire should be able to preserve (or at least reinstate) root access once the update is finished.
So: while FlashFire isnt guaranteed to work on every device, if youve gone the official route to root your phone, it will probably work.
Its worth noting that FlashFire is in beta at the time of writing. That means features may not yet work as intended, and certain devices may experience more bugs than others. If youre not scared away by such things, youll have to first join the beta program before you can download the app. I also encourage anyone interested to check this thread on XDA, too, before getting started.
How to Use FlashFire to Flash an OTA Update, Without Losing Root
When you get notified that theres an update available for your device, the first thing youll want to do is go ahead and download itbut dont install it. If you tell the update to go ahead and install, it will likely fail since youre running a rooted device.
Instead, fire up FlashFire once the OTA has finished downloading. (If you dont have it yet, join the beta program and then download the app.) It should automatically detect the update file and ask if you want to generate the actions to flash it. Go ahead and tap OK.
This will generate a screen that may seem a little overwhelming to novice users, but its essentially just a breakdown of what FlashFire intends to do with the OTA file. Each option is customizable if you tap on itfor example, if you dont want to wipe the cache partition, simply de-select that option. You can also add various actions, but I wouldnt necessarily recommend doing that right now.
If you have a custom recovery like TWRP installed, FlashFire will back it up before starting the process, and restore it afterwards.
Once youve finalized the set of instructions, hit the Flash button. It will give a warning that it can take a bit of time for FlashFire to load, and a couple of black screens may appear. Go ahead and tap OK again.
After that, FlashFire will reboot and youll see a myriad of scrolling text on the display. Leave the device alone to do its thingthats just FlashFire running the needed commands. When its finished, itll reboot with the update flashed and root restored. Boom. So simple.
What to Do if Flashing the OTA Doesnt Work
If youve modified your device in a way that prevents FlashFire from applying the updatemaybe youre running a custom kernel, or the /system partition has been modified by theXposed Framework, for examplethen the update will fail. Theres currently no notification that the update wasnt applied, so youll have to jump into the Settings > About phone menu and see if the build number has changed. If not, then you know the update wasnt applied (theres also a good chance Android will notify you that the update still needs to be installed).
When this happens, the best thing to do is to download the factory image for your device if its available. In this example, Ill be flashing the newest update (April 2016 security patches) onto my Nexus 7.
Once downloaded, copy the factory images .tgz file to your phones internal storage or SD card.
Open up FlashFire and tap the floating action button (the red button with the plus) in the bottom right corner. Select Flash firmware package.
This will open up a file manager of sorts, which should default to the root internal storage folder. Scroll down until you find the file you just moved to the device.
Once you select the image file, FlashFire will scan the archive to verify its contents, then present a list of what can (and will) be flashed. Youre free to select what you want hereif you have a custom recovery and want to keep it that way, simply de-select the recovery option, for example.
Once youre ready to flash, just tap the checkmark in the upper right corner. Youll once again be presented with the list of actions before it proceeds, so if you want or need to change anything, nows the time.
After youve confirmed all the steps, hit the Flash button. Youll see the same warning about FlashFire taking some time to load and that a couple of black screens may appear. Just hit OK.
FlashFire will reboot and do its thing. Since its flashing a full image file and not just a simple update, it could take a little while for it to finish. Once it does, however, itll reboot and youll be good to go.
This is just scratching the surface of what FlashFire can currently do, and that goes without mentioning what it will be capable of in the future. Well undoubtedly have more things to say about it once weve spent more time with upcoming updates to the app.
Go to link Download
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment