Reverting back to stock A/B Partition. - Xiaomi Mi A2 / 6X Questions & Answers

Hi Guys..
So I've followed a guide, wherein it will walk you through on how to flash TWRP on your phone on your non-active partition.
I would want to revert my non-active partition to stock, any thoughts?
Any help is much appreciated!

Extract the stock boot.img from stock and boot into fastboot
fastboot flash boot_(a or b) boot.img

kishd said:
Extract the stock boot.img from stock and boot into fastboot
fastboot flash boot_(a or b) boot.img
Click to expand...
Click to collapse
Is this rooting? I would want to revert everything back to stock, man

Related

need to downgrade from CM6 to Stock 2.2

I have sold my phone and I am currently using CM6 RC3
The buyer want me to install the stock 2.2
can someone please provide me with the Download to stock 2.2, and the instructions, Just flash over cm6?
Thanks
You could download the FRF91 system image (link in my signature) and flash it using fastboot...
1. reboot into bootloader
2. extract the downloaded zip
3. fastboot flash userdata userdata.img
4. fastboot flash system system.img
5. fastboot flash boot boot.img
6. fastboot flash recovery recovery.img
Your radio and hboot can remain unchanged (they are stock anyways)
thanks alot of your help:
I am not fimilar with using fastboot
is there a way to use recovery and flash from zip file, that is how I have been trying out different roms
I think ROM Manager has the stock rom available. That would be the easiest way.

Stuck rebooting to TWRP after OTA Download?

I thought I prevented my phone from downloading the OTA to 4.4.3 on my Dev Edition Unlocked bootloader running 4.4.2 and TWRP. I obviously did not and now my phone keeps rebooting into TWRP.
Is there a way to stop this and clear it out somehow?
reno55 said:
I thought I prevented my phone from downloading the OTA to 4.4.3 on my Dev Edition Unlocked bootloader running 4.4.2 and TWRP. I obviously did not and now my phone keeps rebooting into TWRP.
Is there a way to stop this and clear it out somehow?
Click to expand...
Click to collapse
Try using Titanium Backup to freeze MotorolaOTA
samwathegreat said:
Try using Titanium Backup to freeze MotorolaOTA
Click to expand...
Click to collapse
Actually I think I can fix by flashing stock recovery but where can I find the stock recovery image?
reno55 said:
Actually I think I can fix by flashing stock recovery but where can I find the stock recovery image?
Click to expand...
Click to collapse
YES, you can fix by flashing stock recovery assuming you haven't heavily modified your system. Flashing the stock recovery will make the phone try to flash the OTA.
You'll need to download the SBF for your phone here: http://sbf.droid-developers.org/phone.php?device=0
Unzip the file. I'm assuming you already have the fastboot and mfastboot binaries as well as the android SDK.
Place the file "recovery.img" in the same folder as mfastboot & fastboot. Make sure USB Debugging is enabled (or manually boot into bootloader).
Type mfastboot flash recovery recovery.img
Done.
Good Luck
samwathegreat said:
YES, you can fix by flashing stock recovery assuming you haven't heavily modified your system. Flashing the stock recovery will make the phone try to flash the OTA.
You'll need to download the SBF for your phone here: http://sbf.droid-developers.org/phone.php?device=0
Unzip the file. I'm assuming you already have the fastboot and mfastboot binaries as well as the android SDK.
Place the file "recovery.img" in the same folder as mfastboot & fastboot. Make sure USB Debugging is enabled (or manually boot into bootloader).
Type mfastboot flash recovery recovery.img
Done.
Good Luck
Click to expand...
Click to collapse
I think I just did this correctly.......it is on Android is upgrading now.....
I can just flash a custom recovery now right?
reno55 said:
I think I just did this correctly.......it is on Android is upgrading now.....
I can just flash a custom recovery now right?
Click to expand...
Click to collapse
If the upgrade is successful, absolutely.
mfastboot flash recovery twrp-2.6.3.1-ghost-4.4.img
download twrp from here: http://forum.xda-developers.com/moto-x/development/recovery-unlocked-twrp-2-6-3-1-android-t2534850
samwathegreat said:
If the upgrade is successful, absolutely.
mfastboot flash recovery twrp-2.6.3.1-ghost-4.4.img
download twrp from here: http://forum.xda-developers.com/moto-x/development/recovery-unlocked-twrp-2-6-3-1-android-t2534850
Click to expand...
Click to collapse
Can I flash philz?
reno55 said:
Can I flash philz?
Click to expand...
Click to collapse
Don't see why not. Just substitute the filename for philz recovery instead.
Get Philz here: http://forum.xda-developers.com/moto-x/development/xt10xx-philz-touch-t2612149
I have not used Philz personally...I prefer TWRP, but it looks like (unlike TWRP), that there is a different img for each variant of the Moto X. You will need to be careful to download the correct one.
I got the XT1053 T-Mobile version, rooted, unlocked with titanium backup, TWRP and Xposed. I just got the software update notice and I am currently trying to decide if I want to update or not. Correct me if I am wrong, but from what I have read, if I want to get the OTA, is the best way to flash the SBF and update to 4.4.3 and then configure the phone again? Is there no way to complete the OTA without flashing a stock recovery? Is it worth it? I love this phone, but there are no custom ROM's that are stock based for XT1053 which would be ideal since I don't want to lose all the extra goodies of the stock ROM.
frankie_p said:
I got the XT1053 T-Mobile version, rooted, unlocked with titanium backup and Xposed. I just got the software update notice and I am currently trying to decide if I want to update or not. Correct me if I am wrong, but from what I have read, if I want to get the OTA, is the best way to flash the SBF and update to 4.4.3 and then configure the phone again? Is it worth it? I love this phone, but there are no custom ROM's that are stock based for XT1053 which would be ideal since I don't want to lose all the extra goodies of the stock ROM.
Click to expand...
Click to collapse
Ugh! I am having all kinds of issues with 4.4.3. There is not a way to go back to 4.4.2 is there?
frankie_p said:
I got the XT1053 T-Mobile version, rooted, unlocked with titanium backup and Xposed. I just got the software update notice and I am currently trying to decide if I want to update or not. Correct me if I am wrong, but from what I have read, if I want to get the OTA, is the best way to flash the SBF and update to 4.4.3 and then configure the phone again? Is it worth it? I love this phone, but there are no custom ROM's that are stock based for XT1053 which would be ideal since I don't want to lose all the extra goodies of the stock ROM.
Click to expand...
Click to collapse
YES, that is the best way to do it. You can -try- disabling xposed, and un-doing any major modifications you have done (like freezing or removing any system apps). You want it to be as close to stock as possible before you try to accept the OTA, which includes flashing back the stock recovery.
SBFing back to stock 4.4.2 FIRST, and accepting the update, THEN flashing TWRP and rooting, then re-configuring everything and installing your apps is MUCH safer and pretty much guarantees that your filesystem will be 100% intact.
If it were ME, I would SBF first -- for whatever that's worth...
Good Luck
---------- Post added at 11:04 PM ---------- Previous post was at 11:01 PM ----------
reno55 said:
Ugh! I am having all kinds of issues with 4.4.3. There is not a way to go back to 4.4.2 is there?
Click to expand...
Click to collapse
Sure. It's just slightly more complicated. You'll need the entire 4.4.2 SBF for your carrier.
Do this: Reboot to bootloader
FIRST, JUST flash gpt.bin and motoboot.img:
fastboot flash partition gpt.bin
mfastboot flash motoboot motoboot.img
Now you need to REBOOT back into bootloader (to prevent gpt.bin mis-match -- if you don't reboot here, you will get errors). Do this by typing:
mfastboot reboot-bootloader
Now flash the rest of the files:
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
mfastboot flash system system.img
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
Reboot, and you should be back to stock 4.4.2
And finally the disclaimer: DO NOT TRY TO DOWNGRADE TO ANY VERSION PRIOR TO 4.4.2 .....if you don't want a brick.
It's ok to downgrade 4.4.3 to 4.4.2 because the bootloader version did not change. It is NOT safe to downgrade to anything prior (4.4 or 4.2.2).

Flashing 5.0.1

I downloaded the flashable zip from https://www.androidfilehost.com/?fid=95851846488293411
I use WugToolKit with TWRP, Unlocked and Decrypted. Stock ROM
I'm confused as to how I should flash this, I've read I should just click flash zip in the toolkit and let it finish and done. Also that I could download the file to my phone and use TWRP to flash straight to the phone. Some say backup and some say don't. Also some threads say I need to flash back to factory image, tho this flashable zip should be a factory image of 5.0.1.
Any help will be appreciated. Thank you.
Sent from my Nexus 6
SoCoCapricorn said:
I downloaded the flashable zip from https://www.androidfilehost.com/?fid=95851846488293411
I use WugToolKit with TWRP, Unlocked and Decrypted. Stock ROM
I'm confused as to how I should flash this, I've read I should just click flash zip in the toolkit and let it finish and done. Also that I could download the file to my phone and use TWRP to flash straight to the phone. Some say backup and some say don't. Also some threads say I need to flash back to factory image, tho this flashable zip should be a factory image of 5.0.1.
Any help will be appreciated. Thank you.
Sent from my Nexus 6
Click to expand...
Click to collapse
Apparently the new update OTA or zip will update blocks instead of files so from my understanding, even the slightest change from stock will cause this ZIP to fail when flashing. I'm rooted, decrypted, and changed mixer_paths.xml and as expected the flash failed in TWRP and adb sideload so I'm backing up via Titanium and flashing the 5.0.1 stock. I'll decrypt/root/restore after the flash.
Here are the steps I took to flash the factory image and not lose my settings:
Flash bootloader and radio:
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.05.img
fastboot flash radio radio-shamu-d4.0-9625-02.55.04.img
After flashing the bootloader/radio, you need to reboot the bootloader as shown below, don't skip this step!
fastboot reboot-bootloader
I then unzipped this file: image-shamu-lrx22c.zip
Now you can move on to the rest of the files
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
Finally, just reboot your device, and Android should start up.
fastboot reboot
After the phone restarted I then used CF-Auto-Root to re-root my phone. I did not lose any of my settings or installed apps. HTH...
So if I am stock but rooted I cannot sideload the OTA?
I keep getting status 7 error when trying to sideload with ADB using the update OTA.
It actual unzips and installs about 50% and then I get the Status 7 Error
mzimand said:
So if I am stock but rooted I cannot sideload the OTA?
I keep getting status 7 error when trying to sideload with ADB using the update OTA.
It actual unzips and installs about 50% and then I get the Status 7 Error
Click to expand...
Click to collapse
Rooting causes a change to the system partition, so no, you can't sideload the OTA anymore. (not since Lollipop)
stevetrooper said:
Here are the steps I took to flash the factory image and not lose my settings:
Flash bootloader and radio:
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.05.img
fastboot flash radio radio-shamu-d4.0-9625-02.55.04.img
After flashing the bootloader/radio, you need to reboot the bootloader as shown below, don't skip this step!
fastboot reboot-bootloader
I then unzipped this file: image-shamu-lrx22c.zip
Now you can move on to the rest of the files
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
Finally, just reboot your device, and Android should start up.
fastboot reboot
After the phone restarted I then used CF-Auto-Root to re-root my phone. I did not lose any of my settings or installed apps. HTH...
Click to expand...
Click to collapse
Worked like a CHAMP!!
:highfive:
stevetrooper said:
Here are the steps I took to flash the factory image and not lose my settings:
Flash bootloader and radio:
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.05.img
fastboot flash radio radio-shamu-d4.0-9625-02.55.04.img
After flashing the bootloader/radio, you need to reboot the bootloader as shown below, don't skip this step!
fastboot reboot-bootloader
I then unzipped this file: image-shamu-lrx22c.zip
Now you can move on to the rest of the files
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
Finally, just reboot your device, and Android should start up.
fastboot reboot
After the phone restarted I then used CF-Auto-Root to re-root my phone. I did not lose any of my settings or installed apps. HTH...
Click to expand...
Click to collapse
Are you using nexus toolkit by wug?
Sent from my Nexus 6
SoCoCapricorn said:
Are you using nexus toolkit by wug?
Sent from my Nexus 6
Click to expand...
Click to collapse
No, just used the steps I listed.
SoCoCapricorn said:
Are you using nexus toolkit by wug?
Sent from my Nexus 6
Click to expand...
Click to collapse
No, he used fastboot. Be wary of toolkits. They can do damage that a novice wont be able to fix.
stevetrooper said:
Here are the steps I took to flash the factory image and not lose my settings:
Flash bootloader and radio:
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.05.img
fastboot flash radio radio-shamu-d4.0-9625-02.55.04.img
After flashing the bootloader/radio, you need to reboot the bootloader as shown below, don't skip this step!
fastboot reboot-bootloader
I then unzipped this file: image-shamu-lrx22c.zip
Now you can move on to the rest of the files
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
Finally, just reboot your device, and Android should start up.
fastboot reboot
After the phone restarted I then used CF-Auto-Root to re-root my phone. I did not lose any of my settings or installed apps. HTH...
Click to expand...
Click to collapse
Jeezus! perfect!
Thats similar to what I did.
Only thing to do if you are already decrypted is to download this boot file, rename it to boot.img and flash it instead of the one included in the google zip package.
http://forum.xda-developers.com/showpost.php?p=57406510&postcount=360
I had to manually flash each file separately. For some reason when the flash.bat file was running it kept reporting that the system.img file was too big. Not had that before.
dunjamon said:
I had to manually flash each file separately. For some reason when the flash.bat file was running it kept reporting that the system.img file was too big. Not had that before.
Click to expand...
Click to collapse
yeah - since 5.0, the flash-all.bat isn't working for a lot of users.
stevetrooper said:
Here are the steps I took to flash the factory image and not lose my settings:
Flash bootloader and radio:
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.05.img
fastboot flash radio radio-shamu-d4.0-9625-02.55.04.img
After flashing the bootloader/radio, you need to reboot the bootloader as shown below, don't skip this step!
fastboot reboot-bootloader
I then unzipped this file: image-shamu-lrx22c.zip
Now you can move on to the rest of the files
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
Finally, just reboot your device, and Android should start up.
fastboot reboot
After the phone restarted I then used CF-Auto-Root to re-root my phone. I did not lose any of my settings or installed apps. HTH...
Click to expand...
Click to collapse
What about the cache.img? do we not flash the cache?
mzimand said:
What about the cache.img? do we not flash the cache?
Click to expand...
Click to collapse
From what I understand, if you flash cache.img, you will go back to stock and lose all of your settings.
Awesome man, worked perfect, you sir rock!
Great!!!!
stevetrooper said:
Here are the steps I took to flash the factory image and not lose my settings:
Flash bootloader and radio:
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.05.img
fastboot flash radio radio-shamu-d4.0-9625-02.55.04.img
After flashing the bootloader/radio, you need to reboot the bootloader as shown below, don't skip this step!
fastboot reboot-bootloader
I then unzipped this file: image-shamu-lrx22c.zip
Now you can move on to the rest of the files
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
Finally, just reboot your device, and Android should start up.
fastboot reboot
After the phone restarted I then used CF-Auto-Root to re-root my phone. I did not lose any of my settings or installed apps. HTH...
Click to expand...
Click to collapse
It works like a champ! THX man :good:
stevetrooper said:
Here are the steps I took to flash the factory image and not lose my settings:
Flash bootloader and radio:
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.05.img
fastboot flash radio radio-shamu-d4.0-9625-02.55.04.img
After flashing the bootloader/radio, you need to reboot the bootloader as shown below, don't skip this step!
fastboot reboot-bootloader
I then unzipped this file: image-shamu-lrx22c.zip
Now you can move on to the rest of the files
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
Finally, just reboot your device, and Android should start up.
fastboot reboot
After the phone restarted I then used CF-Auto-Root to re-root my phone. I did not lose any of my settings or installed apps. HTH...
Click to expand...
Click to collapse
Excellent, works perfectly as described. Thanks
The only thing that I'd add, to avoid any confusion, is that the factory image can be downloaded from:
https://developers.google.com/android/nexus/images
Thanks again, stevetrooper :good:
stevetrooper said:
Here are the steps I took to flash the factory image and not lose my settings:
Flash bootloader and radio:
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.05.img
fastboot flash radio radio-shamu-d4.0-9625-02.55.04.img
After flashing the bootloader/radio, you need to reboot the bootloader as shown below, don't skip this step!
fastboot reboot-bootloader
I then unzipped this file: image-shamu-lrx22c.zip
Now you can move on to the rest of the files
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
Finally, just reboot your device, and Android should start up.
fastboot reboot
After the phone restarted I then used CF-Auto-Root to re-root my phone. I did not lose any of my settings or installed apps. HTH...
Click to expand...
Click to collapse
Curious as to why so many steps?
All i did was flash the radio and system images. Went to 5.0.1 just fine, all settings/data retained.
Didn't flash bootloader, kept unlocked during process, only had to re-root.
Having an issue while flashing system.img file. I flashed radio, and flashed system.img then flashed cf-auto-root. On first start up I was having issues with my radio. LTE was not connecting to T Mobile. So I Nandroid back to stock. Then of course I noticed this didnt change my radio back to stock. Starting everything over, I reflashed radio, reboot bootloader, Flash system.img, reboot bootloader, then fash autoroot. Restart device. Radio was flashed and I had root, but stuck on 5.0 Tried to reflash system.img and I am getting error. "access denied" when flashing. I have read this is an issue with mounting the drive, I have even tried to do this in fast boot but I am coming up with nothing. Any help on this will be greatly appreciated.
theblizzard2010 said:
Curious as to why so many steps?
All i did was flash the radio and system images. Went to 5.0.1 just fine, all settings/data retained.
Didn't flash bootloader, kept unlocked during process, only had to re-root.
Click to expand...
Click to collapse

Flash LMY47E and Preserve Data

I just recently started fresh by unlocking and flashing LMY47D image. I'd like to upgrade to LMY47E and preserve data. I know I can backup/restore via TIBU, but I'd rather avoid that if possible. Am I overlooking anything by performing only the following commands? Also worth noting is that I'd like to retain TWRP and franco.Kernel.
Code:
fastboot flash bootloader bootloader.img
fastboot flash radio radio.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot flash cache cache.img
At this point I'd use the hardware buttons to reboot into TWRP, flash su.zip, and then boot system.
I'm definitely going to perform a nandroid prior to doing this. However, just curious if this is the best way to do this or is there a better method. Or if there are any risks involved that I'm overlooking.
EDIT: Success... everything went just as planned. Thanks for everyone's help.
Its exactly correct. alternative is flashing a rooted stock ROM. Zip from recovery
From what I've read you may need to flash twrp again even though you didn't flash the stock recovery. Just a heads up
y2whisper said:
From what I've read you may need to flash twrp again even though you didn't flash the stock recovery. Just a heads up
Click to expand...
Click to collapse
Only if you boot android before rooting. Install-recovery.sh is suppled with the ROM that upon boot will install stock recovery. However flashing SuperSU hijacks this script for its own purposes, removing its ability to flash recovery. So trick is flash the ROM, boot straight to recovery and flash SuperSU
Ah. Good to know
rootSU said:
Its exactly correct. alternative is flashing a rooted stock ROM. Zip from recovery
Click to expand...
Click to collapse
Yeah, thought about going the rooted stock ROM route. Just feel more comfortable with the factory image. Any truth to @y2whisper comments? Doesn't make sense to me how TWRP would get overwritten by stock recovery if it's not flashed.
EDIT: See your post above (I took too long typing). Thanks for clarifying.
ManHands said:
Yeah, thought about going the rooted stock ROM route. Just feel more comfortable with the factory image. Any truth to @y2whisper comments? Doesn't make sense to me how TWRP would get overwritten by stock recovery if it's not flashed.
Click to expand...
Click to collapse
Have a look above.
I use this without losing data, but perhaps this is overkill? I assume you can skip the recovery to avoid losing TWRP, but I don't know about the kernel.
{replace with actual file name}
Enable USB Debugging and OEM Unlock
Reboot into bootloader (vol-down + power) or adb reboot bootloader
fastboot flash bootloader {bootloader-shamu-xxx.img}
fastboot reboot-bootloader
fastboot flash radio {radio-shamu-xxx.img}
fastboot reboot-bootloader
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot erase cache
fastboot flash cache cache.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot reboot
Sorry my fault...I didn't notice it didn't say boot.img in OP. Yes kernel should be flashed
moporoco said:
I use this without losing data, but perhaps this is overkill? I assume you can skip the recovery to avoid losing TWRP, but I don't know about the kernel.
{replace with actual file name}
Enable USB Debugging and OEM Unlock
Reboot into bootloader (vol-down + power) or adb reboot bootloader
fastboot flash bootloader {bootloader-shamu-xxx.img}
fastboot reboot-bootloader
fastboot flash radio {radio-shamu-xxx.img}
fastboot reboot-bootloader
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot erase cache
fastboot flash cache cache.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot reboot
Click to expand...
Click to collapse
rootSU said:
Sorry my fault...I didn't notice it didn't say boot.img in OP. Yes kernel should be flashed
Click to expand...
Click to collapse
Interesting... do I need to flash boot.img from LMY47E factory image if I'm using latest franco.Kernel? Seems silly to flash factory boot.img if I'm going to use franco boot.img instead. Thanks for the help fellas.
ManHands said:
Interesting... do I need to flash boot.img from LMY47E factory image if I'm using latest franco.Kernel? Seems silly to flash factory boot.img if I'm going to use franco boot.img instead. Thanks for the help fellas.
Click to expand...
Click to collapse
You're best off using a kernel that fully supports 5.1. I have no idea about Franco.
Look at the op on Franco's thread and you'll have your answer
holeindalip said:
Look at the op on Franco's thread and you'll have your answer
Click to expand...
Click to collapse
If he looks in the Franco thread, it will answer his question about having to flash a stock boot.img?
moporoco said:
I use this without losing data, but perhaps this is overkill? I assume you can skip the recovery to avoid losing TWRP, but I don't know about the kernel.
{replace with actual file name}
Enable USB Debugging and OEM Unlock
Reboot into bootloader (vol-down + power) or adb reboot bootloader
fastboot flash bootloader {bootloader-shamu-xxx.img}
fastboot reboot-bootloader
fastboot flash radio {radio-shamu-xxx.img}
fastboot reboot-bootloader
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot erase cache
fastboot flash cache cache.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot reboot
Click to expand...
Click to collapse
Why do you prefer to erase the cache then flash the new one? Does this really matter as long as userdata.img does not get flashed?
rootSU said:
You're best off using a kernel that fully supports 5.1. I have no idea about Franco.
Click to expand...
Click to collapse
Brain fart, for future reference Franco r1-r19 is 5.0,5.0.1,5.0.2 and r20+ is for 5.1
Thanks for the input everyone. To follow-up, I took the steps just as I planned in OP. No need to flash boot.img as frano-r20 is what I'm running and is compatible with 5.1 (despite the build # difference). I also didn't want to encrypt as the factory boot.img will force encrypt.
Code:
fastboot flash bootloader bootloader.img
fastboot flash radio radio.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot flash cache cache.img
And just as @rootSU pointed out, prior to booting system, go into TWRP from bootloader to install su.zip first (otherwise factory recovery will overwrite TWRP). Then boot system, and you're back in business. Just had to re-do a couple build.prop edits, but everything else was as it was before.
If I'm stock 5.1 rooted LMY47D with the modified boot.img without forced encryption (from here), can I just..
Code:
fastboot flash bootloader bootloader.img
fastboot flash radio radio.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot flash cache cache.img
then reboot into TWRP, flash SuperSU, reboot and go about my day?
lamenting said:
If I'm stock 5.1 rooted LMY47D with the modified boot.img without forced encryption (from here), can I just..
Code:
fastboot flash bootloader bootloader.img
fastboot flash radio radio.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot flash cache cache.img
then reboot into TWRP, flash SuperSU, reboot and go about my day?
Click to expand...
Click to collapse
That, or you can wait for 47E factory boot.img that's non-enforcable. But, from the sounds of it people are still able to use the 47D boot.img linked in the post you provided. I'd imagine there's not much difference between the two.
Forerunner326 said:
Why do you prefer to erase the cache then flash the new one? Does this really matter as long as userdata.img does not get flashed?
Click to expand...
Click to collapse
I have no idea honestly, I saw someone else post it that way. It is probably not necessary.
ManHands said:
I just recently started fresh by unlocking and flashing LMY47D image. I'd like to upgrade to LMY47E and preserve data. I know I can backup/restore via TIBU, but I'd rather avoid that if possible. Am I overlooking anything by performing only the following commands? Also worth noting is that I'd like to retain TWRP and franco.Kernel.
Code:
fastboot flash bootloader bootloader.img
fastboot flash radio radio.img
fastboot reboot-bootloader
fastboot flash system system.img
fastboot flash cache cache.img
At this point I'd use the hardware buttons to reboot into TWRP, flash su.zip, and then boot system.
I'm definitely going to perform a nandroid prior to doing this. However, just curious if this is the best way to do this or is there a better method. Or if there are any risks involved that I'm overlooking.
EDIT: Success... everything went just as planned. Thanks for everyone's help.
Click to expand...
Click to collapse
After flashing the files in fastboot you said to use the hardware buttons to boot into TWRP. How exactly did you go from fastboot to TWRP? Did you just power off while in fastboot or something else?

Easiest Way to Return to Stock Kernel? (Retain Magisk)

What's the easiest way to return to the stock kernel? I keep reading to flash dtbo.img and the stock boot.img, but wouldn't doing that kill magisk?
Edit: I'm dumb. Easiest way for future magisk users: just re-patch the stock boot image and flash it in fastboot
Shayded said:
What's the easiest way to return to the stock kernel? I keep reading to flash dtbo.img and the stock boot.img, but wouldn't doing that kill magisk?
Click to expand...
Click to collapse
Yes, flashing those stock images will kill Magisk. So what you would want to do is flash the factory dtbo.img, and then you can just flash a pre-patched Magisk boot.img to revert to stock kernel with Magisk.
If you're already on the Apr 2020 firmware (specifically QQ2A.200405.005), here are the files you need to flash. I uploaded the QQ2A.200405.005 factory dtbo.img for you for your convenience. If you're on a different region / firmware, don't flash these lol.
coral-qq2a.200405.005-factory-dtbo.img: https://www.androidfilehost.com/?fid=4349826312261767171
coral-qq2a.200405.005-magisk_patched-20.4.img: https://www.androidfilehost.com/?fid=4349826312261763705
boot into bootloader,
fastboot flash dtbo coral-qq2a.200405.005-factory-dtbo.img
fastboot flash boot coral-qq2a.200405.005-magisk_patched-20.4.img
reboot phone
edit: i see you already edited your post. just in case the kernel you were using modified the dtbo partition, i would also recommend flashing the stock dtbo image as well.
Shayded said:
just re-patch the stock boot image and flash it in fastboot
Click to expand...
Click to collapse
Flash boot and dtbo too just to avoid potential issues

Categories

Resources