Using FlashFire to apply OTA upgrades? - OnePlus 6 Questions & Answers

I have a rooted One Plus 6 running on stock Oxygen OS 9.0 There is an OTA update available at the moment. I have used FlashFire on my previous phone (Nexus 6P) and it worked flawlessly in keeping the root and applying OTA updates without any steps required. All I had to do was launch the app, it detected the firmware, and I would let it install. I purchased the professional version of the app as the free version stopped working at some point.
When I launch the same app on my OP6 and select "Flash zip or OTA" option I get another screen that has three options to check:
1. Auto-mount: Mount common paths before running update. Rarely necessary. Enable for A/B device OTAs, disable for all other OTAs.
2. Mount / system read / write: Mount /system read / write by default, rather than read-only. Doing this only once may break the future OTAs, Enable when flashing custom firmwares.
3. Restore boot and recovery images: Attempt to restore boot and recovery images before flashing. May be required for some OTA. Disable for non-OTA updates.
What's confusing me is the third option as that is already checked. It sounds like this option would install a factory image back on the phone? Should I uncheck it and check #1 as the only option?

If your bl is unlocked then you can't use ota to update. You have to flash the full zip in twrp.

se7ensde said:
If your bl is unlocked then you can't use ota to update. You have to flash the full zip in twrp.
Click to expand...
Click to collapse
I just found the instructions for update in another thread. I will have to use the blu-spark twrp to update it. Since I have never done it before, my question is, is it going to leave all the data and the app data intact? Things like pictures, videos, messages from messaging apps? Because in my mind I always thought of flashing the full image the same way as reinstalling the OS on any desktop computer - it deletes everything.
I am guessing the answer is no?

Is your bl already unlocked?

se7ensde said:
Is your bl already unlocked?
Click to expand...
Click to collapse
BL is unlocked and the phone is rooted.

shagexpert said:
BL is unlocked and the phone is rooted.
Click to expand...
Click to collapse
okay so if you have it setup Google will backup your apps calls and network settings and you will be able to sign out to your Google account and choose to restore it. For photos.. If you have Google photos installed it will backup everything you have told it to. But you shouldn't have to worry about any of this if you are just dirty flashing the update. Everything will be the way it was is like an ota only difference is you manually flashing the full room zip in twrp. So if your just dirty flashing you shouldn't lose any data.

Thanks! I will give it a try sometime later this week.

Related

Phone rooted - How about the monthly security patches ?

I was wondering, I have rooted my phone using Chainfire's CF-Autoroot.
Normally this will disable OTA updates, I'm aware of that.
But is there some way to manually flash the monthly security updates that Samsung releases each month ?
(or at least they say they are going to release them each month).
Is there a source somewhere where we can download them and flash then using Odin or TWRP ?
No you didnt root. There isnt full root for s7 yet
vipercoyote said:
No you didnt root. There isnt full root for s7 yet
Click to expand...
Click to collapse
Are you sure ? Because when I check manually for updates, I get the message stating that my phone has changed (root) and so updates cannot be downloaded and installed. It says that I need to try to download it via a PC tool from Samsung.
vipercoyote said:
No you didnt root. There isnt full root for s7 yet
Click to expand...
Click to collapse
There is for the International version.
vipercoyote said:
No you didnt root. There isnt full root for s7 yet
Click to expand...
Click to collapse
There very well is for the Exynos version/type and the reason I'm tempted to get it after prices have dropped a bit :
Check it here: http://forum.xda-developers.com/galaxy-s7/development/recovery-official-twrp-herolte-t3333770
Ok guys, now that we have established that root is available and working for the European version (which I have)...
Anyone know if the monthly patches from Samsung/Google will be available for download somewhere, so we can flash it manually and still be up-to-date ?
I would like to know this as well. I would guess they could be flashed with Odin?
I would like to know this. I am on the W8 variant rooted with autoroot and wondering how will I go about updating to new patches.
Sent from my SM-G930W8 using Tapatalk
I love Android.
you should flash your firmware via Odin to unroot, apply OTA, root again with auto root.
exploreresp said:
you should flash your firmware via Odin to unroot, apply OTA, root again with auto root.
Click to expand...
Click to collapse
Yes, I am aware of this possibility.
I was just hoping in applying the monthly patch without full flash (which completely wipes the phone).
Indeed, flashing will reset the phone...I found that the hard way last night.
There is a topic on S7edge forum about Chainfire's FlashFire app. It claims that can flash without resetting the phone.
Did not try it but I will follow the discussions there. Would be perfect to flash a new f/w and not have the phone reset. ( like good old times
Maybe it is possible to prevent the userdata and internal storage to be wiped by flashing the official firmware ?
Anyone has succeeded to do so ?
I managed to download the complete new firmware G935FXXU1APD3 from Sammobile and flashed it with ODIN with the phone in download mode.
It did not overwrite any of my personal data or apps and the phone worked as before however you will need to root again afterwards, but that doesn't take long anyway.
The only other thing I had to do was copy the mixer_paths and mixer_gain files to the SD card then replace them as the new firmware overrides the volume hack if you have it in place.
Keith
I guess that's what Chainfire trying to achieve with Flashfire. To be able to directly flash the Updates without having to manually backup/restore anything. Let's see how this goes. As of today you could flash the full oding images within flashfire.
Will definitely try when the next update for my phone variant comes.
I did take a TWRP backup just in case but was pleasantly surprised when the phone booted back to where it was.
I can confirm that the Flashfire method can be used for updates. Grab the update package, flash it through flashfire, and even select the "ever root" option to maintain root. Works great!
databoy2k said:
I can confirm that the Flashfire method can be used for updates. Grab the update package, flash it through flashfire, and even select the "ever root" option to maintain root. Works great!
Click to expand...
Click to collapse
How did you get the update package? When trying to search for an update on the phone it says I modified it.
Or did you load an full stock rom?
brotbuexe said:
How did you get the update package? When trying to search for an update on the phone it says I modified it.
Or did you load an full stock rom?
Click to expand...
Click to collapse
Grabbed a full stock rom, extracted the modem and system packages, and flashed them specifically through flashfire. A link to the full stock rom was posted on the Canadian S7 thread in the discussion forum.

Unlock/Root/TWRP OTA updates?

I've only had two phones prior to this but I have always unlocked the boot loader / rooted the device / installed a custom recovery / installed custom ROMS.
I believe with my MOTO X 1st gen this disabled the OTA updates.
Is that the case with the Honor 8? I'm wondering if it is worth it to install TWRP at this point as there seems to be so little in the way of kernels and ROMS.
Would I still be able to use SU or Xposed modules without Root?
What is the best move with this phone?
I have unlocked my bootloader as well as rooted my Honor 8. The only way to get SU and Xposed is by doing both of these procedures(root involves getting TWRP).
As for any Xposed modules, I tried amplify+greenify but instead of getting better battery life, my standby time decreased significantly. I am not sure why, but for some reason my Cell standby was showing to be eating a ton of my battery. Another big problem was that the dialer app would not let me call anyone, it kept crashing whenever I tried to. Both problems were fixed after I managed to get amplify+greenify uninstalled. Currently I am just running YouTube AdAway and MinMinGuard which seem to work fine.
So at this point, is it worth unlocking bootleader, installing TWRP, and rooting your phone? Well if there are certain Xposed modules that you really want then sure, and if there are certain apps you like that require root, then yes go ahead and root your phone. Note that if you try any OTA updates, you will have to remove TWRP as having your phone automatically restart and try to install the update wont work.
Imagine that the Honor 8 receives an update to say, Nougat, what is the pathway to update for someone who has rooted their phone. Will the OTA be able to be flashed if a .zip is provided here? Would we need to flash an entirely new ROM?
This is what I faced with my MOTO X. When Marshmallow came out there was talk... but no one was working on the at phone any longer so was never able to update.
pairustwo said:
Imagine that the Honor 8 receives an update to say, Nougat, what is the pathway to update for someone who has rooted their phone. Will the OTA be able to be flashed if a .zip is provided here? Would we need to flash an entirely new ROM?
This is what I faced with my MOTO X. When Marshmallow came out there was talk... but no one was working on the at phone any longer so was never able to update.
Click to expand...
Click to collapse
It doesnt matter whether or not your phone is rooted. You will get updates the same way, through OTA. Of course you can find .zip files to flash(although personally I am struggling to get the latest update flashed through TWRP).
The real question is for how long will we be receiving updates? Nougat is pretty much guaranteed with the new EMUI update. Huawei/Honor has promised up to 2 years of updates from what I have heard, but who knows what that actually means. They have also have a "partnership" with XDA, and the phone is decently popular so I am sure there will be a few roms, just not as many as say a OP3.
Why are people trying to flash via TWRP if the OTA updates still work after rooting and unlocking the boot loader?
pairustwo said:
Why are people trying to flash via TWRP if the OTA updates still work after rooting and unlocking the boot loader?
Click to expand...
Click to collapse
Okay so I just figured it out, but for the OTA update to work after rooting and having a non-stock recovery, you need to go to Settings->Updater->Menu(located on the bottom)->Download latest full package.
The full package is ~1.6GB and the regular update is ~280mb. The full package will work even if you have TWRP installed. But if you want the regular 280mb update, you need to get rid of TWRP and go back to a stock recovery.
Of course you will need to reinstall TWRP and root your phone again after doing this update.
Rakeen70210 said:
Okay so I just figured it out, but for the OTA update to work after rooting and having a non-stock recovery, you need to go to Settings->Updater->Menu(located on the bottom)->Download latest full package.
The full package is ~1.6GB and the regular update is ~280mb. The full package will work even if you have TWRP installed. But if you want the regular 280mb update, you need to get rid of TWRP and go back to a stock recovery.
Of course you will need to reinstall TWRP and root your phone again after doing this update.
Click to expand...
Click to collapse
I see the full package but I cant click on this, nothing is happened when I click on this.
Nas42O said:
I see the full package but I cant click on this, nothing is happened when I click on this.
Click to expand...
Click to collapse
I am not sure what you mean. Do you mean you can see the text "Download latest full package" but it is greyed out? If so please check to see if you arent currently at the latest version. If there is another problem, you might want to try to find a .zip of the full package and flash it that way.
Rakeen70210 said:
I am not sure what you mean. Do you mean you can see the text "Download latest full package" but it is greyed out? If so please check to see if you arent currently at the latest version. If there is another problem, you might want to try to find a .zip of the full package and flash it that way.
Click to expand...
Click to collapse
Yes , not greyed , but red color , and cant click on this .
I downloaded a full update of B31 about 1.77giga , just copy to the phone and flash it in twrp ?
Nas42O said:
Yes , not greyed , but red color , and cant click on this .
I downloaded a full update of B31 about 1.77giga , just copy to the phone and flash it in twrp ?
Click to expand...
Click to collapse
The exact latest update that I currently have is FRD-L04C567B150. I am not sure where you got your update but I suggest you just flash back to a complete stock image and try to update again from there.
Rakeen70210 said:
The exact latest update that I currently have is FRD-L04C567B150. I am not sure where you got your update but I suggest you just flash back to a complete stock image and try to update again from there.
Click to expand...
Click to collapse
its normal , you live in India no ?
i'm live in European country , so update are different .. Last update for us is FRD-L04C432B130
Nas42O said:
its normal , you live in India no ?
i'm live in European country , so update are different .. Last update for us is FRD-L04C432B130
Click to expand...
Click to collapse
No I am in the US. I am not sure about the EU version, but yes if you can find a .zip update file just put it on your phone and go into TWRP to install it. Might wanna make a backup too and wipe cache too just in case.
So if i download the full package in update and install it, bootloader will still be open? No full wipe? And later i only need to install twrp and root the phone again?
Palindrom87 said:
So if i download the full package in update and install it, bootloader will still be open? No full wipe? And later i only need to install twrp and root the phone again?
Click to expand...
Click to collapse
Updating or wiping your phone does not lock the Bootloader. The only way to lock the Bootloader again is by doing it manually yourself.
Yes after doing a full update you will need to reinstall TWRP as it will be replaced with the stock recovery and then re-root your phone again.
Rakeen70210, you sound really confident about doing full updates after rooting. Will these full updates also replace the kernel?
palendrome87 and NAS420 could you guys report back with any success or errors you have flashing full updates?
Where can one download full updates for Honor 8?
pairustwo said:
Rakeen70210, you sound really confident about doing full updates after rooting. Will these full updates also replace the kernel?
palendrome87 and NAS420 could you guys report back with any success or errors you have flashing full updates?
Where can one download full updates for Honor 8?
Click to expand...
Click to collapse
Seeing as how the full update package was ~1.65GB in size, I think its ok to assume that it replaces everything with the stock Honor 8 image. So yes it will replace the kernel too.
For downloading full updates, the only way I got mine was an OTA directly from the phone itself. Look at my previous comments to see how I got this update. If for some reason you cant update, check if your model is ready for an update. If it is and you cant update, try to flash back to a stock image. You should be able to find one on this site or anywhere else.
Flash stock recovery will lock boot loader ?
Nas42O said:
Flash stock recovery will lock boot loader ?
Click to expand...
Click to collapse
No, the only way to lock the bootloader is to manually lock it yourself using a similar operation to unlocking it.
Rakeen70210 said:
No, the only way to lock the bootloader is to manually lock it yourself using a similar operation to unlocking it.
Click to expand...
Click to collapse
I thought the same thing, but after taking the full OTA update my bootloader was locked again. If you want to update I would suggest first making a full backup to the external SD card in TWRP.
Then , its better to download à full update ( update.zip) ,copy to root of the phone , reboot in twrp and flash it ? Anyone already did it ?

Questions about OTA/Update to Nougat

Hello.
Just got the news about 7.0 being released for this phone, and thought I would give it a shot. However, I have a few questions before I update . These are not in any particular order and I would love any help people can provide, even if you can't answer all the questions.
Since I got this phone, I unlocked the bootloader (I bought the unlocked version) and got TWRP, then installed SuperSU binary in order to use a few root apps on my phone. Then along came an OTA update. When I went to install it, I got a message informing me that the update couldn't be installed due to my system being modified, which was fair enough as I had installed SuperSU. I stopped bothering with OTA updates.
Now it's been a while and the Nougat update is out and apparently available over OTA. Is there a way for me to return to normal system and get this OTA without losing all of my personal data already on the phone? I understand that I'd probably have to get TWRP again, and what is recommended for root now? Can I "re-lock" my bootloader in order to get the OTA?
Basically: How can I get Nougat without losing my data?
Cheers, and thanks for reading! Quick answers would be appreciated.
DuoDex said:
Basically: How can I get Nougat without losing my data?
Click to expand...
Click to collapse
backup your data and then flash a ruu, either the nougat version if its available for your version or flash the marshmallow ruu then take the ota update.
What is your "fastboot getvar all" ?
alray said:
backup your data and then flash a ruu, either the nougat version if its available for your version or flash the marshmallow ruu then take the ota update.
What is your "fastboot getvar all" ?
Click to expand...
Click to collapse
I was able to get it by poking around in the forums, first got the RUU for 1.57, relocked bootloader, and am now OTAing the Nougat version (fingers crossed it all works). Thank you so much for replying!
Question: If I install TWRP (like I had before) and then Magisk, will I continue to be able to receive OTA updates? Backing up and reinstalling is such a pain and I'm afraid I will break something. Some people say you need to mount system read-only - how is this accomplished via TWRP exactly?
Thanks again!
DuoDex said:
I was able to get it by poking around in the forums, first got the RUU for 1.57, relocked bootloader, and am now OTAing the Nougat version (fingers crossed it all works). Thank you so much for replying!
Question: If I install TWRP (like I had before) and then Magisk, will I continue to be able to receive OTA updates? Backing up and reinstalling is such a pain and I'm afraid I will break something. Some people say you need to mount system read-only - how is this accomplished via TWRP exactly?
Thanks again!
Click to expand...
Click to collapse
I just went thru the process or putting magisk on nougat. You'll want to use twrp 3.0.3-4 for it. From what I understood from the user who clued me into it, magisk will let you take OTA's and use android pay since it won't mess with dm-verity, SELinux or safetyNet. I can definately confirm the Android pay part at least. I did notice however i had to turn on magisk hide in the settings to get it to pass the safetynet check.
as for mounting the system as read only, the first time i booted into twrp it asked me to either slide the lock to modify /system or check a box to mount it as read only and that was it.
txag2011 said:
I just went thru the process or putting magisk on nougat. You'll want to use twrp 3.0.3-4 for it. From what I understood from the user who clued me into it, magisk will let you take OTA's and use android pay since it won't mess with dm-verity, SELinux or safetyNet. I can definately confirm the Android pay part at least. I did notice however i had to turn on magisk hide in the settings to get it to pass the safetynet check.
as for mounting the system as read only, the first time i booted into twrp it asked me to either slide the lock to modify /system or check a box to mount it as read only and that was it.
Click to expand...
Click to collapse
I was mistaken, Magisk now patches dm-verity and forced encryption. You should be able to take an OTA by flashing the stock recovery though, and failing that by also restoring the system image backup you make in TWRP before modifying or mounting system.

[Guide] XT1575 Update To NPH25.200-22 Nougat After Modifying Your System & Re-Root

[Guide] XT1575 Update To NPH25.200-22 Nougat After Modifying Your System & Re-Root
THIS GUIDE IS NOW DEPRECATED. THERE IS NO NEED ANYMORE TO GO THROUGH THE UPDATING PROCESS AS THERE IS A FULL NOUGAT FACTORY IMAGE AVAILABLE (Build NPH25.200-22). FIRMWARE AVAILABLE HERE: https://forum.xda-developers.com/moto-x-style/general/xt1575-moto-x-pure-edition-factory-t3704142 BE SURE TO THANK @acejavelin FOR TRACKING DOWN THE FIRMWARE PACKAGE FOR US.
Notes:
-YOU ATTEMPT THIS AT YOUR OWN RISK IF YOU FLASHED ANY FIRMWARE PREVIOUSLY NOT FOR THE XT1575 US VERSION
-This guide will have 2 parts. 1 for those that kept their systems read only/systemless, and 1 for those that did not.
-Whether you live booted TWRP or Installed TWRP, if you chose to allow system modifications your OTA will likely fail (you'll need part 2).
-Restoring a TWRP backup will not work and will cause an OTA to fail due to having to allow system write access in TWRP - You Need Part 2.
-This guide assumes you have basic ADB knowledge and already know what fastboot is and how it works.
-Thanks to @gokart2 for the OTA and @acejavelin for the return to stock guides
Part 1: Those That Tweaked Systemlessly Currently On 24.49-18-16 (Will only work if you kept TWRP read only/used systemless root):
1: Disable & Remove systemless Xposed within Magisk Manager and all other Magisk modules. Reboot and wait for Art cache to rebuild.
2: Remove any adblock hosts within your adblock app if installed, or any other root level system altering apps like Greenify (don't worry, you'll get them back).
3: Remove Magisk by booting into TWRP and flashing the current Magisk Removal zip. Reboot.
4: For systemless SuperSu you need to consult their thread as I do not use it. (I'll update this if someone knows the correct process).
5: ADB reboot bootloader and fastboot flash the stock recovery. Latest MM recovery links at the bottom of this post. (rename file to recovery.img).
6: Move the OTA Blur_Version.24.231.16.clark_retus.retus.en.US.zip to the root of your internal sd card (NOT in a folder). File links at the bottom of the post. Thanks @gokart2
7: ADB reboot recovery, when "no command" is listed, hold power + tap volume up then release to access recovery options. Choose "apply update from phone storage". Choose the file and wait for the flash. It's a large update so be patient (about 10-20min). Choose reboot manually in recovery after flash succeeds. Enjoy Nougat!
8: For root you can go ahead and flash TWRP again or live boot TWRP (fastboot boot twrp.img) and then flash Magisk 14.0 from TWRP. Works perfectly.
Part 2: Those That Have Done Everything - TWRP Write Access, Custom Roms, On Older Firmware, Etc (XT1572 Build Flashers Do This At Their Own Risk):
1: Flash the latest full factory image available (24.49-18-8) available here: https://forum.xda-developers.com/mo...de-return-to-stock-relock-bootloader-t3489110. Thank @acejavelin for the thread while your at it. Follow the directions in that guide, it's well detailed and accurate - however read my notes just below first:
NOTES:
-Omit the "fastboot oem lock begin" & "fastboot oem lock" commands to remain bootloader unlocked.
-Omit the "fastboot erase userdata" command if you want to dirty flash and keep all of your data. I recommend clean, you can always root & restore each apps data with Titanium after the Playstore installs everything.
-The "fastboot oem fb_mode_set" instead of "fastboot oem lock begin" & "fastboot oem fb_mode_clear" instead of "fastboot oem lock" I've found to be unnecessary if staying unlocked. Your choice.
-The "fastboot flash partition gpt.bin" & "fastboot flash bootloader bootloader.img" commands will likely fail due to version mismatches. This is ok.
-The "fastboot flash modem NON-HLOS.bin" tends to fail too. For this, just run the command again until it succeeds.
2: After flashing 24.49-18-8 take the OTA to 24.49-18-16. Reboot. OTA zip provided below if you prefer to sideload.
3: Either install the 7.0 OTA the normal way via the update center or just side load it using the directions above. I recommend side loading due to the file size being very close to 1GB.
4: For root you can go ahead and flash TWRP again or live boot TWRP (fastboot boot twrp.img) and then flash Magisk 14.0 from TWRP. Works perfectly!
For Xposed, See My Guide Here: https://forum.xda-developers.com/showpost.php?p=74014516&postcount=96
Stock MM 24.49-18-16 Recovery: https://mega.nz/#!aZpC2RzQ!Fy3GTo_XYPjB1lwuHffCUUERuvnsyvON3kS8kMJ9Cm8
Stock MM 24.49-18-16 Recovery Mirror: https://drive.google.com/file/d/0BxxRfNko9QDKNS1NdnAyZVp6dVU/view?usp=sharing
24.49-18-8 OTA to 24.49-18-16: https://mega.nz/#!yZx2FLzR!cWfKIAYe5VyuadLI55UNHJvwWU98CXUi1g0DO1pDoKg
NPH25.200-22 OTA: https://mega.nz/#!HVhWWLxK!h-8G3vO3Sye_YwypyIJyWb2_79Ow34vNiDnMl2Q8uJg
NPH25.200-22 OTA Mirror: https://drive.google.com/file/d/0B3gPYUZ4nRLwOHJKQnNYczNEMHc/view?usp=sharing
MD5 for NPH25.200-22 OTA: 74d1a4b135200661cc4efd248f99ce33
Stock 7.0 NPH25.200-22 Recovery: https://mega.nz/#!TNoHQAjI!5U2w4p_G7pHlW6Mak7LqFR_PeWUDpSLc7S3OiUs_Qf8
Alrighty. I got back to stock 6.0 with the 18-16 update. I couldn't get the OTA via the system update, so I tried doing it via ADB. That threw up a "status 7 error". I then copied the file to my internal storage and selected update via SD Card in recovery. It hung on "Patching System Files" for a while, but in the end it moved on and worked fine. Thanks for the awesome guide!
Thread updated with downloads for the 24.49-18-8 OTA to 24.49-18-16 zip.
I exctracted the 7.0 Stock recovery to replace if you decide to flash TWRP and want to go back to the stock recovery for future updates (HAHAHA yeah right!). Download link in OP. The 7.0 Recovery is different than the MM recovery. They are not interchangeable. Don't flash the 7.0 recovery on MM.
Question... can those of us who are rooted, custom roms, with TWRP, not just flash a stock unrooted TWRP backup from here: https://forum.xda-developers.com/moto-x-style/development/pure-firmware-tuff-wip-t3224833
Then, flash the stock recovery like it says... and take the update? Isn't that easier than this method?
Bwangster12 said:
Question... can those of us who are rooted, custom roms, with TWRP, not just flash a stock unrooted TWRP backup from here: https://forum.xda-developers.com/moto-x-style/development/pure-firmware-tuff-wip-t3224833
Then, flash the stock recovery like it says... and take the update? Isn't that easier than this method?
Click to expand...
Click to collapse
It probably won't work. Once TWRP is given write access to your system (which is required to flash a full rom or restore a backup) any OTA's will fail. Plus any modem/bluetooth mismatches will cause a failure too. Fastboot flashing a stock image is really very easy & pretty much a guarantee that everything will work properly. However, if your able to get it to work, please let us know...though I don't think it will.
annoyingduck said:
It probably won't work. Once TWRP is given write access to your system (which is required to flash a full rom or restore a backup) any OTA's will fail. Plus any modem/bluetooth mismatches will cause a failure too. Fastboot flashing a stock image is really very easy & pretty much a guarantee that everything will work properly. However, if your able to get it to work, please let us know...though I don't think it will.
Click to expand...
Click to collapse
Once I do this, I can just reinstall TWRP and Magisk, backup the stock 7.0 and if I ever decided, just flash a custom rom later on?
hey thanks for the help on this one. I was so worried because I got stuck on th May security update OTA-wise.
question: I messed with the LatAm version of Nougat, so when I tried to re-lock the bootloader, it game the preflash error.
After this proper update flash, is there a way to run the bootloader CMD to just re-lock the bootloader?
Here's the recovery before the 7.0 one, just incase.. Was bored. Ok, I won't lie....didn't see u posted the 7.0 recovery....lol.:good::highfive:
Bwangster12 said:
Once I do this, I can just reinstall TWRP and Magisk, backup the stock 7.0 and if I ever decided, just flash a custom rom later on?
Click to expand...
Click to collapse
Yup. TWRP flashes and works, magisk v14 works, and so far systemless xposed api24 is working.
EsteBandido4444 said:
hey thanks for the help on this one. I was so worried because I got stuck on th May security update OTA-wise.
question: I messed with the LatAm version of Nougat, so when I tried to re-lock the bootloader, it game the preflash error.
After this proper update flash, is there a way to run the bootloader CMD to just re-lock the bootloader?
Click to expand...
Click to collapse
What is everyone's fascination with relocking the bootloader? You do not need to relock your bootloader. You cannot relock the bootloader unless all your system partitions match. Use my part 2 section. Read the notes, skip the bootloader lock commands. Leave your bootloader unlocked, get up and running on nougat, then you can issue the lock commands if you really want a locked bootloader.
How exactly do you flash the 24.49-18-16 OTA? I'm stuck at this part
EDIT nevermind didn't read lol
Amp699435 said:
How exactly do you flash the 24.49-18-16 OTA? I'm stuck at this part
Click to expand...
Click to collapse
Copy the file to the root of your internal storage. Reboot into recovery. Hold power = volume up & release to access menu options. Choose apply update from storage. Select the OTA.zip package and let it install. (Directions are clearly written in OP.)
Does it matter which version you're on? I'm currently on MPSH24.49-18-4 with the May 2016 security update.
GrandAdmiral said:
Does it matter which version you're on? I'm currently on MPSH24.49-18-4 with the May 2016 security update.
Click to expand...
Click to collapse
Part 1 implies that you are on MPSH24.49-18-16 (dec), for part 2 - no it doesn't matter. Go ahead and start with the full firmware available MPSH24.49-18-8 and follow the steps from there.
annoyingduck said:
Part 1 implies that you are on MPSH24.49-18-16 (dec), for part 2 - no it doesn't matter. Go ahead and start with the full firmware available MPSH24.49-18-8 and follow the steps from there.
Click to expand...
Click to collapse
Ok. Was going to have to follow option two anyway because of how I rooted...
Now I also take it that flashing Magisk is recommended, but optional?
GrandAdmiral said:
Ok. Was going to have to follow option two anyway because of how I rooted...
Now I also take it that flashing Magisk is recommended, but optional?
Click to expand...
Click to collapse
Root is completely up to you. It's noted so users know that TWRP/Root are working. My logic with any XDA thread is that your bootloader is unlocked and you want root, but that's me...
annoyingduck said:
Root is completely up to you. It's noted so users know that TWRP/Root are working. My logic with any XDA thread is that your bootloader is unlocked and you want root, but that's me...
Click to expand...
Click to collapse
Gotcha. I know I'm going to root again, but I've never used Magisk before so I wasn't sure of that piece.
annoyingduck said:
Part 1 implies that you are on MPSH24.49-18-16 (dec), for part 2 - no it doesn't matter. Go ahead and start with the full firmware available MPSH24.49-18-8 and follow the steps from there.
Click to expand...
Click to collapse
I am running Dirty Unicorns right now and when i looked up what I'm on in fastboot, it showed MPSH24.49-18-16. Would I just follow part 2 and use MPSH24.49-18-8 or something? I thought I had to use at least the version I'm on or newer.
GrandAdmiral said:
Does it matter which version you're on? I'm currently on MPSH24.49-18-4 with the May 2016 security update.[/QUOTE
Your issue is that TWRP has modified your
System, any restoring of the stock rom will fail to update. So yes, you'll need to go through part 2 and downgrade and work your way back up.
Click to expand...
Click to collapse
I downloaded the zip (it took a while).
Restored to stock like 3 different ways but still hit a road block. I went the adb sideload route but got status error 7 because my build fingerprint wasn't correct. I tried searching for the right build I need, but I'm not an expert and couldn't find the right set of files that I was sure I knew how to restore. I ended up restoring my AICP backup.
If somebody could PM me and give me a hand (messaging through Hangouts or something) that would be AWESOME!
I'm planning trying to snag an XL 2 pre-order next week, but until then the less headache the better! Plus stock Nougat looks better on a Swappa listing
Trying to sideload via recovery 24.49-18-16 but I keep getting "("unexpected contents:EMMC:/dev/block/bootdevice/by-name/boot...". I've also tried installing from the phone but the same error appears in recovery. Any ideas?

[Q]How to change root from phh.superuser to Magisk and upgrade firmware?

Hi Guys, I've been an active user of XDA in the past but didn't have time to follow in the last couple of years so my memory about flashing and tinkering is quite blank.
Here is my situation:
Mate 9 MHA-L29C636B158 (very old ROM)
Bootloader unlocked with paid code from dc-unlocker
Rooted with PHH's Superuser (the only root that was available for our device back in March 2017)
EMUI 5.0 and Android 7.0 (that was obvious from my Build number but I just wanted to state it again)
TWRP 3.0.2-2 is installed with system kept read-only. Internal SD seems to be encrypted
I never took any OTAs as I was afraid that they would break something
In the last month's many of my banking or financial apps have stopped working because I'm rooted so I read that Magisk would be able to circumvent this safetynet thing and would allow me to continue using these apps. Google Pay would be a nice addition also.
At this point I would like to upgrade my firmware and get rid of PHH's Superuser switching to Magisk instead
Could someone please write a detailed guide how to do that? It might be interesting for other users also that are in my same situation. I'm willing to donate a few bucks for a complete and foolproof guide.
Thanks a lot
itenos said:
Hi Guys, I've been an active user of XDA in the past but didn't have time to follow in the last couple of years so my memory about flashing and tinkering is quite blank.
Here is my situation:
Mate 9 MHA-L29C636B158 (very old ROM)
Bootloader unlocked with paid code from dc-unlocker
Rooted with PHH's Superuser (the only root that was available for our device back in March 2017)
EMUI 5.0 and Android 7.0 (that was obvious from my Build number but I just wanted to state it again)
TWRP 3.0.2-2 is installed with system kept read-only. Internal SD seems to be encrypted
I never took any OTAs as I was afraid that they would break something
In the last month's many of my banking or financial apps have stopped working because I'm rooted so I read that Magisk would be able to circumvent this safetynet thing and would allow me to continue using these apps. Google Pay would be a nice addition also.
At this point I would like to upgrade my firmware and get rid of PHH's Superuser switching to Magisk instead
Could someone please write a detailed guide how to do that? It might be interesting for other users also that are in my same situation. I'm willing to donate a few bucks for a complete and foolproof guide.
Thanks a lot
Click to expand...
Click to collapse
Do you still have the unlock code? You'll want it, as the update from EMUI 5 to EMUI 8, on every device I've got, has relocked the bootloader.
With that said:
If you want to keep your data, make a backup using Hisuite.
Download the FullOTA firmware for your current version. Extract system, boot, recovery, recovery2 (as you're on EMUI 5) and flash them either in TWRP or fastboot; that should eliminate PHH SU and TWRP, and ultimately leave the system in a clean state.
If you modified other partitions on the device using TWRP or su in general, it wouldn't be a bad idea to use a nocheck recovery or HuRupdater to flash the entire system, to leave everything in a pristine state, since there are partitions you can't flash with fastboot, even with an unlocked bootloader. The instructions for HuR can be found elsewhere on XDA, as can details about nocheck recoveries, though the latter I'd be careful with - using HWOTA7 on Oreo, for example, WILL cause a brick. You've been warned.
Start the update process - you've already been approved for OTAs and they've been offered, so they should happen automatically. When Oreo is installed, it'll automatically relock your bootloader; you can continue updating here, though if you've got a particular target you want to go to, you might want to unlock and use HuR again to flash that specific one now that you're on Oreo. (The latest firmwares can't be rolled back to Nougat.) If you have no intention of going back to Nougat, you have your unlock code, and you aren't planning to do any other modifications like rebranding, then update away, though you may want to hold off of the Pie update if offered. (Shouldn't be, yet, but it could have been approved for your device already; it changes the boot partitions yet again.)
Now that you're on Oreo and presumably unlocked again, make sure you've got the FullOTA image downloaded for that firmware to your PC. (Always a good idea, anyway.)
Magisk can be installed by:
1) Flashing TWRP with fastboot, then flashing a suitable Magisk zip
2) Using Magisk Manager to patch a boot image and flashing that.
For TWRP:
Get a copy of TWRP from the forum here. When I use one, it's the 3.2.1-0 from @Pretoriano80, you'll find it in the development section. Any 3.2.x for Oreo should work though - a Nougat TWRP will not work.
Flash TWRP to recovery_ramdisk in fastboot. Boot to TWRP, flash Magisk.
For Magisk Manager:
Extract "ramdisk" from your FullOTA firmware. Place it in internal storage on your device. Use Magisk Manager to patch the image (install / patch boot image). Transfer the patched_boot.img created by Magisk back to your PC and flash that to the "ramdisk" partition in fastboot.
Just stumbled over your reply, didn't get an email notification from XDA. Thank you so much. Let's see if I can follow your instructions.
irony_delerium said:
Do you still have the unlock code? You'll want it, as the update from EMUI 5 to EMUI 8, on every device I've got, has relocked the bootloader.
Click to expand...
Click to collapse
Yes, I still have the code
irony_delerium said:
With that said:
If you want to keep your data, make a backup using Hisuite.
Click to expand...
Click to collapse
Done
irony_delerium said:
Download the FullOTA firmware for your current version. Extract system, boot, recovery, recovery2 (as you're on EMUI 5) and flash them either in TWRP or fastboot; that should eliminate PHH SU and TWRP, and ultimately leave the system in a clean state.
Click to expand...
Click to collapse
I downloaded the FullOTA with the FirmwareFinder app on my phone and transferred it to my laptop. Extracted the update.app with WinRAR and extracted system, boot, recovery and recovery2 using the Huawei Update Extractor 0.9.9.3.
Just to make no mistake, could you please confirm the order of flashing these 4 files? And maybe the correct command to use in fastboot?
irony_delerium said:
If you modified other partitions on the device using TWRP or su in general, it wouldn't be a bad idea to use a nocheck recovery or HuRupdater to flash the entire system, to leave everything in a pristine state, since there are partitions you can't flash with fastboot, even with an unlocked bootloader. The instructions for HuR can be found elsewhere on XDA, as can details about nocheck recoveries, though the latter I'd be careful with - using HWOTA7 on Oreo, for example, WILL cause a brick. You've been warned.
Click to expand...
Click to collapse
I don't think that I modified any other partitions, at least not willingly. I even left the system in read-only state. Don't know if phh.su did something by itself?
irony_delerium said:
Start the update process - you've already been approved for OTAs and they've been offered, so they should happen automatically. When Oreo is installed, it'll automatically relock your bootloader; you can continue updating here, though if you've got a particular target you want to go to, you might want to unlock and use HuR again to flash that specific one now that you're on Oreo. (The latest firmwares can't be rolled back to Nougat.) If you have no intention of going back to Nougat, you have your unlock code, and you aren't planning to do any other modifications like rebranding, then update away, though you may want to hold off of the Pie update if offered. (Shouldn't be, yet, but it could have been approved for your device already; it changes the boot partitions yet again.)
Now that you're on Oreo and presumably unlocked again, make sure you've got the FullOTA image downloaded for that firmware to your PC. (Always a good idea, anyway.)
Magisk can be installed by:
1) Flashing TWRP with fastboot, then flashing a suitable Magisk zip
2) Using Magisk Manager to patch a boot image and flashing that.
For TWRP:
Get a copy of TWRP from the forum here. When I use one, it's the 3.2.1-0 from @Pretoriano80, you'll find it in the development section. Any 3.2.x for Oreo should work though - a Nougat TWRP will not work.
Flash TWRP to recovery_ramdisk in fastboot. Boot to TWRP, flash Magisk.
For Magisk Manager:
Extract "ramdisk" from your FullOTA firmware. Place it in internal storage on your device. Use Magisk Manager to patch the image (install / patch boot image). Transfer the patched_boot.img created by Magisk back to your PC and flash that to the "ramdisk" partition in fastboot.
Click to expand...
Click to collapse
Will continue to do the above after your kind confirmation of my last questions. Thanks again
itenos said:
I downloaded the FullOTA with the FirmwareFinder app on my phone and transferred it to my laptop. Extracted the update.app with WinRAR and extracted system, boot, recovery and recovery2 using the Huawei Update Extractor 0.9.9.3.
Just to make no mistake, could you please confirm the order of flashing these 4 files? And maybe the correct command to use in fastboot?
Click to expand...
Click to collapse
The order shouldn't be particularly relevant, just that it's safest to reflash all of them:
- boot because phhsu may have modified the boot image to add su to it
- recovery and recovery2 because you loaded TWRP. recovery2 is specified because it's used to be recommended to flash to erecovery as well as normal recovery.
- system because I'm pretty sure that's the biggest thing modified Hy phhsu, and any other system changes you may have made.
Theoretically, other modified partitions won't matter since the upgrade to 8.0 replaces most (all, I think) of them anyway, but if you have to go through update steps through EMUI 5 first before it'll give you 8, then it's safest that they aren't modified. I mentioned other partitions because, with root & TWRP, you technically could have modified any and all of them.
irony_delerium said:
Download the FullOTA firmware for your current version. Extract system, boot, recovery, recovery2 (as you're on EMUI 5) and flash them either in TWRP or fastboot; that should eliminate PHH SU and TWRP, and ultimately leave the system in a clean state.
Start the update process - you've already been approved for OTAs and they've been offered, so they should happen automatically.
Click to expand...
Click to collapse
Flashing of 158 (original ROM version) went fine. Phone rebooted and titanium reported no root access, so it looks good.
After that I started the OTA update to 172 that waited already long time in my settings and it downloaded it. After downloading it gave me an error during the validation process of the file and asked to download it again.
Unfortunately now both the phone updater and the HiSuite app on my laptop say that 158 is the latest available firmware and no update is available.
I guess that I can download directly the newer firmware but I'm not exactly sure how to flash the whole package and what I should do with the other 2 files that come with it besides the update.zip
itenos said:
Flashing of 158 (original ROM version) went fine. Phone rebooted and titanium reported no root access, so it looks good.
After that I started the OTA update to 172 that waited already long time in my settings and it downloaded it. After downloading it gave me an error during the validation process of the file and asked to download it again.
Unfortunately now both the phone updater and the HiSuite app on my laptop say that 158 is the latest available firmware and no update is available.
I guess that I can download directly the newer firmware but I'm not exactly sure how to flash the whole package and what I should do with the other 2 files that come with it besides the update.zip
Click to expand...
Click to collapse
It might be tweaking out about the fact that you'd previously modified system.
I'd grab the last Nougat release (looks like 191; there are 2 of them, be sure it's not the rollback one you grab) and use hurupdater in TWRP to install it, then let the system try running OTA again.
irony_delerium said:
It might be tweaking out about the fact that you'd previously modified system.
I'd grab the last Nougat release (looks like 191; there are 2 of them, be sure it's not the rollback one you grab) and use hurupdater in TWRP to install it, then let the system try running OTA again.
Click to expand...
Click to collapse
I had to insert the SIM card of the country I bought my phone in to get the OTAs coming. Luckily I still had it with a few $ credit on it. It used just a few cents in data roaming for finding the new firmware, then I downloaded through wifi.
After 4 updates now I'm on 378 and no sign of Pie yet so this afternoon if I find some time I'll continue with rooting.
itenos said:
I had to insert the SIM card of the country I bought my phone in to get the OTAs coming. Luckily I still had it with a few $ credit on it. It used just a few cents in data roaming for finding the new firmware, then I downloaded through wifi.
After 4 updates now I'm on 378 and no sign of Pie yet so this afternoon if I find some time I'll continue with rooting.
Click to expand...
Click to collapse
Easy way:
Unlock phone, if you haven't yet again.
Download and flash TWRP from here: https://forum.xda-developers.com/mate-9/development/recovery-twrp-3-2-1-0-t3783353 (has decryption support) (flash to recovery_ramdisk as Huawei decided to split recovery partition into different parts)
Boot to TWRP, input pin (if you set a pin, else it will decrypt automatically)
Download Magisk: https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
Transfer Magisk to phone.
Flash Magisk zip in TWRP.
Reboot and you're done.
You might have to tinker around with Magisk Hide and hide apps if your banking apps still detect root.
As the Huawei Backup took over 4 hours to finish and i can't use Titanium, which is much faster, because I'm not rooted at the moment, I thought it's a good idea to first upgrade to Pie before unlocking my bootloader and losing all data. If I need to stay a few days without root it's ok.
Is there any way to get to Pie without being rooted? I tried the erecovery method on firmware finder. It says that my IMEI is now registered to download the update but when I enter erecovery it starts downloading the 378 oreo package.
I would like to avoid backing up and restoring twice this lengthy process, probably 16 hours all in all
itenos said:
As the Huawei Backup took over 4 hours to finish and i can't use Titanium, which is much faster, because I'm not rooted at the moment, I thought it's a good idea to first upgrade to Pie before unlocking my bootloader and losing all data. If I need to stay a few days without root it's ok.
Is there any way to get to Pie without being rooted? I tried the erecovery method on firmware finder. It says that my IMEI is now registered to download the update but when I enter erecovery it starts downloading the 378 oreo package.
I would like to avoid backing up and restoring twice this lengthy process, probably 16 hours all in all
Click to expand...
Click to collapse
The erecovery method won't work unless you can change the DNS settings on the network being used - it hijacks some of the requests to Huawei's servers to force the update. (And even then it's a bit finicky; I have yet to successfully use it, all things considered.)
Yesterday I finally received 9.0.1.159 with EMUI 9.0.1 by OTA. It installed fine and it's amazing how fast my phone became and how much screen on time I have now with my 2 year old device (8 full hours!). Good job Google and Huawei.
Being on Pie now I suppose that the instructions to root from you and ante0 are not valid anymore as they were meant for Oreo.
Could you please modify the instructions for Pie? And further, as I see that since yesterday in FirmwareFinder a new Pie update 9.0.1.178 popped up, could you please also add instructions how to take this OTA being rooted with Magisk once it arrives?
I've read a bit in the Magisk thread but I did not really understand the part of having to boot to recovery everytime I switch on the phone. Further they are talking there about EMUI 9 but I have already 9.0.1, is there maybe a difference I have to take care about?
Last but not least, I didn't forget my initial promise to donate a few bucks for the detailed instructions so please drop me your email in PM and I'll sent you a few through PayPal or in alternative, if you have some paid apps on the Playstore I could buy them so they might get more visibility.
itenos said:
Yesterday I finally received 9.0.1.159 with EMUI 9.0.1 by OTA. It installed fine and it's amazing how fast my phone became and how much screen on time I have now with my 2 year old device (8 full hours!). Good job Google and Huawei.
Being on Pie now I suppose that the instructions to root from you and ante0 are not valid anymore as they were meant for Oreo.
Could you please modify the instructions for Pie? And further, as I see that since yesterday in FirmwareFinder a new Pie update 9.0.1.178 popped up, could you please also add instructions how to take this OTA being rooted with Magisk once it arrives?
I've read a bit in the Magisk thread but I did not really understand the part of having to boot to recovery everytime I switch on the phone. Further they are talking there about EMUI 9 but I have already 9.0.1, is there maybe a difference I have to take care about?
Last but not least, I didn't forget my initial promise to donate a few bucks for the detailed instructions so please drop me your email in PM and I'll sent you a few through PayPal or in alternative, if you have some paid apps on the Playstore I could buy them so they might get more visibility.
Click to expand...
Click to collapse
The reason recovery boot is needed for Pie is because Huawei removed the ramdisk - in Pie, it's system as root with no way of forcing a ramdisk except by a recovery boot. So as a workaround, Magisk takes over recovery.
The installation instructions for it on Pie are pretty much the same as Oreo, except:
* Patch recovery_ramdisk, not ramdisk. Latest stable Magisk should work (18.1, iirc, has the patches to support recovery boot.)
* When booting, go to recovery. Magisk will start from there and take over the startup process.
irony_delerium said:
The installation instructions for it on Pie are pretty much the same as Oreo, except:
Click to expand...
Click to collapse
Hmm, where do I find the TWRP for Pie in order to flash?
And most importantly how do I have to behave in case of new OTAs coming?
itenos said:
Hmm, where do I find the TWRP for Pie in order to flash?
And most importantly how do I have to behave in case of new OTAs coming?
Click to expand...
Click to collapse
TWRP on this case, don't bother.
Extract your stock recovery from your firmware's update.app file, patch with Magisk Manager, and flash the patched image. When you want to flash an ota, put the stock recovery back.

Categories

Resources