[How-To] Applying Monthly Security Patches if you're Rooted (Magisk) - Google Pixel 2 XL Guides, News, & Discussion

So, since once a month I find myself having to click a bunch of links and read how to do a bunch of commands, I wanted to create a thread that (rather generically) explains how to manually flash the OTA monthly updates if you're rooted with Magisk. So, minimally, here's a thread for me to review every month... if it helps you all out, all the better!
Pre-requisites:
Download Latest OTA zip file from Google.
Obtain the STOCK boot.img (required) and dtbo.img (optional) of the System ROM you are currently running. This can be done if you already have the full System Image file downloaded, downloading it currently, or just obtaining the stock boot and dtbo image files elsewhere. (NOTE: This can be skipped if you successfully uninstall Magisk BEFORE you start the process and choose to restore the Stock images in the uninstall process.)
Download Latest Magisk Zip file
Download latest TWRP recovery image
If applicable, have latest USB drivers, adb/fastboot/ files etc.
Preparation:
1) Extract or open the Full Image file and locate the boot.img and dtbo.img files. You will want these on your PC in the platform-tools folder (I usually put the Month name at the beginning, ex. - Jan_boot.img). Again, you can skip if you successfully uninstall Magisk prior to all of this.
2) Copy your OTA zip file to the platform-tools folder, again naming it after the month helps (ex. - Feb_Pixel2XL_OTA.zip)
3) Put your TWRP recovery in platform-tools folder.
4) Place the latest Magisk zip on your Pixel's internal storage (what used to be the SDCard on phones so equipped).
Commands:
1) From PC, open command prompt and change directory to your platform-tools folder.
2) If your phone is on, "adb reboot bootloader" If powered off, press power and Vol Down button to get to Bootloader. Plug your phone into your PC.
3) [If Magisk is not uninstalled first] Command: fastboot flash boot {Name_of_boot.img File}
4) [If Magisk is not uninstalled first] Command: fastboot flash dtbo {Name_of_dtbo.img File}
5) On your phone, hit Vol Down until you see Recovery, then press power button.
6) Once in recovery mode, press power and Vol Up to bring up menu
7) Scroll to item: "Apply update from ADB" and press power
8) Command: adb sideload {Name_of_OTA.zip file}
9) After the OTA finishes flashing, exit recovery back into the Bootloader
10) Command: fastboot boot {twrp_filename.img}
11) Install Magisk Zip file (and any other Zip files you want installed... Kernels, etc.) within TWRP
Then after flashing your zip files, reboot to system and you should be all set.
I believe everything above is correct, but if I've made a glaring mistake, please let me know. I also realize there may be other methods to this madness, but this is what works for me.

With this method do you have to worry about removing your password from your phone before you try to go into twrp?

uofirob said:
With this method do you have to worry about removing your password from your phone before you try to go into twrp?
Click to expand...
Click to collapse
Yes. Mine is set to pin, which I had to put in and it let me finish.

Sweet. I'll give this method a try tonight!
WorldOfJohnboy said:
Yes. Mine is set to pin, which I had to put in and it let me finish.
Click to expand...
Click to collapse

Thank you for this. Just to be clear in step 2 under prerequisites you say more on this later. Then in step 1 for preparation you prefix your boot and dtbo with Jan xx.img. I get what your saying, but for the newer noobs they may get confused. Maybe reword to say, extract or open the factory image your currently using or the previous months image. Obviously you do this first so that you can sideload the ota. I don't mean any disrespect.

I believe you also need remove the -w from the end of the .bat file after you extract the OTA; otherwise, all of your data will be wiped.
But great job of getting all this info in one place!

So I did this, and now I'm bootlooping. I guess I'll re-flash the Jan factory image and wait a little longer... **UPDATE** I fixed the bootloop by re-trying the process again (after re-verifying the MD5 hash on the update.zip. I rebooted after installing the update,
but before the TWRP flash to install MAGISK. Maybe this allowed the "update"
to finish processing. I also had to remove the pin from my lock screen in order to allow me to get into twrp. After rebooting into the system and removing the pin, I adb reboot bootloader and then flashed twrp. Thanks for the guide!
---------- Post added at 07:58 AM ---------- Previous post was at 07:50 AM ----------
PuffDaddy_d said:
I believe you also need remove the -w from the end of the .bat file after you extract the OTA; otherwise, all of your data will be wiped.
But great job of getting all this info in one place!
Click to expand...
Click to collapse
You don't need to remove the -w from the .bat file since you aren't using it at all to do the update. That is only if you're flashing your factory image.

Fe Mike said:
Thank you for this. Just to be clear in step 2 under prerequisites you say more on this later. Then in step 1 for preparation you prefix your boot and dtbo with Jan xx.img. I get what your saying, but for the newer noobs they may get confused. Maybe reword to say, extract or open the factory image your currently using or the previous months image. Obviously you do this first so that you can sideload the ota. I don't mean any disrespect.
Click to expand...
Click to collapse
I changed some wording under prerequisite...

I agree with everything on this guide...
just teasing...
I'm actually glad you created this thread...I wanted to create one also and try and help out as much as I could, but I don't have the cahones and didn' t think I had experience enough to start a "guide" thread :silly:

I mean no disrespect, but this seems awful complicated compared to just flashing the full image with the removed (-w). Especially since your downloading it anyway. I do that then boot the TWRP image and flash the TWRP zip. Reboot into recovery and flash kernel and magisk and reboot system. Again I'm asking for clarity, not dumping on you. Great write up btw!

CyberpodS2 said:
I mean no disrespect, but this seems awful complicated compared to just flashing the full image with the removed (-w). Especially since your downloading it anyway. I do that then boot the TWRP image and flash the TWRP zip. Reboot into recovery and flash kernel and magisk and reboot system. Again I'm asking for clarity, not dumping on you. Great write up btw!
Click to expand...
Click to collapse
Well...I can't speak for the OP, but I wrote my extremely similar identical one because, for whatever reason, many users would choose OTAs over flashing full factory images. I/me & you understand the benefits of the factory images over the OTAs; especially understanding the process you must go through to install the OTAs as-of-current is almost the same as flashing the factory images anyways...
But if I were to give a possible explanation to their reasoning is that, like many of them, I come from a non-Google phone (S5 for me), and OTA's were simpler, takes less bandwidth (which still remains true today), they were significantly simpler to install vs. factory images, and with a lot of popular phones you only flash factory images to recover your phone; i.e. muniz_ri's OTA's for the S5 and FlashFire were loads simpler than flashing a whole factory image. But, again, understanding the difference for Pixel 2 and Oreo's OTA & factory images (or the small difference thereof), it's probably better to do a few extra steps and/or downloads to do the whole image than sideloading an OTA.
In the end, this is for people who insist for OTA updates most likely because that's how they are familiar (and therefore more comfortable) with; whether it being explained to them or not...
Cheers!:good:

Fair enough, thanks for the input!

CyberpodS2 said:
I mean no disrespect, but this seems awful complicated compared to just flashing the full image with the removed (-w). Especially since your downloading it anyway. I do that then boot the TWRP image and flash the TWRP zip. Reboot into recovery and flash kernel and magisk and reboot system. Again I'm asking for clarity, not dumping on you. Great write up btw!
Click to expand...
Click to collapse
It may seem awful complicated, but to be honest, to me is less complicated than having to edit a script file (which if you forget to do, will lose all of your data). Also, though the steps I wrote out seem like a lot more if you were to write out a process using the full image, it actually works out to be almost the same number of steps.
Lastly, as someone else hinted at, the OTA file size is smaller. The only full image you need is what you are currently running (which in most cases I have on my phone in case the sh__ hits the fan with my phone), not the new full image. (To be even more precise, you only need the boot.img and dtbo.img from the full image file--there may be places to get just those two files out there.)
As I put in the last sentence, I realize there are other methods to this madness, this is basically what works for me. I wanted to get it in writing so I wouldn't forget this down the road, and if it helps anyone here, just icing on the cake. Clearly I'm no Dev and not forcing anyone to perform the updates this way!

WorldOfJohnboy said:
It may seem awful complicated, but to be honest, to me is less complicated than having to edit a script file (which if you forget to do, will lose all of your data). Also, though the steps I wrote out seem like a lot more if you were to write out a process using the full image, it actually works out to be almost the same number of steps.
Lastly, as someone else hinted at, the OTA file size is smaller. The only full image you need is what you are currently running (which in most cases I have on my phone in case the sh__ hits the fan with my phone), not the new full image. (To be even more precise, you only need the boot.img and dtbo.img from the full image file--there may be places to get just those two files out there.)
As I put in the last sentence, I realize there are other methods to this madness, this is basically what works for me. I wanted to get it in writing so I wouldn't forget this down the road, and if it helps anyone here, just icing on the cake. Clearly I'm no Dev and not forcing anyone to perform the updates this way!
Click to expand...
Click to collapse
Hey bud, wonder I I could pick your brain just a little. When doing monthly Google updates, are most of their proprietary files located in the boot, dtbo, and vendor images?? Your posts have intrigued me a little, and are very well written BTW. My reasoning is this. On my old 6p, about all we needed to do was flash the new vendor, and of course the bootloader and radio if there were any worthwhile improvements. Would the same possibly apply to the P2XL?? I'm just wondering because, now that we're starting to see custom roms, if this would be a viable option, and simplify the updating process. Thank again for your great write up ??

Badger50 said:
Hey bud, wonder I I could pick your brain just a little. When doing monthly Google updates, are most of their proprietary files located in the boot, dtbo, and vendor images?? Your posts have intrigued me a little, and are very well written BTW. My reasoning is this. On my old 6p, about all we needed to do was flash the new vendor, and of course the bootloader and radio if there were any worthwhile improvements. Would the same possibly apply to the P2XL?? I'm just wondering because, now that we're starting to see custom roms, if this would be a viable option, and simplify the updating process. Thank again for your great write up
Click to expand...
Click to collapse
I'll be perfectly honest with you, I haven't taken a dive to see what is in the OTA files and would imagine that it varies depending on the monthly updates.... that said, the only reason why I have stated to re-flash the stock boot.img is because if you are rooted with Magisk, it takes the stock boot.img and modifies it. In order to take an OTA sideload, you need to be on stock boot.img and stock recovery. dtbo is only in my process because there was one time when I tried to sideload and my dtbo wasn't stock (or corrupt). You may not need to flash the stock dtbo.img, but it doesn't hurt to do so.

WorldOfJohnboy said:
I'll be perfectly honest with you, I haven't taken a dive to see what is in the OTA files and would imagine that it varies depending on the monthly updates.... that said, the only reason why I have stated to re-flash the stock boot.img is because if you are rooted with Magisk, it takes the stock boot.img and modifies it. In order to take an OTA sideload, you need to be on stock boot.img and stock recovery. dtbo is only in my process because there was one time when I tried to sideload and my dtbo wasn't stock (or corrupt). You may not need to flash the stock dtbo.img, but it doesn't hurt to do so.
Click to expand...
Click to collapse
I'm really happy to see our device has graduated to this level of discussion, instead of the random guessing and 14 different "possible" routes to a solution. Lol
Custom roms abound, once TWRP gets squared away and someone master's the art of turning monthly updates into zip installs we'll pretty much be there!
Btw OP, great write up... Clear and precise!

I do not understand the purpose for downloading the full system image and then flashing only the OTA zip - what am I missing? There is a widely distributed method for performing monthly OTA updates by uninstalling Magisk, updating OTA normally, then flashing Magisk again - seems much simpler, any reason why it would not work?

Brenneke said:
I do not understand the purpose for downloading the full system image and then flashing only the OTA zip - what am I missing? There is a widely distributed method for performing monthly OTA updates by uninstalling Magisk, updating OTA normally, then flashing Magisk again - seems much simpler, any reason why it would not work?
Click to expand...
Click to collapse
Downloading the full system image is not required. You only need the Stock versions of boot.img (required) and dtbo.img (optional) of the ROM version your phone is currently running. I actually keep a full system image on my phone in case something goes awry.
I'm going to update the OP to more clearly state that you only need the stock boot.img file--how you obtain it is up to you. Uninstalling Magisk will do the same exact thing, however I tried to do that a couple of months ago and it created more issues for me than if I had just flashed the stock boot.img in the first place.

WorldOfJohnboy said:
Downloading the full system image is not required. You only need the Stock versions of boot.img (required) and dtbo.img (optional) of the ROM version your phone is currently running. I actually keep a full system image on my phone in case something goes awry.
I'm going to update the OP to more clearly state that you only need the stock boot.img file--how you obtain it is up to you. Uninstalling Magisk will do the same exact thing, however I tried to do that a couple of months ago and it created more issues for me than if I had just flashed the stock boot.img in the first place.
Click to expand...
Click to collapse
I have not tried the uninstall Magisk method but plan to do so at next update. What kind of issues did it create for you?
Thanks.

Brenneke said:
I have not tried the uninstall Magisk method but plan to do so at next update. What kind of issues did it create for you?
Thanks.
Click to expand...
Click to collapse
For some reason, I don't think it restored the correct (or not corrupted) boot.img version. Then, there were remnants of the Magisk APK and other files so I ended up having to do a full TiBu of my apps and flashed (with wipe) a full System image. It may have been something I did or just my bad luck, but I prefer not to chance it and instead manually flash the Stock image as my "guide" here states.

Related

MOTOACTV ROMs

Rooting and updating your MotoActv is about to get significantly easier! No more waiting games for developers to update their ROMs or tools when Motorola pushes a new OTA; now you can do it yourself! I honestly have not seen these types of files ANYWHERE else, so I had to create these myself (with quite a bit of help from [mbm]). But enough blabbing, here are the files and how to use them:
(Note: all these methods assume we have full fastboot access! -- Which we still have at this point)
- Stock Images:
These are not just mere update.zips that you might be accustomed to elsewhere in Android. Nor are these mere fxzs that you might be accustomed to elsewhere with newer Motorola devices. They are in fact both and more. There are 3 main ways to flash these files onto your device, giving you options based on what OS you run and how comfortable you are flashing files to your device.
1) FXZ:
- Operating System: Windows
- Requires: RSD Lite with FXZ Support
- Instructions: Simply load up the file as any standard fxz (it is very straight-forward)
2) Recovery:
- Operating System: Anything that can mount your device
- Requires: The ability to get into recovery
- Instructions: Place the file on the sdcard, boot into recovery, flash as normal
- Note: Recovery does not wipe your device, it is suggested that you do so before flashing stock images
3) Fastboot:
- Operating System: Windows/Linux/Mac
- Instructions (Windows): Unpack the zip, run flash-all.bat (if it fails, run as administrator)
- Instructions (Linux/Mac): Unpack the zip, run flash-all.sh (it should already have proper permissions)
Miscellaneous Images:
These miscellaneous images are nothing you haven't seen before at this point, but their purposes are new, so they too require explanation.
1) AnyRoot:
AnyRoot is based on koush's AnyKernel in the sense that it unpacks and repacks the boot.img on the fly. However, as the name suggests, AnyKernel is meant for kernels, while AnyRoot, actually roots the device on the fly. This will work on any MotoActv device. It is flashed as a normal update.zip and everything is done in the background so you won't noticed much. However, for ease of access, the stock and rooted boot.img is exported to your sdcard in /sdcard/recovery/. Also note, that if you happen to flash AnyRoot over an already rooted device, nothing will happen as it has built-in error checking.
2) rebootRecovery:
rebootRecovery is another fxz type zip, the same as the stock and rooted images, except it can't be flashed in recovery (would be a little redundant don't you think?). This flashes a specially made misc.img by [mbm] that tells the device to reboot into recovery from boot. This means you can flash AnyRoot on any stock device.
How Tos / FAQs:
Now that you know what the files do, I can explain in short steps how to use these files to get what you want:
1) How to Return the Device to Stock?
- flash a stock image using any of the 3 methods
- you can now update via Motocast if you so wish
2) How to Root a Stock Device?
- update your device via Motocast to the latest version (suggested)
- place AnyRoot on your sdcard
- boot into fastboot, and flash rebootRecovery using either of the 2 methods
- flash AnyRoot in recovery
- reboot
3) How do I update my Rooted Device?
- flash a stock image using any of the 3 methods
- update your device via Motocast to the latest version
- place AnyRoot on your sdcard
- boot into fastboot, and flash rebootRecovery using either of the 2 methods
- flash AnyRoot in recovery
- reboot
Q: After using rebootRecovery I can't get out of recovery!?
A: You are using an old recovery that doesn't clear the 'reboot-recovery' command; use the newer recovery: https://dl.dropbox.com/u/5849675/android/f100/CWMR5x_F100_recoveryB2.img
Q: What do these ROM offer over other custom ROMs?
A: Nothing, they are simply stock images, but you can upgrade with them.
Q: How much battery should I have when I flash?
A: Performing any kind of these flashes will drain at least 10% of your battery, I wouldn't suggest you flash below 60% ESPECIALLY IF YOU FLASH rebootRecovery!
Q: What happens if I flash a 16gb zip on my 8gb or visa-versa?
A: Don't freak, it will still boot, but it's not the best thing in the world to do, just go back and flash the correct model zip.
Q: Can I extract the images from your zips and flash them my own way?
A: yep (couldn't really think of anything else to say)
Q: I manually flashed the stock-boot.img from AnyRoot, and now I can't update. Why?!
A: The boot.imgs need to be truncated before they can be flashed to correctly work with Motorola's updates, just use the stock images.
Q: What's next?
A: HyprActv -- What's this?
Stock Images (w/ md5sums):
8gb-NA: https://dl.dropbox.com/u/5849675/android/f100/MA_1710_8GB_NA.zip (5e228bf56a67aced012c8cbb2d7f7c76)
16gb-NA: https://dl.dropbox.com/u/5849675/android/f100/MA_1710_16GB_NA.zip (21b067dc629f7ccd18b43799d8d5fb17)
8gb-EU: https://dl.dropbox.com/u/5849675/android/f100/MA_1710_8GB_EU.zip (5b79a46d87728303fc2c920eec71c2e8)
Miscellaneous Images (w/ md5sums:
AnyRoot: https://dl.dropbox.com/u/5849675/android/f100/MA_AnyRoot.zip (2f867b006da42865ef861094db0eb6e6)
Reboot Recovery: https://dl.dropbox.com/u/5849675/android/f100/MA_RebootRecovery.zip (1623c9c61462db9bb20b55bc8f1144aa)
Mirror (thanks Iownox!): http://www.androtransfer.com/?developer=lownox&folder=MotoACTV
This is Reserved.
I rooted and flashed in recovery (the stock 4.55.97 and the the rooted version 4.55.97) and I stay on 4.55.78 no matter what! The flashes go through successfully... But nothing has changed and the System version still says 4.55.78... But like I said, the flashes both completed! I did a factory reset... and the updater-script wipes system, so what could be my issue?
Moose8106 said:
I rooted and flashed in recovery (the stock 4.55.97 and the the rooted version 4.55.97) and I stay on 4.55.78 no matter what! The flashes go through successfully... But nothing has changed and the System version still says 4.55.78... But like I said, the flashes both completed! I did a factory reset... and the updater-script wipes system, so what could be my issue?
Click to expand...
Click to collapse
It sounds like you flashed that old boot.img. Do you have the battery percentage in the status bar? According to TheEndGame7 that is another surefire way to tell if you are on 4.55.97, if you used any of the root tools, it's possible that they automatically flash the old boot.img.
CEnnis91 said:
It sounds like you flashed that old boot.img. Do you have the battery percentage in the status bar? According to TheEndGame7 that is another surefire way to tell if you are on 4.55.97, if you used any of the root tools, it's possible that they automatically flash the old boot.img.
Click to expand...
Click to collapse
I think I did flash the old boot.img (root tools :O ). I'll try flashing the modified boot img again. Thanks! I had no idea the root tool took me back to the old boot img
Moose8106 said:
I think I did flash the old boot.img (root tools :O ). I'll try flashing the modified boot img again. Thanks! I had no idea the root tool took me back to the old boot img
Click to expand...
Click to collapse
Yes, any and all tools that exist so far will need to be updated.
I wiped data / cache and used recovery (b) to install the rooted-4.55.97 zip and didn't have any luck either. I did not use the root tools to flash. Also wiped dalvik cache after and fastboot -w for fun.
innovatelife said:
I wiped data / cache and used recovery (b) to install the rooted-4.55.97 zip and didn't have any luck either. I did not use the root tools to flash. Also wiped dalvik cache after and fastboot -w for fun.
Click to expand...
Click to collapse
Did you end up doing any restore of some kind after you flashed?
Update
There are "new" instructions that might fix the issue where the rooted 4.55.97 appears to not flash. Simply wipe the boot.img image before you flash. And don't use the root tools until they are updated.
Also, if you have success, please post it. Usually "Thanks, it works" is annoying, but in this case where I don't have the device, I need to make sure this is working on some level.
I formated everything from recovery, now I got stuck with Moto logo with no animation when it starts, how to get out of this?
NA
Is there any mirrors for the download of these roms? the dropbox links are down
NORCALkID said:
Is there any mirrors for the download of these roms? the dropbox links are down
Click to expand...
Click to collapse
They were pulled, they're not working. There has been some form of mis-communication when I did my testing. I am not working on these until I can get the device from utkanos. Check Update 2, in the initial post.
Success
CEnnis91
I was lucky the second time, first time I succeeded to upgrade to rooted 4.55.97 but for some reason I didn't get the battery percentage on the status bar but all other issues are OK and status indicated version number 4.55.97, I repeated flash from recovery but after wiping and remounting all folders, this time for stock 4.55.97
Now I'm on stock 4.55.97 with battery percent on status bar and syncing from my mac.
thanks CEnnis91
NA
I went into recovery>mounts, and didn't see any wipe for boot. I took a shot at system since I had already wiped cache and data. Didn't seem to help either. Tried 'fastboot erase boot" and re-flashed. No go. Couldn't start back up the device at all. Tried flashing the latest rooted image using "fastboot flash boot boot.img". No go.
I messed around trying to get the device to boot back up for a while, but it won't even charge right. Only charges long enough to kick off the Motorola 'M', and that is it. On attempts at loading fastboot, I just keep getting an error saying that the battery is low. I know I can only blame myself for this. No fastboot access and no adb access. All attempts at resetting the device have failed.
Before I attempted all of this, my battery was full. Unfortunately, wouldn't charge anymore even plugged into the wall. Any ideas?
Hopefully nobody else makes my mistake.
Man I can't wait till this is perfect, you guys are fricken awesome. I raped your thanks buttons op lol
MoPhoACTV Initiative
Will be working on this tonight. I just found out how to make the flash script clear cache and dalvik for you, pre-install. That'll probably save some headache, but it works only in edify format. Not sure what the stock recovery uses...
Anyways, I'm home!
ClearD said:
Will be working on this tonight. I just found out how to make the flash script clear cache and dalvik for you, pre-install. That'll probably save some headache, but it works only in edify format. Not sure what the stock recovery uses...
Anyways, I'm home!
Click to expand...
Click to collapse
All recoveries will now use edify, amend is old and depreciated, you will only find that on old devices.
Corrupt Kernel...
innovatelife said:
I went into recovery>mounts, and didn't see any wipe for boot. I took a shot at system since I had already wiped cache and data. Didn't seem to help either. Tried 'fastboot erase boot" and re-flashed. No go. Couldn't start back up the device at all. Tried flashing the latest rooted image using "fastboot flash boot boot.img". No go.
I messed around trying to get the device to boot back up for a while, but it won't even charge right. Only charges long enough to kick off the Motorola 'M', and that is it. On attempts at loading fastboot, I just keep getting an error saying that the battery is low. I know I can only blame myself for this. No fastboot access and no adb access. All attempts at resetting the device have failed.
Before I attempted all of this, my battery was full. Unfortunately, wouldn't charge anymore even plugged into the wall. Any ideas?
Hopefully nobody else makes my mistake.
Click to expand...
Click to collapse
This is a classical case of a corrupt Kernel. Not that the images are corrupt, but somewhere along your update, your boot.img did not install the kernel properly and now you have a broken power manager within kernel.
What I would do is the following:
Hook your watch to the charger and let the M sign show up.
Even if it hangs on the M, leave your watch hooked over night.
Try downloading an older image and use fastboot to erase everything and then flash everything back again. This should return your watch to a working state again.
You may then choose to customize it as you see fit.
Root tool > "return to stock"
Sent from my HTC Inspire 4G using XDA-funded carrier pigeons
simx said:
CEnnis91
I was lucky the second time, first time I succeeded to upgrade to rooted 4.55.97 but for some reason I didn't get the battery percentage on the status bar but all other issues are OK and status indicated version number 4.55.97, I repeated flash from recovery but after wiping and remounting all folders, this time for stock 4.55.97
Now I'm on stock 4.55.97 with battery percent on status bar and syncing from my mac.
thanks CEnnis91
NA
Click to expand...
Click to collapse
I'm about to try this.. but it's making me think... Do you think the updater-script doesn't correctly format system? Think about it... our devices say 4.55.97 (mine changed to that after a reboot or two), and we only had partial features... sounds like something isn't wiping correctly.

Can I Ota update while rooted on stock firmware

I am currently on stock rom but rooted. An Ota update popped up can I update without bootloop
I would like to know the same thing
Naruto101 said:
I am currently on stock rom but rooted. An Ota update popped up can I update without bootloop
Click to expand...
Click to collapse
stkman32 said:
I would like to know the same thing
Click to expand...
Click to collapse
No you can't take an OTA if you have any modifications to /system (root). Have a look at my guide:
http://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928
I got an 8MB update for the november patch. Being on TWRP and root i need to convert back to stock before i can have it leave me alone? Is there a way to flash the patch without doing that?
Thanks for answering my question
roughriduz said:
I got an 8MB update for the november patch. Being on TWRP and root i need to convert back to stock before i can have it leave me alone? Is there a way to flash the patch without doing that?
Click to expand...
Click to collapse
No way around it, any modifications will cause the update to fail.
Heisenberg said:
No way around it, any modifications will cause the update to fail.
Click to expand...
Click to collapse
@amoeller had me flash the modified boot.img for MDB08M then flash the MDB08M system.img and vendor.img from the factory image. I rebooted bootloader, the booted to TWRP and re-flashed supersu. I am now on the November patch without having to remove TWRP and all works well. My user data was also untouched.
roughriduz said:
@amoeller had me flash the modified boot.img for MDB08M then flash the MDB08M system.img and vendor.img from the factory image. I rebooted bootloader, the booted to TWRP and re-flashed supersu. I am now on the November patch without having to remove TWRP and all works well. My user data was also untouched.
Click to expand...
Click to collapse
User data should never be affected during an OTA anyway.
This is actually the first time I've unlocked a phones bootloader and stuck with the stock rom. I usually use some kind of popular rom with it's own built in OTA (CM/Viper One)
How often do you guys actually update your phones for OTA? It seems like a real hassle
GloriousGlory said:
This is actually the first time I've unlocked a phones bootloader and stuck with the stock rom. I usually use some kind of popular rom with it's own built in OTA (CM/Viper One)
How often do you guys actually update your phones for OTA? It seems like a real hassle
Click to expand...
Click to collapse
I am rooted now so I'll wait a while before updating an ota until there's a big deal of info. However, in the past if I was sticking with stock there's usually at least one developer who posts the updates with root and stuff built in so you can easily flash with twrp. So I'm kind of waiting for that. That or cataclysm or another awesome rom that's close to stock.
GloriousGlory said:
This is actually the first time I've unlocked a phones bootloader and stuck with the stock rom. I usually use some kind of popular rom with it's own built in OTA (CM/Viper One)
How often do you guys actually update your phones for OTA? It seems like a real hassle
Click to expand...
Click to collapse
I wait for factory image for that build and flash over the new images when they become available (provided that root can still be achieved). Some will do a clean wipe and start fresh with the new build and reload in their apps and user data, others will just dirty flash the updated system (and boot/bootloader or whatever else was changed too).
If you think about it, it really isn't all that different from taking an OTA, the difference is that we're applying the commands to flash instead of having it automated. It's not that big of a trade off in my book.
I have 2 questions...
What is the easiest way to make flashing updates a breeze if I have mods in /system partition? I have heard of "freezing" them. Or is the only option... to delete every mod and flash updates? If so, should I keep a note of every change I make to/system?
And last... Should I make a backup of any file i am replacing or overwriting in /system? And if so, do I have to put them back how they were before flashing an update?
Delete
If you're rooted then you need to download the full factory image, extract system and vendor and flash those. Reflash SuperSU.
roughriduz said:
@amoeller had me flash the modified boot.img for MDB08M then flash the MDB08M system.img and vendor.img from the factory image. I rebooted bootloader, the booted to TWRP and re-flashed supersu. I am now on the November patch without having to remove TWRP and all works well. My user data was also untouched.
Click to expand...
Click to collapse
It’s probably easier and quicker just to flash stock factory images separately instead of having to jump through hoops with OTAs. Like I told @roughriduz just flash the updated partition(s) that were updated like system.img, vendor.img, or whatever and just flash SuperSU in TWRP after.
The steps @roughriduz took was
1. Download and extract latest factory image.
2. Download matching modified boot.img for that build (For example MDB08M).
3. Flash system, vendor, and any other partitions (like radios, etc) with fastboot if they were updated in the OTA. Don’t bother to flash stock recovery because we’re not using an OTA. Flashing userdata.img is just like a factory reset.
4. Boot directly into TWRP and flash SuperSU.
5. Reboot and profit.
This method gives you the latest stock build rooted with TWRP while keeping your data because I hate having to redo my phone.
amoeller said:
It’s probably easier and quicker just to flash stock factory images separately instead of having to jump through hoops with OTAs. Like I told @roughriduz just flash the updated partition(s) that were updated like system.img, vendor.img, or whatever and just flash SuperSU in TWRP after.
The steps @roughriduz took was
1. Download and extract latest factory image.
2. Download matching modified boot.img for that build (For example MDB08M).
3. Flash system, vendor, and any other partitions (like radios, etc) with fastboot if they were updated in the OTA. Don’t bother to flash stock recovery because we’re not using an OTA. Flashing userdata.img is just like a factory reset.
4. Boot directly into TWRP and flash SuperSU.
5. Reboot and profit.
This method gives you the latest stock build rooted with TWRP while keeping your data because I hate having to redo my phone.
Click to expand...
Click to collapse
A couple questions:
1. Step 1 refers to the latest factory image that contains the update, correct?
2. Step two refers to the boot.img that contains root?
3. At what point in this process do you flash the modified boot.img, before or after applying the other images?
Thanks for your help!
JimmyJunk said:
A couple questions:
1. Step 1 refers to the latest factory image that contains the update, correct?
2. Step two refers to the boot.img that contains root?
3. At what point in this process do you flash the modified boot.img, before or after applying the other images?
Thanks for your help!
Click to expand...
Click to collapse
1. Latest factory image is the latest factory image from the nexus factory images page. It's not an update like ota, but rather the entire image they would return you to stock if all is flashed.
2. Flashing a modified boot does not give you root. You still have to flash SU, so saying the modified boot contains root isn't right.
3. I flash boot first unless there is an updated bootloader.
JimmyJunk said:
A couple questions:
1. Step 1 refers to the latest factory image that contains the update, correct?
2. Step two refers to the boot.img that contains root?
3. At what point in this process do you flash the modified boot.img, before or after applying the other images?
Thanks for your help!
Click to expand...
Click to collapse
1. This can be whatever the latest factory image is at the moment. It’s currently MDB08M. All the OTA does is update your phone to whatever build it was made for. Factory images already have previously released updates built into them. You can upgrade but avoid downgrading unless you want to factory reset your phone.
2. I’m referring to the boot.img without root by @mrRobinson found https://www.androidfilehost.com/?fid=24269982086992320 although this process can be used for systemless root also. For systemless root you wouldn’t flash SuperSU in TWRP but instead sideload the SuperSU APK as per Chainfire’s instructions and use the matching systemless root boot.img
3. I don’t think it matters but as long as you have the matching modified boot.img with the system.img installed before you restart, you should be fine.
amoeller said:
It’s probably easier and quicker just to flash stock factory images separately instead of having to jump through hoops with OTAs. Like I told @roughriduz just flash the updated partition(s) that were updated like system.img, vendor.img, or whatever and just flash SuperSU in TWRP after.
The steps @roughriduz took was
1. Download and extract latest factory image.
2. Download matching modified boot.img for that build (For example MDB08M).
3. Flash system, vendor, and any other partitions (like radios, etc) with fastboot if they were updated in the OTA. Don’t bother to flash stock recovery because we’re not using an OTA. Flashing userdata.img is just like a factory reset.
4. Boot directly into TWRP and flash SuperSU.
5. Reboot and profit..
Click to expand...
Click to collapse
What the heck did I do wrong here? I just tried to apply the November OTA update to my MBD08K build, it didn't work, and now I am in the process of doing a full reset and rebuild of my phone (flash-all of factory images from Google)
Here are the notes I made as I attempted to follow the procedure in this thread:
Code:
- Download latest build for MBD08K from https://developers.google.com/android/nexus/images?hl=en
- Extract boot.img, system.img, vendor.img to C:\adb (or wherever where adb and fastboot are
installed). You have to
- Right-click, open command window here
- Ensure USB debugging is enabled on phone (grant permissions on phone if you get the popup)
- In command prompt, "adb devices"
- Should see serial number and "device"
- type "adb reboot bootloader"
- Should get to bootloader screen with little android man lying down with hatch open
- type "fastboot devices" - should see your serial # again and "fastboot" beside it.
- type "fastboot flash boot boot.img"
- type "fastboot flash system system.img"
- type "fastboot flash vendor vendor.img"
- Use volume keys to boot into recovery (in my case TWRP)
- Swipe to allow modifications
- Install -> SuperSU.zip that you should have on your phone from last time.
- Reboot system
I saw a red "your phone is corrupt" scary message on startup... took a while to boot. Couldn't get past the dancing circles.
Interrupted boot, rebooted to fastboot, tried to flash old modified boot.img
Booted again, got encryption unsuccessful warning
Flashed most recent boot.img again, stuck booting forever
try again:
- flash system.img
- flash vendor.img
- flash boot.img (modified)
reboot to recovery - your device can't be checked for corruption (yellow warning instead of red)
- swipe to allow modifications
- reboot with TWRP, swipe to install SuperSU
- Encryption unsuccessful. Prompt to factory reset. Click OK. Boots through TWRP.
Give up, start flashing factory images.
EDIT: I might be the stupidest person alive. I think I should have been using the files for MDB08M. Arggghhhh. Someone please confirm I am an idiot.
Edit 2: Factory reset worked, I am at MDB08M. Now rooting again... grr. At least I backed up all my apps & settings to Google Drive with TB.
Edit 3: Rooted and restoring all apps with TB. If anyone has any insight into where I F'ed up I'd appreciate it.

Updating To MM from LP (Moto X Pure)

So I wanted to create a thread dedicated to performing this function. I know as someone who does this quite often, I like to have all my ducks in a row to ensure everything works perfectly. I'm not big on fragging my phone and then frantically trying to find a way to undo all the chaos. I do a lot of research and ask a lot of questions before doing anything.
On that note I would like to first thank all the amazing people on here, whether they be developers or just experienced Tech Guru's, everyone is always a big help. I take absolutely no credit for any of the awesomeness that can be found on XDA, I'm just creating a thread that I hope will help folks find everything in one place for this function. So here we go, I'm going to explain the way I did it, which is the way I have been doing stuff like this for years. I have a preferred method as it has always resulted in perfect flashes and no bricks, not even soft bricks. So I feel it works pretty well.
Just so it is understood, this is for the Moto X Pure, which has been bootloader unlocked and has TWRP and root installed. Also it should be noted that you need to have Developer Options enabled and USB Debugging enabled. You should also be familiar with the ADB process, to some extent, maybe you have at least heard of it.
Steps to follow:
1. Use Titanium Backup and backup all your User Apps, NOT SYSTEM APP's, system apps will not restore across updates and will most often corrupt your new install.
2. Make a Nandroid backup using TWRP, I backed up system, boot, data, and EFS, but I don't think EFS is necessary.
3. Make sure you have the Motorola Drivers installed, get them from here http://www.motorola.com/getmdmwin
4. Get Shawn5162's Restore to Stock Tool, I know others have said it's not necessary to perform a complete restore, but this is part of my process that I have always done, and it's always worked. Get it here by using one of the mirror's created by patt2k in post 6, and don't forget to thank him for the mirrors http://forum.xda-developers.com/moto-x-style/development/windows-tool-moto-x-style-pure-edition-t3199905
5. Unzip Shawn5162's zip to a folder on your desktop, and before you move onto the next step, make sure you have backed up everything valuable on your phone, such as pictures, messages, etc..., because everything is going to be erased in the next step, except for the stuff on your MicroSD. I'm so anal, I even remove the MicroSD before flashing. Connect your phone to your computer using a USB and make sure you have USB debugging enabled under Developer Options.
6. Inside the folder you created run the FLASH-ALL.bat, which will reboot your device to the bootloader and begin the restore to stock flash. This will remove root and TWRP, but will not remove the fact you have an unlocked bootloader. Your phone will reboot when complete and should boot back into your system within a short period of time.
7. Once you are rebooted, you may need to do a little setup before you get the message that a System Update is available. DO NOT waste your time installing any apps, wait until you have full root on MM before doing any of that. Once the Update message appears, accept it and download the MM update file, then install it once it is finished downloading and asks if you want to install.
8. The update takes about 20 - 25 minutes so be patient. Once complete your phone will once again boot back to system, now you have MM in it's complete unrooted greatness.
9. Now go into settings, about phone, and tap on build number a bunch of times to enable Developer Options. Then go into developer options and enable USB Debugging.
10. Next download a bunch of stuff from the following links, if you desire to install TWRP and regain root.
TWRP 2.8.7.1 here https://dl.twrp.me/clark/twrp-2.8.7.1-clark.img
Modified Boot Image from here, required to perform systemless root , not sure about the Cowboy hat dude, but click on him, it will download the file.
SuperSU 2.52 from here https://download.chainfire.eu/743/SuperSU/BETA-SuperSU-v2.52.zip?retrieve_file=1
11. Next copy the modified boot file and SuperSU file directly to your internal or external SD on your phone, either works fine, although I prefer my External SD.
12. Next copy the TWRP file you downloaded into the same folder you made for Shawn5162's files. This folder has all the adb and fastboot files you need to perform the TWRP flash. Now hold shift and right click and choose open a command window here. Then ensure your device is detected by running the command adb devices, it should show your phones S/N and the word device. If it doesn't, you may need to look at your phone and respond to the prompt about allowing your computer to have access to adb. Try the command again after that. Then run the command adb reboot bootloader, which should reboot your phone to bootloader fastboot mode.
13. Once it fastboot mode run fastboot devices just to make sure your device is still detected, then run the command fastboot flash recovery twrp-2.8.7.1-clark.img. That will flash TWRP to your recovery partition. Then type the command fastboot reboot twrp-2.8.7.1-clark.img or use the volume rocker to toggle to recovery then select the power key to boot to it. Make sure you choose the slider at the bottom to allow modification. Once on the main screen you can choose reboot and then select recovery. This makes sure that you have booted to TWRP at least once, and ensures by rebooting to it, you can get back to it.
14. Now perform a Nandroid Backup, using the TWRP Backup option, of your completely stock MM system, data, boot, and EFS partitions. Enable compression if you like and store it to your External SD if you have one. This allows you to have an unrooted backup on your SD, which is good for future updates. After the Nandroid is complete now flash the modified boot image zip using the TWRP Install feature, and when it's complete, then flash the SuperSU zip file. After I always perform the option to erase Dalvik and Cache, I just think it is a good thing to do, it's probably placebo, but I do it anyhow.
15. Go back to TWRP Home and choose reboot and select system. Your device will reboot and you now have a fully updated and rooted Moto X Pure on MM.
Thanks go out to all the folks who have contributed to the many threads that contain this information. Special thanks to Shawn5162, DaMadOne, Chainfire, and Hashbang173 for their awesomeness. Hope this helps folks that are concerned about performing these procedures. I can say that it worked perfectly for me with no issues at all, but of course I take no responsibility if it doesn't work for you and causes your device to fail. Again these are similar steps I have taken in the past with other devices and I have never had a single brick, so hopefully it works for others as well.
Enjoy!!
I have a Moto X Pure as described with the bootloader unlocked and rooted. The popup message to upgrade to MM comes up constantly now - what happens if you just let it try to update?
I think I am in way over my head. I am receiving my phone Friday and was looking to unlock to root but from the looks of it, I will not be able to do that.
I've never unlocked & rooted a phone before. So all that looks like the bible to an uneducated man "me".
superkev72 said:
I have a Moto X Pure as described with the bootloader unlocked and rooted. The popup message to upgrade to MM comes up constantly now - what happens if you just let it try to update?
Click to expand...
Click to collapse
If I'm not mistaken it will download to your phone but not be able to be installed because of an error
Is there no way to upgrade from LP to MM without a wipe?
superkev72 said:
Is there no way to upgrade from LP to MM without a wipe?
Click to expand...
Click to collapse
Yeah, if you rooted already, you must reflash the original boot.img. Then update, and then restore your root. Read here:
http://forum.xda-developers.com/mot...t-moto-x-style-xt1572-br-marshmallow-t3259380
At the bottom of the post, you get the original file you need and it is mentioned here:
And enjoy!
Now you have a rooted MotoX Style Marshmallow. To apply any OTAs, you only need reflash stock boot.
K?
Why would you want to update without a wipe? You must like sluggish performance
i have no wifi after this
No WIFI either
I ended up with no WIFI after following these steps also.
is it true, we cannot downgrade from 601 to 6.0 or 5.1.1?
skimaniaz said:
I ended up with no WIFI after following these steps also.
Click to expand...
Click to collapse
Same here. Anybody got a fix?
So the last three posts complain of no wifi yet people keep using this method?
The modified boot zip breaks the wifi. You can root by flashing superSU 2.62, I think, or any SuperSU zip that is specifically systemless.
ilovemeow said:
is it true, we cannot downgrade from 601 to 6.0 or 5.1.1?
Click to expand...
Click to collapse
Not true.
lafester said:
Not true.
Click to expand...
Click to collapse
coz i tried before, it fail in first 2 flash steps
Are you unlocked?
ilovemeow said:
coz i tried before, it fail in first 2 flash steps
Click to expand...
Click to collapse
The partition always fails. Just ignore it. You should be able to downgrade the bootloader. I have been able to so I don't know why you would be having issues with that unless your bootloader is locked/re-locked.
Sent from my XT1575 using XDA Labs
So is this safe or not?
lafester said:
Are you unlocked?
Click to expand...
Click to collapse
yup, it's unlocked, but currently fine for using android M at this moment

Fixed 6P bootlooping, now i want to update to Oreo

Hi all, I posted this in the 6P bootloop thread, but didn't get a response. As that is a pretty LONG thread, i'm thinking my question may have gotten lost in the jumble.
Quick run down.
A few months back my 6P started the BLOD. I found the fix listed on these pages, applied it, and have been happily using my phone ever since. Phone is bone stock 7.1.2 other than the TWRP recovery and the modified EX kernel for 4 cores.
Since the fix, my phone FINALLY got the OTA update to go to Android 8.0 and i obviously want to get it done. My concern is HOW to do this without causing more headache.
Can anyone point me in the right direction? Should i use the OTA update or download the factory image from Google?
I've got some knowledge as i used to be into the "rooting" scene back in the day, but haven't for a while, so i feel a little lost.
Thanks for any help.
johnnyphive said:
Hi all, I posted this in the 6P bootloop thread, but didn't get a response. As that is a pretty LONG thread, i'm thinking my question may have gotten lost in the jumble.
Quick run down.
A few months back my 6P started the BLOD. I found the fix listed on these pages, applied it, and have been happily using my phone ever since. Phone is bone stock 7.1.2 other than the TWRP recovery and the modified EX kernel for 4 cores.
Since the fix, my phone FINALLY got the OTA update to go to Android 8.0 and i obviously want to get it done. My concern is HOW to do this without causing more headache.
Can anyone point me in the right direction? Should i use the OTA update or download the factory image from Google?
I've got some knowledge as i used to be into the "rooting" scene back in the day, but haven't for a while, so i feel a little lost.
Thanks for any help.
Click to expand...
Click to collapse
Well, for starters do NOT take the OTA. It will either fail or boot loop your phone. Due to the fact you have a modified boot.img you will need to update manually using fastboot with the full image. Re-apply the modified kernel after you finish updating the partitions, but BEFORE booting the first time. You can follow most guides on how to manually update a full image using fastboot, just add the step of flashing the modified kernel before booting.
Thanks for the reply and the help. If i could ask for a little more help, as this is my only phone.
Can you explain the difference between the modified boot.img and the modified kernel?
If i download the factory image from here (https://developers.google.com/android/images) is it ok to the get the latested one (Nov 2017) or do i need to get the original one (Sep 2017 as i'm on Fi)
Once i flash the factory image, is it going to replace the modified boot image as well as the modified kernel?
Follow the OP on this thread (https://forum.xda-developers.com/nexus-6p/general/guide-fix-nexus-6p-bootloop-death-blod-t3640279) in the downloads section there appear to be 2 files i would need, the "Boot.img from stock 6.17, 8.0 firmware" and "EX kernel version 5.03". Am i understanding that correctly?
Like i said, this is my only phone, and i'm probably just being overly paranoid about bricking it, but any clarification would be greatly appreciated.
johnnyphive said:
Thanks for the reply and the help. If i could ask for a little more help, as this is my only phone.
Can you explain the difference between the modified boot.img and the modified kernel?
If i download the factory image from here (https://developers.google.com/android/images) is it ok to the get the latested one (Nov 2017) or do i need to get the original one (Sep 2017 as i'm on Fi)
Once i flash the factory image, is it going to replace the modified boot image as well as the modified kernel?
Follow the OP on this thread (https://forum.xda-developers.com/nexus-6p/general/guide-fix-nexus-6p-bootloop-death-blod-t3640279) in the downloads section there appear to be 2 files i would need, the "Boot.img from stock 6.17, 8.0 firmware" and "EX kernel version 5.03". Am i understanding that correctly?
Like i said, this is my only phone, and i'm probably just being overly paranoid about bricking it, but any clarification would be greatly appreciated.
Click to expand...
Click to collapse
Use the latest November image. The boot.img contains the kernel and ramdisk, critical files necessary to load the device before the filesystem can be mounted. When you flash the new boot.img contained in the Google image, it will overwrite the patched kernel. You then need to re-patch it by installing EX kernel before booting. EX writes to (modifies) the stock boot.img. There are also pre-modifed boot.img files floating around. You will probably get more detailed help in the dedicated thread. Learning to flash manually (or remember how) is not really a big deal and a necessary skill for modding (and for getting yourself out of trouble). Good luck. :good:
v12xke said:
Use the latest November image. The boot.img contains the kernel and ramdisk, critical files necessary to load the device before the filesystem can be mounted. When you flash the new boot.img contained in the Google image, it will overwrite the patched kernel. You then need to re-patch it by installing EX kernel before booting. EX writes to (modifies) the stock boot.img. There are also pre-modifed boot.img files floating around. You will probably get more detailed help in the dedicated thread. Learning to flash manually (or remember how) is not really a big deal and a necessary skill for modding (and for getting yourself out of trouble). Good luck. :good:
Click to expand...
Click to collapse
Ok, so 1 last time (sorry)
1 - Downloaded the latest 8.0.0 factory image from google (this contains the bootloader, radio, and partitions (.zip).
2 - Get phone to fastboot and apply the above 3 new images
3- before rebooting, flash oreo4core (new, modified boot.img), TWRP recovery.img
4- reboot to recovery (TWRP) and apply the modified EX kernel
5 - reboot and (hopefully) profit
Am i missing anything, or doing anything that isn't needed?
johnnyphive said:
Ok, so 1 last time (sorry)
1 - Downloaded the latest 8.0.0 factory image from google (this contains the bootloader, radio, and partitions (.zip).
2 - Get phone to fastboot and apply the above 3 new images
3- before rebooting, flash oreo4core (new, modified boot.img), TWRP recovery.img
4- reboot to recovery (TWRP) and apply the modified EX kernel
5 - reboot and (hopefully) profit
Am i missing anything, or doing anything that isn't needed?
Click to expand...
Click to collapse
<<Disclaimer: I don't use the 4 core kernel, so I don't know if it comes with installer script or someone has just modified the latest boot.img>> Unzip the "partitions" zip you refer to and extract those image files to the same folder as bootloader and modem. For example, you can keep TWRP recovery if you don't flash the recovery.img. That is how you preserve your custom recovery. So in other words you'll now have a folder (your ADB folder?) with 5 image files.... bootloader, radio, boot, system, and vendor all in one folder. <<Note: it is my understanding you just substitute the latest oreo4core file (should be boot.img?) If this is true, copy that file into your ADB folder and let it overwrite the stock boot.img. Stop. Copy over flash-all.bat, change the *.bat extension to *.txt and open in notepad. You will see (and can copy/paste) the fastboot commands to get you started with bootloader and radio. Then flash the last 3 (boot, system, vendor). At this point you can reboot into the OS. Since you substituted the oreo4core boot.img file for the stock boot.img there is no need to use TWRP to flash anything. That and since you skipped flashing the recovery.img, TWRP is still there.
v12xke said:
<<Disclaimer: I don't use the 4 core kernel, so I don't know if it comes with installer script or someone has just modified the latest boot.img>> Unzip the "partitions" zip you refer to and extract those image files to the same folder as bootloader and modem. For example, you can keep TWRP recovery if you don't flash the recovery.img. That is how you preserve your custom recovery. So in other words you'll now have a folder (your ADB folder?) with 5 image files.... bootloader, radio, boot, system, and vendor all in one folder. <<Note: it is my understanding you just substitute the latest oreo4core file (should be boot.img?) If this is true, copy that file into your ADB folder and let it overwrite the stock boot.img. Stop. Copy over flash-all.bat, change the *.bat extension to *.txt and open in notepad. You will see (and can copy/paste) the fastboot commands to get you started with bootloader and radio. Then flash the last 3 (boot, system, vendor). At this point you can reboot into the OS. Since you substituted the oreo4core boot.img file for the stock boot.img there is no need to use TWRP to flash anything. That and since you skipped flashing the recovery.img, TWRP is still there.
Click to expand...
Click to collapse
Thank for the help! Everything seems to be up and running. I know you said you don't use the "4 cores" (can only assume your either on a different phone or yours isn't affected by the BLOD), but do you know if i still need to apply the EX kernel update, or know of a way to tell if it's already been applied?
Thanks again for all the help. I was pretty much in the right direction, but being as how i'd been away from it for a while, i wanted some backup
johnnyphive said:
Thank for the help! Everything seems to be up and running. I know you said you don't use the "4 cores" (can only assume your either on a different phone or yours isn't affected by the BLOD), but do you know if i still need to apply the EX kernel update, or know of a way to tell if it's already been applied? Thanks again for all the help. I was pretty much in the right direction, but being as how i'd been away from it for a while, i wanted some backup
Click to expand...
Click to collapse
I don't think you can flash EX kernel from now on. I think you have to use a modded boot.img that will contain his kernel/ramdisk. This is my guess. You really should be getting your information in the dedicated thread where everyone is actually installing and using it. Google "oreo 4 core" and you will find the XDA thread is the first hit. Good luck. :good:

OTA Update for Rooted/Bootloader Unlocked

Hey all, just wanted to try and combine the bits and pieces of the "how to update OTA for rooted/BL unlocked" phones into one place as a quick run down for myself (and others who might have the same question) for the OTA:
Grab OTA update manually
Uninstall Edge Sense Mod from Magisk
Plug in phone into PC
adb reboot recovery
adb fastboot flash "stock boot.img"
adb sideload "OTA file name"
Reboot to bootloader using the volume and power button
adb fastboot flash "patched image to inactive slot (no idea how yet, sorry! Will add command)"
Reboot phone
Go back into Magisk and install manager for root
Re-install Edge Sense Mod within Magisk
*Optional*Re-apply Magisk Hide
Please let me know if there's any steps I'm missing or how it could be made easier for others to understand and if there's credit(s) missing (10+ hr shift and running on strong tea only 11 hr shift arguing with doctors to actually provide care instead of leeching insurance, and insurance to pay the damn medical claims instead of baton passing them to patients).
Disclaimer:
I'm no developer, just a common user that wants to make it a bit more convenient for other Pixel 3a owners to OTA update while rooted/BL unlocked. If it didn't work, or you encountered error(s), let me know and I can link them in so others can learn.
Disclaimer 2:
The above step(s) is assuming you've used pbanj's method for getting Magisk. Apparently I should add this as there's the "conventional" and "unconventional" method for Magisk. Had no idea since there was no guide available informing people otherwise at the time of making this step-by-step guide.
Credits:
pbanj for Pixel 3a root and Magisk images saving a MASSIVE some time, and its thread for the above steps.
googlephoneFKLenAsh for details of what I was missing in my initial steps.
sic0048 for making the root confusion apparent, and making a modified boot image method (the pbanj Magisk) here and his guide for rooting here.
Wdenton said:
Hey all, just wanted to try and combine the bits and pieces of the "how to update OTA for rooted/BL unlocked" phones into one place as a quick run down for myself (and others who might have the same question) for the OTA:
Grab OTA update manually
Uninstall Edge Sense Mod from Magisk
Plug in phone into PC
adb reboot recovery
adb sideload "OTA file name"
Reboot to bootloader using the volume and power button
fastboot flash "patched image"
Reboot phone
Go back into Magisk and install manager for root
Re-install Edge Sense Mod within Magisk
*Optional*Re-apply Magisk Hide
Please let me know if there's any steps I'm missing or how it could be made easier for others to understand and if there's credit(s) missing (10+ hr shift and running on strong tea only).
Disclaimer:
I'm no developer, just a common user that wants to make it a bit more convenient for other Pixel 3a owners to OTA update while rooted/BL unlocked.
Credits:
pbanj for Pixel 3a root and Magisk images saving a MASSIVE amount of time, and its thread for the above steps.
Click to expand...
Click to collapse
Before step 5, you need to fastboot flash stock boot.img before doing "adb sideload ota file".
I think step 7 should specify flashing patched image to inactive slot, (a or b), so as to be on the new active slot after a reboot, (step 8).
---------- Post added at 08:33 AM ---------- Previous post was at 08:28 AM ----------
googlephoneFKLenAsh said:
Before step 5, you need to fastboot flash stock boot.img before doing "adb sideload ota file".
Click to expand...
Click to collapse
I followed the op procedure and it worked without flashing the stock boot image. To what slot would you flash the stock image, active slot or inactive slot? Can it be flashed to old slot after step 8 reboot? Would there be any benefit?
I'm not sure why people insist that using the "modified" boot images make the update process faster or easier..... I assure you it does not.
Here is the update process if you install Magisk the normal way......
- Magisk: Click “Uninstall” → “restore images” → NO REBOOT
- Download and install OTA → NO REBOOT
- Clear all apps from recents (probably not even needed, but better to be safe than sorry).
- Magisk: Click “Install” → “Install to second/inactive slot (After OTA)”
- Reboot
That's all......... and it's all done from the phone. No computer or ADB is required for updates.
Tell me how that is harder than your method or how your method saves "a MASSIVE amount of time"?????
Look, I'll be the first to admit that using the modified boot images does make the initial root process easier and faster - by a few steps and about 2 minutes of time. But you will pay for it when it comes time to update your phone.
sic0048 said:
I'm not sure why people insist that using the "modified" boot images make the update process faster or easier..... I assure you it does not.
Here is the update process if you install Magisk the normal way......
- Magisk: Click “Uninstall” → “restore images” → NO REBOOT
- Download and install OTA → NO REBOOT
- Clear all apps from recents (probably not even needed, but better to be safe than sorry).
- Magisk: Click “Install” → “Install to second/inactive slot (After OTA)”
- Reboot
That's all......... and it's all done from the phone. No computer or ADB is required for updates.
Tell me how that is harder than your method or how your method saves "a MASSIVE amount of time"?????
Look, I'll be the first to admit that using the modified boot images does make the initial root process easier and faster - by a few steps and about 2 minutes of time. But you will pay for it when it comes time to update your phone.
Click to expand...
Click to collapse
Forgive me sic0048. You helped me in another post but I feared doing the initial step, magisk-uninstall-restore images. My reading of these forums indicates there is no stock image to restore since it was overwritten by the patched image during the initial root process. It is the transition from using patched images to doing a normal Magisk install that I lack knowledge of.
alliance1975 said:
Forgive me sic0048. You helped me in another post but I feared doing the initial step, magisk-uninstall-restore images. My reading of these forums indicates there is no stock image to restore since it was overwritten by the patched image during the initial root process. It is the transition from using patched images to doing a normal Magisk install that I lack knowledge of.
Click to expand...
Click to collapse
Great point, difference between downloading a patched boot image vs patching yourself is not clear as to how it affects the OTA update...
alliance1975 said:
Forgive me sic0048. You helped me in another post but I feared doing the initial step, magisk-uninstall-restore images. My reading of these forums indicates there is no stock image to restore since it was overwritten by the patched image during the initial root process. It is the transition from using patched images to doing a normal Magisk install that I lack knowledge of.
Click to expand...
Click to collapse
I totally understand the confusion......
If you use normal Magisk installation method where you let Magisk modify the stock boot.img file, then the OTA update method that I described above should work. Because you let Magisk modify the stock boot image, it will be able to use the stock image in the first step - Magisk: Click “Uninstall” → “restore images” → NO REBOOT
If you used the "modified boot image" method, you were able to skip the step where you let Magisk modify the stock boot image. This saves time initially, but it comes back to bit you during an OTA update because Magisk is unable to use the stock image to uninstall itself. You are correct that the normal Magisk "How to Take an OTA Update" instructions will fail if you used the modified boot image to gain root initially.
I guess I didn't realize that you had used the "modified boot image" method. Here is my recommendation to all those that have used the modified boot image method - start over.........
- use the Magisk manager app to Uninstall Magisk using the "Complete Uninstall" method.
- Pull the stock boot.img from the applicable factory image (whatever OS version/update you are currently on). Downloads are available here https://developers.google.com/android/images
- Using your computer, flash the stock boot.img file by using the command "fastboot flash boot boot.img"
- Reinstall Magisk using the "normal" method....
- Put the stock boot.img file on your phone's root SD card location
- Use the Magisk manager app to modify the stock boot.img
- move the magisk_modified boot image to your computer
- flash the magisk_modified boot image to the boot partition using the command "fastboot flash boot <patched_boot.img file name>"
- reboot
Then follow the instructions I gave for the normal OTA update process listed a couple posts above.
---------- Post added at 02:25 PM ---------- Previous post was at 02:14 PM ----------
duh1 said:
Unless I'm misunderstanding the process, seems like Magisk is missing a checkbox to backup the unpatched boot image prior to creating a patched image, for future OTA updates...
Click to expand...
Click to collapse
Magisk isn't missing this option, it's just that the method suggested by pbanj in this thread bypasses the normal method. It's not an issue with Magisk, it's an issue with the root method being suggested.
What I really need to do is create another "How to Root" thread and list the normal and recommended method. The confusion comes from people coming to this site and reading pbanj's thread and thinking that is the correct way to root. It is not the correct way to root.
alliance1975 said:
I think step 7 should specify flashing patched image to inactive slot, (a or b), so as to be on the new active slot after a reboot, (step 8).
---------- Post added at 08:33 AM ----------
I followed the op procedure and it worked without flashing the stock boot image. To what slot would you flash the stock image, active slot or inactive slot? Can it be flashed to old slot after step 8 reboot? Would there be any benefit?
Click to expand...
Click to collapse
Normally you would flash the stock boot image to the active slot to unroot the phone prior to installing the OTA.
Confused as to why flashing stock boot is no longer necessary. If this works as stated, it would appear the OTA is no longer patching the phone's boot and system partitions as had been done in the past. So perhaps the OTA now installs full boot and system images?
duh1 said:
Normally you would flash the stock boot image to the active slot to unroot the phone prior to installing the OTA.
Confused as to why flashing stock boot is no longer necessary. If this works as stated, it would appear the OTA is no longer patching the phone's boot and system partitions as had been done in the past. So perhaps the OTA now installs full boot and system images.
If that is indeed the case we should be able to just install the OTA normally through the system update button without having to uninstall Magisk and get rid of root first. Then as the Magisk tutorial states cancel the reboot go into the Magisk manager and reroot. Has anyone tried this on a rooted phone?
Click to expand...
Click to collapse
I had read, but have not confirmed myself, that the OTA images did include the boot and system img. However I just checked and the factory image for the June update on Bonito is 1.6gb while the "full OTA" image is only 1.1gb. So the two images are not identical. It's not like you saving a bunch of time by not uninstalling Magisk first and I don't think I would skip this simple step with the hope it would work. I'll continue to follow the recommended procedure that the Magisk developer has come up with and I would recommend to others that they do the same.
sic0048 said:
I had read, but have not confirmed myself, that the OTA images did include the boot and system img. However I just checked and the factory image for the June update on Bonito is 1.6gb while the "full OTA" image is only 1.1gb. So the two images are not identical. It's not like you saving a bunch of time by not uninstalling Magisk first and I don't think I would skip this simple step with the hope it would work. I'll continue to follow the recommended procedure that the Magisk developer has come up with and I would recommend to others that they do the same.
Click to expand...
Click to collapse
It's smaller as the OTA only contains the partitions that have changed such as system and boot. The other partitions are probably cloned over from the active slot to the inactive slot.
As I mentioned previously, the Magisk tutorial does not account for not having a backup of the stock boot image when you download the patched boot, so to remove boot prior to installing the OTA, you must manually flash the stock boot.
googlephoneFKLenAsh said:
Before step 5, you need to fastboot flash stock boot.img before doing "adb sideload ota file".
Click to expand...
Click to collapse
alliance1975 said:
I think step 7 should specify flashing patched image to inactive slot, (a or b), so as to be on the new active slot after a reboot, (step 8).
---------- Post added at 08:33 AM ---------- Previous post was at 08:28 AM ----------
I followed the op procedure and it worked without flashing the stock boot image. To what slot would you flash the stock image, active slot or inactive slot? Can it be flashed to old slot after step 8 reboot? Would there be any benefit?
Click to expand...
Click to collapse
Before step 5, flash stock boot.img to slot a (or just use getvar to get the current active slot. It should be slot a before first ota). If you don't flash stock boot img, you will get error message "E: Failed to verify package compatibility".
I think you didn't get this message because you actually restored stock boot.img when you uninstalled magisk. For those who rooted their phone by flashing patched boot.img, magisk doesn't know the location of stock boot.img.
Then in step 7, flash patched boot.img to slot b (after ota, the active changes to slot b. If there is new ota in the future, just use getvar to find out the active slot)
sic0048 said:
I'm not sure why people insist that using the "modified" boot images make the update process faster or easier..... I assure you it does not.
Here is the update process if you install Magisk the normal way......
- Magisk: Click “Uninstall” → “restore images” → NO REBOOT
- Download and install OTA → NO REBOOT
- Clear all apps from recents (probably not even needed, but better to be safe than sorry).
- Magisk: Click “Install” → “Install to second/inactive slot (After OTA)”
- Reboot
That's all......... and it's all done from the phone. No computer or ADB is required for updates.
Tell me how that is harder than your method or how your method saves "a MASSIVE amount of time"?????
Look, I'll be the first to admit that using the modified boot images does make the initial root process easier and faster - by a few steps and about 2 minutes of time. But you will pay for it when it comes time to update your phone.
Click to expand...
Click to collapse
sic0048 said:
I totally understand the confusion......
If you use normal Magisk installation method where you let Magisk modify the stock boot.img file, then the OTA update method that I described above should work. Because you let Magisk modify the stock boot image, it will be able to use the stock image in the first step - Magisk: Click “Uninstall” → “restore images” → NO REBOOT
If you used the "modified boot image" method, you were able to skip the step where you let Magisk modify the stock boot image. This saves time initially, but it comes back to bit you during an OTA update because Magisk is unable to use the stock image to uninstall itself. You are correct that the normal Magisk "How to Take an OTA Update" instructions will fail if you used the modified boot image to gain root initially.
I guess I didn't realize that you had used the "modified boot image" method. Here is my recommendation to all those that have used the modified boot image method - start over.........
- use the Magisk manager app to Uninstall Magisk using the "Complete Uninstall" method.
- Pull the stock boot.img from the applicable factory image (whatever OS version/update you are currently on). Downloads are available here https://developers.google.com/android/images
- Using your computer, flash the stock boot.img file by using the command "fastboot flash boot boot.img"
- Reinstall Magisk using the "normal" method....
- Put the stock boot.img file on your phone's root SD card location
- Use the Magisk manager app to modify the stock boot.img
- move the magisk_modified boot image to your computer
- flash the magisk_modified boot image to the boot partition using the command "fastboot flash boot <patched_boot.img file name>"
- reboot
Then follow the instructions I gave for the normal OTA update process listed a couple posts above.
---------- Post added at 02:25 PM ---------- Previous post was at 02:14 PM ----------
Magisk isn't missing this option, it's just that the method suggested by pbanj in this thread bypasses the normal method. It's not an issue with Magisk, it's an issue with the root method being suggested.
What I really need to do is create another "How to Root" thread and list the normal and recommended method. The confusion comes from people coming to this site and reading pbanj's thread and thinking that is the correct way to root. It is not the correct way to root.
Click to expand...
Click to collapse
googlephoneFKLenAsh said:
Before step 5, flash stock boot.img to slot a (or just use getvar to get the current active slot. It should be slot a before first ota). If you don't flash stock boot img, you will get error message "E: Failed to verify package compatibility".
I think you didn't get this message because you actually restored stock boot.img when you uninstalled magisk. For those who rooted their phone by flashing patched boot.img, magisk doesn't know the location of stock boot.img.
Then in step 7, flash patched boot.img to slot b (after ota, the active changes to slot b. If there is new ota in the future, just use getvar to find out the active slot)
Click to expand...
Click to collapse
googlephoneFKLenAsh said:
Before step 5, you need to fastboot flash stock boot.img before doing "adb sideload ota file".
Click to expand...
Click to collapse
Thanks to all, was not expecting this much reply in this short amount of time, at all.
I made this step by step guide because no dedicated thread really was readily accessible in one place. Hopefully this inspires others to make guides.
googlephoneFKLenAsh said:
Before step 5, flash stock boot.img to slot a (or just use getvar to get the current active slot. It should be slot a before first ota). If you don't flash stock boot img, you will get error message "E: Failed to verify package compatibility".
I think you didn't get this message because you actually restored stock boot.img when you uninstalled magisk. For those who rooted their phone by flashing patched boot.img, magisk doesn't know the location of stock boot.img.
Click to expand...
Click to collapse
How else could the phone have been rooted besides flashing a patched boot image on a device without a custom recovery, such that Magisk on his device knows where to find the stock boot image?
duh1 said:
How else could the phone have been rooted besides flashing a patched boot image on a device without a custom recovery, such that Magisk on his device knows where to find the stock boot image?
Click to expand...
Click to collapse
Learn how to read a few posts in this thread.
Root method 1: install magisk, patch the stock boot image, then flash the patched boot image to gain root. Magisk knows where the stock boot image is. In this case, just follow the instructions to take ota: uninstall magisk to restore stock boot image and take ota, then reroot.
Root method 2: flash patched boot image provided by someone in the forum, then install magisk to get root. In this case Magisk doesn't have a backuped stock boot image. So the regular instructions of uninstalling Magisk to restore stock boot image doesn't work and you need to manually flash stock boot image to take ota.
googlephoneFKLenAsh said:
Learn how to read a few posts in this thread.
Root method 1: install magisk, patch the stock boot image, then flash the patched boot image to gain root. Magisk knows where the stock boot image is. In this case, just follow the instructions to take ota: uninstall magisk to restore stock boot image and take ota, then reroot.
Root method 2: flash patched boot image provided by someone in the forum, then install magisk to get root. In this case Magisk doesn't have a backuped stock boot image. So the regular instructions of uninstalling Magisk to restore stock boot image doesn't work and you need to manually flash stock boot image to take ota.
Click to expand...
Click to collapse
Difference is downloading the patched image vs patching it yourself. Wasn't clear how that created the issue. Well written, thx for pointing it out.
So if anyone patches the new version boot image before uninstalling Magisk, they'll get an error. Likewise, patching the current boot image in the manager will allow the uninstall to work correctly...
googlephoneFKLenAsh said:
Learn how to read a few posts in this thread.
Root method 1: install magisk, patch the stock boot image, then flash the patched boot image to gain root. Magisk knows where the stock boot image is. In this case, just follow the instructions to take ota: uninstall magisk to restore stock boot image and take ota, then reroot.
Root method 2: flash patched boot image provided by someone in the forum, then install magisk to get root. In this case Magisk doesn't have a backuped stock boot image. So the regular instructions of uninstalling Magisk to restore stock boot image doesn't work and you need to manually flash stock boot image to take ota.
Click to expand...
Click to collapse
you dont need to restore stock to update. the restore is only needed if you want the phone to handle the update. if you sideload the ota in adb it updates fine then you can just flash the new patched boot image. also fun little fact, even if you use the pre-patched images you can still use magisk's internal update method. you just have to do one simple thing....... grab the stock boot.img for your current update, and tell magisk to patch it, it will create the stock backup and then you can just use the magisk update method. i've been meaning to add that to my thread but i've been busy and having some health problems so i haven't been on here in a few days.
pbanj said:
you dont need to restore stock to update. the restore is only needed if you want the phone to handle the update. if you sideload the ota in adb it updates fine then you can just flash the new patched boot image. also fun little fact, even if you use the pre-patched images you can still use magisk's internal update method. you just have to do one simple thing....... grab the stock boot.img for your current update, and tell magisk to patch it, it will create the stock backup and then you can just use the magisk update method. i've been meaning to add that to my thread but i've been busy and having some health problems so i haven't been on here in a few days.
Click to expand...
Click to collapse
Sorry for the health issues. Take care and get well soon.
Thank you for this post. I was getting confused about the ADB sideload of OTA (which, iirc, didn't work on unlocked BL on my last phone), which you said does work on the 3a. My last phone was the N5X and despite Magisk being available, I stayed with SuperSu (which worked for me as well as suhide and FlashFire). The dual slot is new to me; I think my MOTO Z3 Play has that (I'm not unlocking that one atm) so it really doesn't matter.
If I fastboot flashed the patched boot.img to slot_b, then the next time I flash any boot.img, I will have to direct it to slot_a [fastboot flash boot_a boot.img]? I guess I'll learn as I go along. Next, I'll take current stock boot.img and tell magisk to patch it.
ritchea said:
Sorry for the health issues. Take care and get well soon.
Thank you for this post. I was getting confused about the ADB sideload of OTA (which, iirc, didn't work on unlocked BL on my last phone), which you said does work on the 3a. My last phone was the N5X and despite Magisk being available, I stayed with SuperSu (which worked for me as well as suhide and FlashFire). The dual slot is new to me; I think my MOTO Z3 Play has that (I'm not unlocking that one atm) so it really doesn't matter.
If I fastboot flashed the patched boot.img to slot_b, then the next time I flash any boot.img, I will have to direct it to slot_a [fastboot flash boot_a boot.img]? I guess I'll learn as I go along. Next, I'll take current stock boot.img and tell magisk to patch it.
Click to expand...
Click to collapse
ya pretty much. every time the phone updates the active slot changes. I'm currently updating my root thread so everything is clearer and in one place.
pbanj said:
you dont need to restore stock to update. the restore is only needed if you want the phone to handle the update. if you sideload the ota in adb it updates fine then you can just flash the new patched boot image. also fun little fact, even if you use the pre-patched images you can still use magisk's internal update method. you just have to do one simple thing....... grab the stock boot.img for your current update, and tell magisk to patch it, it will create the stock backup and then you can just use the magisk update method. i've been meaning to add that to my thread but i've been busy and having some health problems so i haven't been on here in a few days.
Click to expand...
Click to collapse
Just to be sure, sideloading bypasses the OTA package compatibility verification that would give an error during normal update if it detects wrong boot version?
duh1 said:
Just to be sure, sideloading bypasses the OTA package compatibility verification that would give an error during normal update if it detects wrong boot version?
Click to expand...
Click to collapse
correct. i had no issue with it, and i friend is the one who told me about it as that's how she installs her updates even though she could use the magisk method

Categories

Resources