[Discussion] OTA vs Fastboot flashing system, boot, etc - Nexus 4 General

Hey all, the OTA for 5.1.1 just popped up for me, but I have a custom recovery.
The way I previously have updated my device is by downloading the image from Google...
Extracting the image zip
Booting to fastboot
Flashing all but the Userdata
It's basically like running the flashall script without the user data flashing. I have manually loop mounted the user data.img file to check if it has anything since it's a larger image file, but it turns out to be completely empty and just a space holder for the partition it seems. Same for cache. So leaving it out is fine.
When I do this, I don't even use the "-u" flag for fastboot, would that be better?
This has worked so far, but I see it seems the more popular way is by downloading the OTA and sideloading it.
What's the difference between these two functions? Which is better?

I personally haven't sideloaded an ota in ages, preferring to fastboot flash the stock .img when an update appears. I flash so much on my phone that I like to start fresh for every update to clear out the junk I guess. As to what's better, I guess that's dependant on the needs and experience of the user.

steviemch said:
I personally haven't sideloaded an ota in ages, preferring to fastboot flash the stock .img when an update appears. I flash so much on my phone that I like to start fresh for every update to clear out the junk I guess. As to what's better, I guess that's dependant on the needs and experience of the user.
Click to expand...
Click to collapse
Yes, but you can fastboot flash it without flashing the user data if you don't want to start fresh. I imagine this is similar to doing an OTA but I'd like to know the technical differences.
Maybe I'll have to tear apart an OTA... I was hoping someone had done this already.

Related

Help! OTA - Rebooting

I got a message on my XT1053 Dev that there's a system update. (I'm running stock) I let it download, and then it wanted to reboot. Ok, but it came up in TWRP. I tried rebooting from TWRP every way, but it would not go into maintenance so it could flash the new firmware.
Now whenever I boot it normally, it comes up, and then immediately shuts down, I guess because it wants to upgrade.
What is wrong with this thing?
Quantumstate said:
I got a message on my XT1053 Dev that there's a system update. (I'm running stock) I let it download, and then it wanted to reboot. Ok, but it came up in TWRP. I tried rebooting from TWRP every way, but it would not go into maintenance so it could flash the new firmware.
Now whenever I boot it normally, it comes up, and then immediately shuts down, I guess because it wants to upgrade.
What is wrong with this thing?
Click to expand...
Click to collapse
You must be on stock recovery in order to OTA update. Try going into adb and flashing back to stock recovery and it should work.
Make sure you have mfastboot set up and working, if you need the file respond to this post and I can supply it for you.
Download the stock recovery from here (and make sure it's in your "android" folder)
Boot your phone into fastboot with
adb reboot bootloader
Click to expand...
Click to collapse
-OR-
While the phone is off, hold the PWR button and the Volume Down buttons at the same time for ~5 seconds. Release the PWR button ONLY and continue holding Volume Down until you see the fastboot screen.
Next
Then in adb on your computer perform:
mfastboot flash recovery *filename*
mfastboot reboot
Click to expand...
Click to collapse
When it reboots into the OS it should try to install the update again, like you said it was doing. When it reboots it should update correctly via stock recovery.
Emphasis on should. I can't guaruntee this will work but this is based on my prior knowledge and experience. Good luck and report back with success/problems!
Quantumstate said:
I got a message on my XT1053 Dev that there's a system update. (I'm running stock) I let it download, and then it wanted to reboot. Ok, but it came up in TWRP. I tried rebooting from TWRP every way, but it would not go into maintenance so it could flash the new firmware.
Now whenever I boot it normally, it comes up, and then immediately shuts down, I guess because it wants to upgrade.
What is wrong with this thing?
Click to expand...
Click to collapse
There's nothing wrong with this thing....
All of the guides here exist for a reason. One responsibility you have once you have decided to root your device or install custom recovery, is that when a new OTA comes out, you must check back here at XDA to see what the procedure for installing it is.
All of the guides here tell you that you MUST have stock recovery in order to accept any updates.
Here's how you will fix it:
Boot into TWRP. Clear your cache. This will prevent the constant reboots.
Now, use fastboot to flash back the stock recovery. You will need to download the 4.4.2 SBF for your XT1053 from here: http://sbf.droid-developers.org/phone.php?device=0
Extract the archive. You only need one file: recovery.img
You should already have the android SDK installed since you unlocked your BL and flashed TWRP. Use fastboot to flash the stock recovery:
fastboot flash recovery recovery.img
Now you can accept the OTA from your phone. You may need to go to Settings > About Phone > System Updates and re-download it.
The OTA should now successfully install (assuming you aren't using Xposed or made any other modifications).
Now, you can flash TWRP recovery back. Let us know how it works out for you...
Thanks, but the update was unsuccessful.
I seem to remember that the update checks existing files, and if one has the wrong CRC it fails. Well I'm stock but rooted. It is a develoepr's phone and there is no developer's image on those sites.
Quantumstate said:
Thanks, but the update was unsuccessful.
I seem to remember that the update checks existing files, and if one has the wrong CRC it fails. Well I'm stock but rooted. It is a develoepr's phone and there is no developer's image on those sites.
Click to expand...
Click to collapse
The GSM Developer edition uses the SAME exact software as the T-Mobile version. The T-Mobile variant has zero bloat, and no carrier branding. The only difference between the two is that you don't lose your warranty when you unlock the GSM Dev edition.
You're looking for the XT1053 T-Mobile SBF
http://sbf.droid-developers.org/phone.php?device=0
Quantumstate said:
Thanks, but the update was unsuccessful.
I seem to remember that the update checks existing files, and if one has the wrong CRC it fails. Well I'm stock but rooted. It is a develoepr's phone and there is no developer's image on those sites.
Click to expand...
Click to collapse
I always seem to have something in /system that messes with the ota update. In addition to flashing stock recovery to replace twrp, I also flash system.img (with mfastboot only) from the same sbf as you get the recovery.img. Then the ota goes through without a hitch.
Still Errors at the robot with spinning diamond heart, even with TMO_RETAIL_XT1053_4.4.2-KXA20.16-1.25_MR3_CFC.xml/recovery.img.
Looking around it seems that here are some rules. I think I'm violating #2: "Inside the OTA is a manifest file. It contains a list of files and their check sums it expects to be on your phone. If the files are missing, or the check sum for a particular file doesn't match (because you've replaced or altered the file), the OTA will fall." I've removed most of the G**gle junk since I don't trust them.
So if this is what they require, Hell with them. If it were possible to put multiboot on the Moto X I would have done it a long time ago. Maybe I can apply this OTA update in some other way? Without going through their rinky-dink tests?
Quantumstate said:
Still Errors at the robot with spinning diamond heart, even with TMO_RETAIL_XT1053_4.4.2-KXA20.16-1.25_MR3_CFC.xml/recovery.img.
Looking around it seems that here are some rules. I think I'm violating #2: "Inside the OTA is a manifest file. It contains a list of files and their check sums it expects to be on your phone. If the files are missing, or the check sum for a particular file doesn't match (because you've replaced or altered the file), the OTA will fall." I've removed most of the G**gle junk since I don't trust them.
So if this is what they require, Hell with them. If it were possible to put multiboot on the Moto X I would have done it a long time ago. Maybe I can apply this OTA update in some other way? Without going through their rinky-dink tests?
Click to expand...
Click to collapse
You are correct on the manifest.
Instead, just flash the entire stock SBF (TMO_RETAIL_XT1053_4.4.2-KXA20.16-1.25). The manual method is easiest.
Or you could just flash the system.img as the earlier poster suggested.
This will revert to stock, and you will have to reinstall your apps, but the OTA WILL work afterwards. You really should consider just 'freezing' the google apps instead of removing them this time...
The only other way you will be able to install the OTA is to put all the gapps back on...but I doubt you made a backup, right?
mfastboot flash system system.img
that should be all you need (beside stock recovery, of course). Then take the update, and finally do whatever mods you want remembering that you will HAVE to un-do the mods to be able to accept future OTAs without returning to 100% stock again.
Good Luck
Flashing system.img will not require you to reinstall your downloaded apps, just apps you installed as system apps via root access. Downloaded apps are in the /data/app partition that is not affected by a system.img flash.
I finally went this route. I'm not putting up with their OTA requirements; I'll get the upgrade without them. Although, that 4.3 sure has alot of G**gle and Motorola bloatware to remove.
With Xposed, GravityBox (and other modules) I now have the flexibility I was looking for.
Now all I need is a better dialer than the crappy G**gle one, and secure SMS.

[Q] Is It Okay to Ignore userdata.img?

I've a rooted Nexus 6 and consequently had to manually update to 5.0.1. However, the phone didn't like the image.zip. So, I flashed each *.img file individually. However, in retrospect, I realize userdata.img wiped my phone.
So, when a new version is released, will it be alright if I choose not to flash userdata.img? Could there be any potential side effects of not doing so?
EvaUnit02 said:
I've a rooted Nexus 6 and consequently had to manually update to 5.0.1. However, the phone didn't like the image.zip. So, I flashed each *.img file individually. However, in retrospect, I realize userdata.img wiped my phone.
So, when a new version is released, will it be alright if I choose not to flash userdata.img? Could there be any potential side effects of not doing so?
Click to expand...
Click to collapse
Yes. You're OK skipping the userdata image. That's exactly what the ota does.
Should be fine. When I flashed mine I did the images separately as well. I also skipped flashing userdata.img
It's also safe to skip recovery if you're running a custom recovery like TWRP.

[Q] Error while installing 5.0.1 update

Hi I just got the 5.0.1 update, I downloaded it and the phone rebooted itself, I got the installation screen and after 5 seconds I just got the word "error" and I had to restart it manually; the device is rooted, have anyone else had this problem? I would appreciate your help
saman0suke1 said:
Hi I just got the 5.0.1 update, I downloaded it and the phone rebooted itself, I got the installation screen and after 5 seconds I just got the word "error" and I had to restart it manually; the device is rooted, have anyone else had this problem? I would appreciate your help
Click to expand...
Click to collapse
With lollipop you can't take an OTA if you are rooted or running just about anything else modified (custom kernels, like ones that have force decrypt disabled also will cause it to error out).
You can still flash it manually by flashing the images. If you don't want to wipe, don't flash the userdata.img . Also, if you aren't currently encrypted, booting up with the stock kernel will force encrypt your device, so don't flash that if you want to stay that way. You can then re-root. There are more in depth instructions for doing this out there if you search around for them.
My Nexus 6 took 5.0.1 just fine, but my Nexus 7 does this same thing, running stock ROM/Bootloader/Recovery/etc. The ONLY thing done to it is the Fastboot OEM unlock, but I doubt that alone would stop it. I'm curious to know what resolves this ( other than downloading the factory image and flashing it without wiping the userdata )
Just got same error. I didnt even root phone, bought it today, it installed apps from backup of my previous Nexus 4 and OTA is failing.
cupfulloflol said:
With lollipop you can't take an OTA if you are rooted or running just about anything else modified (custom kernels, like ones that have force decrypt disabled also will cause it to error out).
You can still flash it manually by flashing the images. If you don't want to wipe, don't flash the userdata.img . Also, if you aren't currently encrypted, booting up with the stock kernel will force encrypt your device, so don't flash that if you want to stay that way. You can then re-root. There are more in depth instructions for doing this out there if you search around for them.
Click to expand...
Click to collapse
So basically the only way is to flash the image manually? If I choose not to flash userdata.img my phone data (photos, contacts, apps, etc) won't be erased right? But I will lose root correct? Thanks!
saman0suke1 said:
So basically the only way is to flash the image manually? If I choose not to flash userdata.img my phone data (photos, contacts, apps, etc) won't be erased right? But I will lose root correct? Thanks!
Click to expand...
Click to collapse
Correct, with Lollipop if you modify things you basically are then forced to manually take the updates. Not that big of a deal as you would likely be needing a PC to reinstall your custom recovery or re-root anyhow after the update.
Flashing userdata.img isn't necessary to update. Neither is recovery.img if you want to keep a custom recovery.
Also as I mentioned before, if you have disabled encryption on your device, if you flash the stock kernel (boot.img) and boot up with it you will re-enable forced encryption. You will need to flash a kernel with force encryption disabled if you want to keep running without encryption. If you haven't disabled encryption, or don't care if your device re-encrypts (this doesn't erase anything, just may take a few minutes on first boot) then this doesn't matter.
cupfulloflol said:
Correct, with Lollipop if you modify things you basically are then forced to manually take the updates. Not that big of a deal as you would likely be needing a PC to reinstall your custom recovery or re-root anyhow after the update.
Flashing userdata.img isn't necessary to update. Neither is recovery.img if you want to keep a custom recovery.
Also as I mentioned before, if you have disabled encryption on your device, if you flash the stock kernel (boot.img) and boot up with it you will re-enable forced encryption. You will need to flash a kernel with force encryption disabled if you want to keep running without encryption. If you haven't disabled encryption, or don't care if your device re-encrypts (this doesn't erase anything, just may take a few minutes on first boot) then this doesn't matter.
Click to expand...
Click to collapse
Can I manually update without removing root first? Am I going to receive an error if I don't remove it? based on what you said, I will remove userdata.img and recovery.img and that will not wipe my data right? Do I have to decompress those files or the flash-all.bat will take care of that? Thanks!
saman0suke1 said:
Can I manually update without removing root first? Am I going to receive an error if I don't remove it? based on what you said, I will remove userdata.img and recovery.img and that will not wipe my data right? Do I have to decompress those files or the flash-all.bat will take care of that? Thanks!
Click to expand...
Click to collapse
I'm interested as well. Mine is rooted and I have encryption disabled, and I have TWRP on my phone. I tried to sideload the OTA update, but I can't get my phone to start sideload. I even flashed the stock recovery to get it to go, and no dice. What do I do next?
Anyone? I would appreciate the feedback, thanks!
sideload refers to adb as I understand it. thats NOT how you flash....you use fastboot to flash so you can do it all by hand or use one of the toolkits that script it for you.
cmh714 said:
sideload refers to adb as I understand it. thats NOT how you flash....you use fastboot to flash so you can do it all by hand or use one of the toolkits that script it for you.
Click to expand...
Click to collapse
Thanks, I get that, however I wanted to know if I need to remove the root before installing the update and if I need to decompress the .zip with the .img files or the batch will do that? thanks!
saman0suke1 said:
Thanks, I get that, however I wanted to know if I need to remove the root before installing the update and if I need to decompress the .zip with the .img files or the batch will do that? thanks!
Click to expand...
Click to collapse
If your doing from the PC you need to extract the zip file from within the image and then fastboot them. As for root, when you do it from fastboot I dont believe it matters as you will lose root anyway and need to re-root via flashing SuperSU.zip
Worked great! Thanks! Android 5.0.1 and root, no data deleted
Is it normal to not have received an update beyond 5.0? I have had a Nexus 6 since day one, no rooting of any kind and I have not received 5.0.1.
I have done the sideload method, but I really don't want to bother with it. I do however want some of these terrible bugs I am experiencing squashed. This phone is giving me lots of issues lately.
Thanks!
Can you receive and install OTA updates with an unlocked bootloader? Everything else is stock, no disabled encryption or anything just unlocked bootloader.
naulsballs said:
Can you receive and install OTA updates with an unlocked bootloader? Everything else is stock, no disabled encryption or anything just unlocked bootloader.
Click to expand...
Click to collapse
Yes
Sent from my Nexus 6 using XDA Free mobile app
saman0suke1 said:
Worked great! Thanks! Android 5.0.1 and root, no data deleted
Click to expand...
Click to collapse
Can you provide steps for this. I am in the same situation. I have the 5.0.1 image downloaded, just wondering what files and what order to flash. Thanks
TOCS88 said:
Is it normal to not have received an update beyond 5.0? I have had a Nexus 6 since day one, no rooting of any kind and I have not received 5.0.1.
I have done the sideload method, but I really don't want to bother with it. I do however want some of these terrible bugs I am experiencing squashed. This phone is giving me lots of issues lately.
Thanks!
Click to expand...
Click to collapse
Try pulling your Sim card out and rebooting.
scotbotmosh said:
Can you provide steps for this. I am in the same situation. I have the 5.0.1 image downloaded, just wondering what files and what order to flash. Thanks
Click to expand...
Click to collapse
If you're planning to stay rooted (meaning no OTA in future) system.img, boot.img and radio.img in any order.
scotbotmosh said:
Can you provide steps for this. I am in the same situation. I have the 5.0.1 image downloaded, just wondering what files and what order to flash. Thanks
Click to expand...
Click to collapse
If you use fastboot, just run these commands in terminal (I used windows, so in order to flash using fastboot, put the image that you downloaded for the update in the same folder where you have fastboot and open a terminal there) you can rename the .img files to whatever you like and replace those name in the commands below:
fastboot flash bootloader <bootloader file name here>.img
fastboot flash radio <radio file name here>.img
Then reboot it:
fastboot reboot-bootloader
Then flash these:
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
And that's it. These commands are run while the phone is connected to the PC, you have to turn it on by pressing volume up + volume down + power.
Good luck.

[Q] How to flash OTA updates once rooted/custom recovery?

Hi Nexus 6 experts -
My Nexus 6 arrived today, so of course the first thing I did was follow this thread to unlock the boot loader, gain root, and TWRP:
http://forum.xda-developers.com/nexus-6/general/how-to-nexus-6-one-beginners-guide-t2948481
Now I'm reading about how this breaks OTA updates, and after 30 minutes of looking for the right answer across the forums, I'm in need of some more accurate advice.
1. Is this the right location for downloading factory images?
https://developers.google.com/android/nexus/images
Part of my confusion stems from the fact that my build number for 5.0 is currently LNX07M, and the one listed for 5.0 is LRX21O. Does this matter at all? Could I flash the files from 5.0.1 (LRX22C) without any issue?
2. In order to flash 5.0.1, is this the right procedure to follow?
http://forum.xda-developers.com/showpost.php?p=57411133&postcount=75
I'm looking for how to flash the right images in the right sequence with fastboot, as I'd rather not use any toolkits. The aforementioned post flashes the radio image, then the system image. Is anything else missing there?
3. I'm assuming I need to re-flash root again after this point - is the version listed in the beginners guide still applicable?
Since I've had the phone for all of 2 hours I'm trying my best not to brick it. Any insight would be appreciated, thanks!
EDIT: Download the factory images from the google link above and extract everything. The first extraction renders the radio and bootloader images, along with a zip file. Extract the zip file and you'll find the boot, cache, recovery, and system images. Using fastboot is easy:
fastboot flash <type> <filename>
example:
fastboot flash system system.img
As far as I can tell, <type> is specific to every file. Very easy, only takes a few minutes, and you only need to flash what you need.
Yes Lollipop requires 100% stock for OTA updates now. But OTA is overrated
1. Yes indeed. thats the right place. Wasn't LNX07M the pre-release developer preview?
2. The image contains a flash-all script for windows and linux, but this will wipe data (unless you remove the -w i believe) but I prefer to flash individually.
flashing Radio isnt essential but you will probably want to try it at least. You also want to flash the system and boot images (boot image is the kernel). Then flash SuperSU from recovery. I know OTA's have a script that replace your recovery on first boot if you dont immediately root. I havent flashed a factory image for a whiole so not sure if these have them too, so just a word of caution there.
3. I tend to go for the latest from the beta thread personally, but there is no hard going for older versions except that some things might not gain root properly due to the changes with SElinux etc
Hey thanks rootSU - this is exactly what I was looking for! Once I run through that process I'll add the details to my original post.
So I am on LRX210, rooted and am running twrp recovery. Sounds like I should download the 5.0.1 image and flash the boot, cache, recovery, system, and radio files individually, correct?
Any specific order?
scotbotmosh said:
So I am on LRX210, rooted and am running twrp recovery. Sounds like I should download the 5.0.1 image and flash the boot, cache, recovery, system, and radio files individually, correct?
Any specific order?
Click to expand...
Click to collapse
I only flashed a few of the files, like boot, system and radio. Recovery will remove twrp so you don't want that. Order doesn't seem to matter.
im on 5.01 decrypted boot img...if 5.02 comes out all i do is flash an xda modded 5.02 img boot decrypted file and all the other files except for userdata.img to save all my data and files/settings right? no neeed to revert back to stock, update to ota official 5.02, blah blah ...
cobyman7035 said:
im on 5.01 decrypted boot img...if 5.02 comes out all i do is flash an xda modded 5.02 img boot decrypted file and all the other files except for userdata.img to save all my data and files/settings right? no neeed to revert back to stock, update to ota official 5.02, blah blah ...
Click to expand...
Click to collapse
Yeah you shouldn't need to revert/unroot and use the OTA. Just flash what you need from the factory image. System is the only major one to flash, boot would be the kernel, so use whatever you need for the decrypted version.
I'm assuming userdata overwrites /data which would wipe your files and apps.

How (not) to loose OTA? - Experiences and Discussion

Ok, as discussed in the other thread, I want to document when you loose OTA, how to avoid it, and how to fix it.
From what I know, OTA is lost when modifying the system. This means flashing a new kernel, rooting the device and modifying the build.prop or other root level stuff (mostly) will do it. The easiest way to recover from it would be to flash the stock boot.img and everything should be fine, right?
The reason this is in the Q&A is because I need real world examples what happened to you and how you've managed to get it back as well as what have you done and not lost OTA?
Thanks in advance!
You can use OTA with magisk quite easily, without even using computer( worst case, magisk wont find the stock boot.img and you need to reflash it, not such a big deal)
If you mount system for any operation(Cam2Api, or any other modification) , you need to reflash system as well.
You can always reflash stock system(or whole fastboot image), or even wait and flash a whole stock image from scratch
This tool is incredably helpful as well
https://forum.xda-developers.com/mi-a2/how-to/mi-a2-toolkit-unlock-bootloader-root-t3834585
for perfoming these operations ( Also, i have used the cam2 enabler from this tool this time, i have to see if that broke OTA next time there's an update)
I applaud the question, it's a good one, and a good basic place to start re discussing Cam2api enabling.
But, you did mean to say flash stock 'system' image, not "flash the stock boot.img"? Because the reason OTA stops working is probably both images. But for sure the system image being modified will stop them.
I can say for certain that enabling cam2api with the 'adb shell setprop persist... etc) commands will enable the API and ALSO allow you to continue to get OTA updates. I'd suggest doing some research on the setprop persist type commands to know why and exactly how it works, but it DOES NOT modify the 'system' partition, that's why OTA's continue.
A word of warning to the noobs, there are a kazillion 'Tools' in the A2 forums (no, I mean software tools, not the other kind ). Be aware, if that 'Tool' mounts 'System' as Read Write (which I know at least one of them does), 'System' is then considered modified! NO More OTA!
Reptant said:
You can use OTA with magisk quite easily, without even using computer( worst case, magisk wont find the stock boot.img and you need to reflash it, not such a big deal)
If you mount system for any operation(Cam2Api, or any other modification) , you need to reflash system as well.
You can always reflash stock system(or whole fastboot image), or even wait and flash a whole stock image from scratch
This tool is incredably helpful as well
https://forum.xda-developers.com/mi-a2/how-to/mi-a2-toolkit-unlock-bootloader-root-t3834585
for perfoming these operations ( Also, i have used the cam2 enabler from this tool this time, i have to see if that broke OTA next time there's an update)
Click to expand...
Click to collapse
Noted, and will be added to the "documentation" when I write it. Thanks for the Magisk tips.
As for the tool, looking at the other comment, OTA should now be broken because the tool should've mounted the system, but I'll wait a couple of weeks before posting that step in the documentation, and do let me know how it went for you.
AsItLies said:
I applaud the question, it's a good one, and a good basic place to start re discussing Cam2api enabling.
But, you did mean to say flash stock 'system' image, not "flash the stock boot.img"? Because the reason OTA stops working is probably both images. But for sure the system image being modified will stop them.
I can say for certain that enabling cam2api with the 'adb shell setprop persist... etc) commands will enable the API and ALSO allow you to continue to get OTA updates. I'd suggest doing some research on the setprop persist type commands to know why and exactly how it works, but it DOES NOT modify the 'system' partition, that's why OTA's continue.
A word of warning to the noobs, there are a kazillion 'Tools' in the A2 forums (no, I mean software tools, not the other kind ). Be aware, if that 'Tool' mounts 'System' as Read Write (which I know at least one of them does), 'System' is then considered modified! NO More OTA!
Click to expand...
Click to collapse
Yup, my mistake. I ment system. Thanks for the sugestion, I'll have to look at setprop persist type commands.
Now looking back at the new info I have, would that mean that flashing a custom kernel would not stop OTA from working and after the OTA update is applied, a new stock kernel would just be flashed along with the OTA?
@ILA "Now looking back at the new info I have, would that mean that flashing a custom kernel would not stop OTA from working and after the OTA update is applied, a new stock kernel would just be flashed along with the OTA?"
I've never flashed a custom kernel, but I highly doubt doing that WOULD NOT stop OTA? If that's not modifying the phone, what is? I mean, that seems to me to be an obvious modification Xiaomi would be unhappy about and try to prevent, would be my bet.
AsItLies said:
I've never flashed a custom kernel, but I highly doubt doing that WOULD NOT stop OTA? If that's not modifying the phone, what is? I mean, that seems to me to be an obvious modification Xiaomi would be unhappy about and try to prevent, would be my bet.
Click to expand...
Click to collapse
I would have to agree, and that would be highly illogical to me as well, but as far as we've seen so far is that it's only triggered by system modification. On the other hand, we haven't really had custom kernels up until recently so, not really a way to check that until someone tries it with the next OTA, but my bet's on it breaking OTA as well. If noone faces it until December, I'll try it with that update. With the November one, I want to have a sanity check if everything passes. If I have time, maybe I'll rollback updates and try it sooner, but I doubt anything from my side on this front will happen before December.
@ILA, if you do not test with another OTA, the next one will be pie update, well, at least that is what we all expect
minnuss said:
@ILA, if you do not test with another OTA, the next one will be pie update, well, at least that is what we all expect
Click to expand...
Click to collapse
Hope you are correct
But until Pie, I can always test this with rolling back to the previous OTA.
To keep OTA you need:
Stock unmodified boot image
Stock, unmodified and never mounted as writable system partition and vendor partition
Systemless root (such as Magisk), custom kernel and custom recovery all install to the boot image, if you only did one of those, flashing the stock boot image will be enough, or if you allowed Magisk to backup the stock boot image, doing this would be the easiest solution https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md
Simply mounting System or Vendor as writable will be enough for you to lose OTA (it's normal to mount them read only, don't panic when magisk does that)
so a modified build.prop will break OTA, but using setprop or resetprop will not, because those only affect /data (therefore you can't have a locked bootloader with camera2 enabled, because locking will wipe /data)
If you modified system or vendor and want to OTA, simply flash the stock image of the partition you modified via fastboot and it will work, but only if it comes from the same build you're currently running, if you're on September patch, you'll need to flash system.img from 9.6,13, and only that will work
it's always a good idea to keep the latest fastboot rom on your pc in case you needed it, but if it's not yet available, you can use TWRP to backup system, vendor and stock boot image before modifying them, and restore them before OTA, but make sure to select Backup System image and Vendor image Not backup system/vendor, because normal backup will just copy the files while an image backup will take the whole partition as it is, if you just restore the files then the image will have a different hash and you'll still fail to OTA
Also, as long as Anti Rollback is not active on A2 (it's not yet), you can always just roll back to the latest available fastboot image and OTA from there
Nebrassy said:
To keep OTA you need:
Stock unmodified boot image
Stock, unmodified and never mounted as writable system partition and vendor partition
Systemless root (such as Magisk), custom kernel and custom recovery all install to the boot image, if you only did one of those, flashing the stock boot image will be enough, or if you allowed Magisk to backup the stock boot image, doing this would be the easiest solution https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md
Simply mounting System or Vendor as writable will be enough for you to lose OTA (it's normal to mount them read only, don't panic when magisk does that)
so a modified build.prop will break OTA, but using setprop or resetprop will not, because those only affect /data (therefore you can't have a locked bootloader with camera2 enabled, because locking will wipe /data)
If you modified system or vendor and want to OTA, simply flash the stock image of the partition you modified via fastboot and it will work, but only if it comes from the same build you're currently running, if you're on September patch, you'll need to flash system.img from 9.6,13, and only that will work
it's always a good idea to keep the latest fastboot rom on your pc in case you needed it, but if it's not yet available, you can use TWRP to backup system, vendor and stock boot image before modifying them, and restore them before OTA, but make sure to select Backup System image and Vendor image Not backup system/vendor, because normal backup will just copy the files while an image backup will take the whole partition as it is, if you just restore the files then the image will have a different hash and you'll still fail to OTA
Also, as long as Anti Rollback is not active on A2 (it's not yet), you can always just roll back to the latest available fastboot image and OTA from there
Click to expand...
Click to collapse
Thank you for a very comprehensive answer! That pretty much covers everything that I wanted to know in this thread. This will be the main part of the new thread, but I'll write it in a week or so just to leave enough time if anyone remembers any more examples.

Categories

Resources