Flashing an updated image without loosing root - Shield Android TV Q&A, Help & Troubleshooting

I am a little unclear about how to flash new images such as the recent 3.2. I want to update my shield TV Pro and not lose root.
I currently have the bootloader unlocked, which is necessary in order to apply SU for rooting. I installed SU via TWRP which has been flashed to the recovery partition. Should I ONLY install the system.img. (I'm uncertain what the vendor.img contains although but I'm pretty certain it can be flashed and not loose root.) Of course I would prefer to keep the custom recovery (TWRP) so why flash over that?
I suspect that if I flash the boot.img (isn't that what is "unlocked" with the "oem unlock" command?) I will have to do it again before I can flash SU using TWRP. This takes HOURS and I would like to avoid it if the 3.2 boot.img is unnecessary. Am I right that the boot.img contains the bootloader?

tman777 said:
I am a little unclear about how to flash new images such as the recent 3.2. I want to update my shield TV Pro and not lose root.
I currently have the bootloader unlocked, which is necessary in order to apply SU for rooting. I installed SU via TWRP which has been flashed to the recovery partition. Should I ONLY install the system.img. (I'm uncertain what the vendor.img contains although but I'm pretty certain it can be flashed and not loose root.) Of course I would prefer to keep the custom recovery (TWRP) so why flash over that?
I suspect that if I flash the boot.img (isn't that what is "unlocked" with the "oem unlock" command?) I will have to do it again before I can flash SU using TWRP. This takes HOURS and I would like to avoid it if the 3.2 boot.img is unnecessary. Am I right that the boot.img contains the bootloader?
Click to expand...
Click to collapse
try flashfire by chainfire search xda forums app is on playstore

I have chainfire. However my main question is whether I should flash the boot image? Does chainfire patch or unlock the bootloader?

if you are all ready rooted then your bootloader IS ALREADY unlocked i have used it default settings

Related

Updating firmware and root?

Hi guys,
I know how rooting and flashing works but I've been using HTC devices since the nexus one so there are some differences I just want to make sure of. I got my 6P yesterday, I unlocked the bootloader and flashed TWRP. I wanted to gain root but Im not sure about flashing the modified boot img and the vendor thing.
My build was K but I got an OTA before unlocking the bootloader which updated to L. Anyway I don't know why I just formatted every thing in TWRP instead of the factory reset and I lost the OS X_X I tried to restore my nandroid with no luck. Anyway I got the factory img (MDB08L) from google dev and flashed used 'flash-all.bat' in the bootloader, the phone is running fine right now but I would like to update to the latest firmware 6.0.1+root since im not getting any OTA.
I would like to install CleanCore(6.0.1), the guide is
-> Flash Bootloader & Radio (as needed)
-> Flash CleanCore
-> Flash Modified Boot (named angler-xxxxxx-boot.zip)
-> Flash SuperSU or SuperSU Beta
-> Flash latest vendor.img (ROM & Vendor builds need to match!)
1. Should I use MMB29M factory img and flash 'flash-all.bat' like I did with the L build for the first step? then I flash new recovery?
-Flashing the rom through the recovery
2. so after I flash the rom I boot into the bootloader and flash the modified boot img with fastboot flash boot boot.img right?
3. then I go back to recovery and flash SU which I should download before.
4. vendor img is flashed in recovery too or fastboot?
Sorry for the hassle I just want to make sure.
One more thing, in this guide http://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928 at step 9, OP flashes the factroy img files separately (bootloader,radio,etc), is there a problem with using flashall.bat?
Thanks in advance and sorry for my noobish questions.
If you want to keep your data while doing this process, then yes, using the flash-all.bat is a problem. However, if you are fine with reverting back to stock(where you have to activate Android and reinstall all of your apps) then the flash-all.bat file is just fine.
That guide in the thread you linked walks you through how to update without losing data. After doing all of that, you'll just need to install TWRP and SuperSU again(do the latest systemless supersu though)
Enddo said:
If you want to keep your data while doing this process, then yes, using the flash-all.bat is a problem. However, if you are fine with reverting back to stock(where you have to activate Android and reinstall all of your apps) then the flash-all.bat file is just fine.
That guide in the thread you linked walks you through how to update without losing data. After doing all of that, you'll just need to install TWRP and SuperSU again(do the latest systemless supersu though)
Click to expand...
Click to collapse
Thanks for the help.
I have rooted my stock rom and gained root. I also installed exposed so i'll be fine without a custom rom for some time. There has been a report that some cameras aren't working on 6.0.1 with root so I'll wait for a while.
Thanks again
mr.dj26 said:
Thanks for the help.
I have rooted my stock rom and gained root. I also installed exposed so i'll be fine without a custom rom for some time. There has been a report that some cameras aren't working on 6.0.1 with root so I'll wait for a while.
Thanks again
Click to expand...
Click to collapse
I'm pretty sure those reports are because they used the SuperSU root method that didn't auto patch the boot image(which is the version(or two versions) behind the current version of SuperSU). This is happening because people are updating to 6.0.1, but the patched SuperSU boot image is for 6.0 and the 6.0 boot image conflicts with 6.0.1
As long as you use the latest version of SuperSU then you won't have any trouble with the camera
Enddo said:
I'm pretty sure those reports are because they used the SuperSU root method that didn't auto patch the boot image(which is the version(or two versions) behind the current version of SuperSU). This is happening because people are updating to 6.0.1, but the patched SuperSU boot image is for 6.0 and the 6.0 boot image conflicts with 6.0.1
As long as you use the latest version of SuperSU then you won't have any trouble with the camera
Click to expand...
Click to collapse
Thanks for the info

Can I boot lock my 6p if I have TWRP installed?

I installed twrp and SU. Really the only reason I did it is because I use titanium backup to back up and restore apps and such. Otherwise I really don't need root.
I have two questions.
First Question: Can I re-lock the boot loader if I have TWRP and SuperSU installed? If not how can I use Android pay? Is there a work around? It's not allowing me to because it can't verify
Second Question: The OTA 6.0.1 won't stick. I'm pretty sure I've done one other over the air update (at least I thought I did, I may be remembering incorrectly) and it worked just fine. But for some reason 6.0.1 isn't taking. Any ideas?
If you don't need root what you can do is download the 6.0.1 imag direclty from google, put it in your adb/fastboo folder and use the flash-all command and it will erase root, twrp and it will be like you just got it from the factory. The only thing that would be still there is the unlocked bootloader. Once you've performed the flash-all command, you can simple lock the bootloader again. That's if you want to get rid of Root and Twrp.. If not, you can try a Rom like Chroma that has android pay working on it.. Here's the instructions. Hope this helps: http://forum.xda-developers.com/showpost.php?p=64269166&postcount=2338
Edit: Make sure you follow the systemless root instructions from that link to get android pay to work...
So I cannot lock the boot loader if I have root and twrp installed?
I really don't want to use a Rom. I'm happy with stock, just want to be able to use titanium backup.
And are ota updates not working if you have twrp installed?
OTA updates won't flash properly if you have TWRP installed, though I heard there is a way to extract the components of the update you want to apply so you can preserve root and custom recoveries while still updating. Sorry I don't know where the instructions are though.
No you can't lock the bootloader with TWRP installed, it can result in a brick.
I would not lock the bootloader unless you are 100% stock. You open yourself up to unrecoverable bricks. As for the update if you download the image from google you can just flash the individual partitions in fastboot. This way you can preserve your data. Heisenburg has a great guide here: http://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928 You will loose root but getting it back just involves reflashing the SuperSU-v2.62-3-20151211162651.zip from this thread http://forum.xda-developers.com/apps/supersu/wip-android-6-0-marshmellow-t3219344/post64161125#post64161125

Motorola Moto X pure stuck on bootloop after failed root attempt, HELP!!

Hey everyone I just recently got a Moto X Pure with TWRP recovery already installed and the bootloader unlocked, unrooted. The phone was stuck on Marshmallow so I went to update and it would take me to TWRP recovery every time and when I reboot back into the system, I'm still stuck on Marshmallow. So I downloaded an app that would make me download OTA updates while still having TWRP recovery but it needed root access, which I didn't have. I tried all of the one-click root apps but non worked then I stumbled across an easy root method: ( oops it said I can't post links, but basically I downloaded a supersu zip and flashed it) which I followed very precisely and I'm pretty sure I did nothing wrong. But when I flashed the ZIP using TWRP and booted back into system it was stuck on the Motorola logo which I'm assuming is bootloop. I was going to download a stock recovery using fastboot but I discovered that it would relock the bootloader, which would render the device useless to me so I can't. I also tried wiping the Dalvrik Cache but it always failed. I'm new to all of this so please guys I'm desperate for help. Thanks in advance
You can flash with fastboot the newest stock(the same version or upper) without commands "...oem..." at start and the end.
Or
The newest downloadable without commands "..oem, bootloader, gpt, oem...". @Philo0o
BL will be still unlocked.
Do you have a tutorial on how to do that please?
https://forum.xda-developers.com/mo...de-return-to-stock-relock-bootloader-t3489110 @Philo0o
More accurately you need to flash boot.img which is the kernel , in the case where root was being installed using systemless mode.
Otherwise, if you tried an old SuperSU version (where systemless didn't existed or the ones that failed to detect to install using systemless method on this phone) you'll need to reflash the whole system partition (using Firmware system chunks or custom ROM zip file).

Root and update firmware from 6.0.1

I rooted the phone (XT1642) using this guide: https://forum.xda-developers.com/moto-g4-plus/how-to/root-systemless-rooting-supersu-2-74-2-t3405772
I'm on 6.0.1 and have been getting the install system update prompt (NPJ25.93-14) every time I turn WiFi on.
Can I just install this or will it remove the rooting I did?
If it removes the root, how do I update to the latest firmware safely and root it?
Alternatively, how do I get rid of the prompt each time I turn WiFi on?
Can I take an image of my phone as it is and revert back to it at any time, and if so, how?
I really don't know what I'm doing and help would be appreciated.
If you're looking to update to NPJ25.93-14 via OTA, you'll need to unroot and flash a stock recovery (and stock logo.bin if you hid your bootloader warning), else the OTA will not install. Of course, this will remove root and TWRP until you've updated. Also, bear in mind after the update there's 2 more security patches (March and June 2017)
Before attempting anything though, ensure you've got a backup of your data (including a TWRP backup of your device as it is) and move them off your device until you're completed.
If you don't have access to a stock recovery/logo.bin, you could use a stock fastboot ROM to bring you up to date - this will remove root and TWRP however. The latest fastboot ROM we have is the March 2017 build: https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138
If you wish to update with the fastboot ROM (so bringing you up to the March 2017 build), you may wish to use the following fastboot commands, which will replace your recovery and remove root, but should not affect your data (however as with anything that affects your system, ensure you have backups regardless)
Code:
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot reboot
This fastboot ROM will formally update your device completely to NPJS25.93-14-4 (March 2017), but using these commands you will not have locked your bootloader. You may wish to wait for the June security patch (since OTA updates require a stock recovery, stock kernel and stock system) or proceed to rooting.
If you wish to root on Nougat, follow either: https://forum.xda-developers.com/mo...de-root-moto-g4-plus-supersu-android-t3587918 or https://forum.xda-developers.com/showpost.php?p=72496111&postcount=270 Please ensure that you flash a custom kernel before rooting on stock - Motorola - Nougat on Moto G4/Plus devices.
If you do not wish to fastboot a stock ROM, you could flash a TWRP flashable of the March build. This will not update your bootloader, or GPT partitions (so will not completely update your device to the March build), but is a nice shortcut. Again, this will remove root (but not TWRP) and so you will have to re-root as for Nougat. https://forum.xda-developers.com/moto-g4-plus/how-to/fxz-flashable-stock-npjs25-93-14-4-t3623010 for the TWRP flashable. This will also require you to flash the modem TWRP flashable file (included in the thread) as your fingerprint sensor may not work properly otherwise.
If you don't wish to update, and just want to disable the notification, have a look here: https://forum.xda-developers.com/mo...ble-notification-update-t3459587/post73005893
Thank you very much for the detailed answer. I have tried my best to understand the scene as best I can, but remain unfamiliar with the various approaches.
I have made a backup of my SD Card and used TWRP to create a backup of partitions: System (1983MB), Data (3459MB) and Boot (16MB) and transferred them to my PC
I am able to restore to my old 6.01 configuration with this backup I made provided I have an unlocked bootloader right?
To follow the guide you linked for rooting Android 7.0: https://forum.xda-developers.com/mo...de-root-moto-g4-plus-supersu-android-t3587918
Am I correct in saying I would need to unroot my 6.0.1, re-lock the bootloader and then update to the latest firmware via OTA updates? You say to "flash a custom kernel before rooting" but I don't know what this means or how I would do it.
Alternatively, I see the June security patch came out today. Would this be an easier or better way to update than the above method?
I don't know if you'll be able to revert back to your old 6.0.1 TWRP backup once you've updated to Nougat, as the modem and other firmware would be newer than 6.0.1. Additionally, if you've updated to the June update, be very careful about downgrading by flashing a stock ROM as the bootloader has been updated in this update, and attempts to downgrade the bootloader and GPT seem to result in bricking of devices (though TWRP flashes do not care about the bootloader and GPT usually, so you may be okay in that regard).
As for the procedure for updating, you do not have to re-lock your bootloader if you desire root later. Bootloader lock status does not appear to affect OTA updates/installations - only the presence of a non-stock recovery, system or kernel will cause the update to abort. Re-locking for your purpose, unless you're wanting to send your device for service or to sell it, is unnecessary so leave it unlocked. The unlocking instructions in the guide are only there if you're coming from a device with a locked bootloader. If you're going down the OTA route, a general guide would be:
1)Unroot your root manager (following the root manager's uninstall instructions).
2)Flash a stock recovery (and stock kernel) from a stock ROM. Ensure the stock ROM you're using is the same build as what you're currently on. If you've flashed a custom logo.bin to hide the bootloader warning, you'll need a stock logo.bin.
3)Download and flash the OTA update in your stock recovery (should happen automatically).
4)Reboot into Nougat NPJ25.93-14.
5)Accept and download the March update, repeat the install.
6)Accept the June update if it's arrived for you (I've only seen the June update deployed in Brazil and India at the moment, other territories may have to wait), or download and flash the OTA update in stock recovery. The June security patch appears to only flash over the March update.
7)Once you're updated, flash TWRP and back up your entire system again (you may wish to flash a newer TWRP).
8)Flash ElementalX and your root manager as directed in the guides. Ensure the root manager you flash is quite recent - either SuperSU 2.79 SR3 or newer (2.82 SR1 is the latest) or magisk v12 or newer should be okay.
NOTE - you could skip steps 1-5 if you use fastboot and the commands in my previous post with the March 2017 fastboot ROM. You'll be flashing stock copies of the partitions to your device and bring it up to the March 2017 update in one go.
With 6.0.1, you could root after you flashed TWRP - on stock Nougat, the anti-rooting security is much stricter, and attempts to root with the stock (i.e. Motorola, hudsoncm) kernel may cause your device to bootloop. Thus, to get around those security measures, we can flash a custom kernel (i.e. a 3rd party kernel) that doesn't have that security. We have ElementalX v1.04 https://forum.xda-developers.com/moto-g4-plus/development/kernel-elementalx-g4-0-01-t3424836 and vegito v6.08 https://forum.xda-developers.com/mo...ernel-vegito-kernel-1-0-13-september-t3461021 as custom kernels. To flash a custom kernel:
Download the stock version of the kernel (the LineageOS versions are for Lineage-based custom ROMs).
Reboot to TWRP.
Backup your boot partition (this contains your stock kernel)
Go back to 'Install' and tap the kernel zip
Follow the installer instructions to flash (e.g. with ElementalX, I've got stock 1561 MHz, no double tap to wake and none of the options selected on the installer screens).
Wipe cache/Dalvik
Reboot.
After flashing the custom kernel, then you can proceed to rooting on a Moto G4/Plus.
Here's what I ended up doing:
Updated using the March 2017 fastboot ROM and the instructions you provided.
Flashed the June OTA update files
Flashed the latest TWRP (3.1.1.0) over the stock recovery mode
Flashed ElementalX
Flashed Magisk 13.2
So I now have root access and my apps are still there. Unfortunately trying to install any modules in Magisk via the download section result in a "... has stopped working" message. I flashed the uninstaller and installed 13.1 but still no dice. The benefits of Magisk sounded great but I might just install SuperSU tomorrow instead.
I really appreciated your help, thank you very much
tekwarfare said:
Here's what I ended up doing:
Updated using the March 2017 fastboot ROM and the instructions you provided.
Flashed the June OTA update files
Flashed the latest TWRP (3.1.1.0) over the stock recovery mode
Flashed ElementalX
Flashed Magisk 13.2
So I now have root access and my apps are still there. Unfortunately trying to install any modules in Magisk via the download section result in a "... has stopped working" message. I flashed the uninstaller and installed 13.1 but still no dice. The benefits of Magisk sounded great but I might just install SuperSU tomorrow instead.
I really appreciated your help, thank you very much
Click to expand...
Click to collapse
No worries - if you're looking to switch to SuperSU, you'll need to uninstall magisk, then flash your clean stock kernel from your Nougat TWRP backup (flashing just the boot partition from the TWRP backup you made before flashing ElementalX should be okay). Then, you'll have unrooted and have a clean stock kernel - then flash ElementalX and SuperSU.
You'll need a clean stock kernel to remove traces of the previous root - you may have issues with SuperSU otherwise.
I think it was a problem with the way the zip files Magisk downloads are packaged, I can get them to install if I repackage the zip file.
Unfortunately, I never realised the xposed framework isn't supported on Nougat yet. I had a lot of quality of life tweaks that are greatly missed. Do you know if it's possible to safely downgrade back to Marshmallow at all?
I found this guide: https://forum.xda-developers.com/moto-g4-plus/how-to/how-to-downgrade-nougat-to-marshmallow-t3487201
But comments mention about future OTA updates maybe bricking the phone and "When come back from nougat to marshmallow don't flash gpt and bootloader , and flash everything else.".
Yeah, it might be that the modules haven't been updated for the latest magisk v13.2 yet.
Honestly, I do not know if it's safe to downgrade - with the June update, a critical security vulnerability was patch, and from what I've observed, attempts to downgrade have resulted in bricks. From what I understand, this seemed to result from users downgrading their GPT and bootloaders. You may be able to downgrade from Nougat to MM if you omit flashing the GPT and bootloader partitions (as mentioned in the guide you found), but there'll be a mismatch between your bootloader (Nougat) and your system (Marshmallow). Thus, for that reason, I'd suggest to not accept OTAs whatsoever. Again, I do not know if this is safe since the June update and I do not want to suggest things that might damage or ruin your device - it's your device, however.

Does OTA flash the recovery and re-enable DM-Verity?

I'm about to provision my One Plus 5 for use I will be running it with TWRP a unencrypted data partition (makes restores easier) and root via Magisk day one.
I'm curious if I'm running it in this configuration when an OTA comes down the pipe will it do any of the following?
re apply fastboot oem lock?
flash the recovery to stock recovery?
remove magisk?
re-enable dm-verity?
Curious if the process after an OTA apply is to re-flash TWRP potentially re-apply magisk? Does applying ota mess with your data partition if you already decrypted it?
Also was thinking about leaving the data partition decrypted so I can push things to it via ADB or manipulate it when it's in a non-functional state can anyone here comment on if that's still possible while encrypted? And if so what dis-advantages of leaving it encrypted I hear one is you have to remove the lock screen password before you create a backup since the keys are not backed up and you might be locked out after a restore.
With some more research I've answered my own question I'll put them here in case anyone wants to refer to them in the future.
TWRP users will lose TWRP after a flash of the OTA.
Root will be lost regardless if you flash using TWRP or stock.
Data is not touched during flash so it should stay as is.
DM-verity requirement is unknown.
For rooted users it's better to do a full flash with TWRP OTA through TWRP will cause a problem.
Actually, you won't get the small incremental OTA, you will download the complete 1.5 - 2gb rom... This happens when you have root whether you have got TWRP or stock recovery.
Root will always be lost, yes but if you flash with TWRP you can flash magisk oe SuperSU immediately afterwards to gain root again. Not having TWRP you will need to either boot TWRP or install it to install root again.
DM-Verity, I have never had any problems with this after flashing and then rooting...
I dirty flash the 4.5.10 and i had to reflash the ROM + no_verity_op5.zip. My first and only issue was a sort of bootlop to the recovery.
So wait. If I flash the OTA, then flash Magisk, I will have root and lose TWRP, right?
Then could I use some app like Flashify or the TWRP app to install the recovery?
I don't own a PC right now and want to know if it's possible.

Categories

Resources