Easily Apply OTA Update To Rooted Nexus 6

Search This thread

bitpushr

XDA:Administrator
  • I had a hard time finding this information, so thought I would post a new thread!

    After you root your phone, even if using standard recovery, the OTA updates will no longer install. You may get the notifications, but after it reboots to install, you will get a failed notification. Even if you uninstall root. This is because if there is any change to the system image at all, the OTA update will fail.

    To install it is actually easy, just requires some legwork. I assume you understand what the bootloader is, and what adb and fastboot tools are since your phone is already rooted. If you used a toolkit, there are plenty of guides on XDA on how to install these tools manually.

    Step 1 - Collect Needed Files:

    Visit the Google System Images page and download the image for your existing ROM. Check your About Device page to get the exact ID, it should say something like LVY48E.

    Extract the system.img file so you can flash it later.

    Download the OTA image. All OTA images are listed on the Nexus 6 OTA Images thread. Find the file which upgrades "From" your current ROM id. It will only work if from matches your current image version. It will be named something like 2bef78c4a5ec8dbaa3df9d94e78af8622cd2a394.signed-shamu-LVY48F-from-LVY48E.2bef78c4.zip, and this file in particular flashes to the new LVY48F version from LVY48E version.

    Step 2 - Flash Stock System Image:

    This step replaces your system image with the stock system image. This will not delete your apps or other personal data, only the information stored on the system partition. The only exception is if you rooted and stored any data on this partition. Plug your phone into your computer. There is no way to do this without a PC.

    Reboot into bootloader mode either from booting with POWER+VOLDOWN or via adb:

    Code:
    adb reboot bootloader

    and flash the image

    Code:
    fastboot erase system
    fastboot flash system system.img

    At this point your system is stock again (unrooted).

    Step 3 - Flash Update Image:

    Enter the recovery mode. You can also do this via TWRP but I will cover with stock recovery. Press Volume Up/Down until you see RECOVERY and press power to choose. You are now in recovery.

    Press and hold Power and tap Volume Up once to get the recovery menu. Then use Volume Up/Down to select "apply update from ADB" and then Power to select

    I had to unplug and plug my phone back in at this point to get it to show up to adb. You can confirm it is visible with the command adb devices.

    Apply the OTA update file using the following command, replacing the file name with your own:

    Code:
    adb sideload 2bef78c4a5ec8dbaa3df9d94e78af8622cd2a394.signed-shamu-LVY48F-from-LVY48E.2bef78c4.zip

    After a few minutes the sideload will complete, the phone will reboot and optimize apps, and you can verify the update worked by checking your about system page again.

    To root your device again, re-install SuperSU and you're good to go.
     

    hayzooos

    Senior Member
    Mar 10, 2011
    2,088
    513
    Illinois
    I actually just asked about this in the T-Mobile thread, but thanks for making this. My question is, when installing system.img is there anything else you NEED to flash as well, specifically boot and/or cache?

    Google has the latest stock image for T-Mobile so I was planning on flashing system and radio, but I wasn't sure if there was anything else required when flashing system.img.

    I know I don't want recovery or userdata as that would replace TWRP and all my data, so I'd of course leave those out.
     

    bitpushr

    XDA:Administrator
  • I actually just asked about this in the T-Mobile thread, but thanks for making this. My question is, when installing system.img is there anything else you NEED to flash as well, specifically boot and/or cache?

    Google has the latest stock image for T-Mobile so I was planning on flashing system and radio, but I wasn't sure if there was anything else required when flashing system.img.

    I know I don't want recovery or userdata as that would replace TWRP and all my data, so I'd of course leave those out.

    Nope, system.img was all that I flashed, verified it worked fine with just that.
     
    • Like
    Reactions: hayzooos

    falconfox

    Member
    Dec 19, 2012
    24
    1
    Thanks for this guide. I've been trying to figure out how to do this exact thing. When I do the command:
    adb sideload 4458964f84d2e44ecd2c1c31c301d47eec4b080e.signed-shamu-LMY48M-from-LMY48I.4458964f
    it gets to about 50%, then gives a Error message,
    E:Error in /sideload/package.zip (Status 7) Installation aborted.

    Any suggestions?
     

    photolarry

    Senior Member
    Jan 17, 2010
    804
    135
    Los Angeles CA
    I did this successfully

    Thanks for the guide. Does it wipe all the data and files in internal storage?

    I wanted to say thanks first of all for putting this up. It helps those rooted users out there that do actually want security patches applied to the system image. To answer the question above, No it does not wipe data or storage if you follow the instructions to only modify /system partition.

    A note about the LMY48M update file and the above comments in the OP : This update changes the kernel (in other words), the boot.img file as well. So if you have flashed a non-stock kernel, you will need to go back to stock during the update (and I suggest just leaving it). That is the partition called boot where boot.img lives. It mainly is the kernel. The way to go back to stock (say if you flashed franco with the FKupdate tool and did not do it manually) is to simply do like above and flash it from the factory image he mentions above for 48I file.
    You reboot to the bootloader (*I assume you know how*) with power and vol down button. And then the following command after flashing system.img:

    fastboot flash boot boot.img

    This takes you to stock LMY48I and should allow you to update now to 48M. I learned this by watching the update failure messages as well as noticed it has boot.img changed in the zip file. Hope this helps others. :good:
     
    • Like
    Reactions: torecdude

    jase33

    Senior Member
    Jul 29, 2010
    1,646
    1,762
    - /
    When I do the command:
    it gets to about 50%, then gives a Error message, Any suggestions?

    I'm having the exact same issue/error. Already tried new USB ports and cables.


    Open the update .zip file and go to META_INF > COM > GOOGLE > ANDROID. You will find the "updater-script" file.

    Open that file using a text editor like notepad or notepad++ and delete the following text; starting from "assert ....... till the semicolon of the last getprop command.

    Place that file back into the update .zip file and reflash. This should remove the status 7 error.
     

    confused2much

    Member
    Apr 21, 2011
    15
    1
    Open the update .zip file and go to META_INF > COM > GOOGLE > ANDROID. You will find the "updater-script" file.

    Open that file using a text editor like notepad or notepad++ and delete the following text; starting from "assert ....... till the semicolon of the last getprop command.

    Place that file back into the update .zip file and reflash. This should remove the status 7 error.

    I'll try this now, thanks for the response!
     

    jase33

    Senior Member
    Jul 29, 2010
    1,646
    1,762
    - /
    Honest question: why would you flash a system image and an ota when you could just flash the new system image?

    By flashing just the current system image your data stays in tact. Then you can take the OTA, it will see the system image unmodified, and it will update everything for that new version without wiping data.
     

    confused2much

    Member
    Apr 21, 2011
    15
    1
    Open the update .zip file and go to META_INF > COM > GOOGLE > ANDROID. You will find the "updater-script" file.

    Open that file using a text editor like notepad or notepad++ and delete the following text; starting from "assert ....... till the semicolon of the last getprop command.

    Place that file back into the update .zip file and reflash. This should remove the status 7 error.

    I do not have the text "assert" anywhere in that file....
     

    sansnil

    Senior Member
    Dec 6, 2007
    526
    249
    By flashing just the current system image your data stays in tact. Then you can take the OTA, it will see the system image unmodified, and it will update everything for that new version without wiping data.
    Easier to just flash the new system image that gets you to the same place as the OTA.
     
    • Like
    Reactions: electricpete1

    hayzooos

    Senior Member
    Mar 10, 2011
    2,088
    513
    Illinois
    Honest question: why would you flash a system image and an ota when you could just flash the new system image?

    I was wondering this same exact thing, but I was assuming it was because the OTA was hitting people before that matching Google Factory Image was available. This would bring you almost back a version (to being stock) so you could take the OTA.

    If the OTA is to match the same Factory Image you can get from Google, I have no idea why you'd do both steps.
     

    gohamstergo

    Senior Member
    Mar 6, 2010
    1,225
    353
    I was wondering this same exact thing, but I was assuming it was because the OTA was hitting people before that matching Google Factory Image was available. This would bring you almost back a version (to being stock) so you could take the OTA.

    If the OTA is to match the same Factory Image you can get from Google, I have no idea why you'd do both steps.

    I think the only reason to do both steps is to apply the update ASAP. If you are ok waiting, then only flash the new system.img. That's definitely what I always do. I don't mind waiting. I have Google Play Services notifications hidden now anyway, so those update notifications don't show up and bug me.

    Thanks for the walk through though, @bitpushr, I'm sure many can make use of it.
     

    archbox

    Senior Member
    Jun 27, 2014
    92
    7
    Phoenix, AZ
    I do not have the text "assert" anywhere in that file....

    Honestly, you shouldn't edit those files as that can be dangerous, and disabling the filesystem check can be dangerous, and it probably won't work because then the zip would fail signing verification.

    If you followed all of the instructions in OP and still get error 7, try, on top of erasing and flashing the stock system.img, also extract and erase then flash boot.img and recovery.img. You will get error 7 if your recovery and kernel (boot.img) aren't stock.
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 17
      I had a hard time finding this information, so thought I would post a new thread!

      After you root your phone, even if using standard recovery, the OTA updates will no longer install. You may get the notifications, but after it reboots to install, you will get a failed notification. Even if you uninstall root. This is because if there is any change to the system image at all, the OTA update will fail.

      To install it is actually easy, just requires some legwork. I assume you understand what the bootloader is, and what adb and fastboot tools are since your phone is already rooted. If you used a toolkit, there are plenty of guides on XDA on how to install these tools manually.

      Step 1 - Collect Needed Files:

      Visit the Google System Images page and download the image for your existing ROM. Check your About Device page to get the exact ID, it should say something like LVY48E.

      Extract the system.img file so you can flash it later.

      Download the OTA image. All OTA images are listed on the Nexus 6 OTA Images thread. Find the file which upgrades "From" your current ROM id. It will only work if from matches your current image version. It will be named something like 2bef78c4a5ec8dbaa3df9d94e78af8622cd2a394.signed-shamu-LVY48F-from-LVY48E.2bef78c4.zip, and this file in particular flashes to the new LVY48F version from LVY48E version.

      Step 2 - Flash Stock System Image:

      This step replaces your system image with the stock system image. This will not delete your apps or other personal data, only the information stored on the system partition. The only exception is if you rooted and stored any data on this partition. Plug your phone into your computer. There is no way to do this without a PC.

      Reboot into bootloader mode either from booting with POWER+VOLDOWN or via adb:

      Code:
      adb reboot bootloader

      and flash the image

      Code:
      fastboot erase system
      fastboot flash system system.img

      At this point your system is stock again (unrooted).

      Step 3 - Flash Update Image:

      Enter the recovery mode. You can also do this via TWRP but I will cover with stock recovery. Press Volume Up/Down until you see RECOVERY and press power to choose. You are now in recovery.

      Press and hold Power and tap Volume Up once to get the recovery menu. Then use Volume Up/Down to select "apply update from ADB" and then Power to select

      I had to unplug and plug my phone back in at this point to get it to show up to adb. You can confirm it is visible with the command adb devices.

      Apply the OTA update file using the following command, replacing the file name with your own:

      Code:
      adb sideload 2bef78c4a5ec8dbaa3df9d94e78af8622cd2a394.signed-shamu-LVY48F-from-LVY48E.2bef78c4.zip

      After a few minutes the sideload will complete, the phone will reboot and optimize apps, and you can verify the update worked by checking your about system page again.

      To root your device again, re-install SuperSU and you're good to go.
      2
      While I think this is a good guide I suppose, I'm pretty sure it's just easier to use fastboot for everything. I flash the images and TWRP and root. Pretty easy once you try it
      Or just do it all through Nexus Root Toolkit - much easier, quicker and less prone to error.
      2
      I do not have the text "assert" anywhere in that file....

      Honestly, you shouldn't edit those files as that can be dangerous, and disabling the filesystem check can be dangerous, and it probably won't work because then the zip would fail signing verification.

      If you followed all of the instructions in OP and still get error 7, try, on top of erasing and flashing the stock system.img, also extract and erase then flash boot.img and recovery.img. You will get error 7 if your recovery and kernel (boot.img) aren't stock.
      1
      I actually just asked about this in the T-Mobile thread, but thanks for making this. My question is, when installing system.img is there anything else you NEED to flash as well, specifically boot and/or cache?

      Google has the latest stock image for T-Mobile so I was planning on flashing system and radio, but I wasn't sure if there was anything else required when flashing system.img.

      I know I don't want recovery or userdata as that would replace TWRP and all my data, so I'd of course leave those out.

      Nope, system.img was all that I flashed, verified it worked fine with just that.
      1
      Is it safe to apply the OTA via TWRP?

      I've just unrooted my nexus 6 (on 6.0) to get the 6.0.1 by flashing the system stock firmware image, but at the moment I'm not sure of what to do:

      Can I just simply now install the OTA from the system menu? Or do I have to erase TWRP recovery, and restore the stock one, since on the TWRP' site it is written that they don't support OTA updates?

      Thanks in advance to everyone!

      Ok, so you know how to flash images...you did that to get back to stock.

      Do it again, but flash the latest image. Skip flashing the user partition and you will keep your data and apps. Then flash twrp again then reroot.

      That is what I and most people do each month when Google updates.