[Q] Unable to update to 5.0.1 via OTA or Sideload - Nexus 5 Q&A, Help & Troubleshooting

Every time there is an OTA update I have this problem.
My Nexus 5 is unlocked and rooted. Every time there is an OTA I get the Android laying down red error message.
Ok fine, I'll manually update with Sideload.
Then I get this error:
"/system/bin/install-recovery.sh" has unexpected contents.
E: Error in /sideload/package.zip
(Status 7)
The last time this happened I had to fully unroot and wipe my phone.
My question is this: Do I have to fully unroot and wipe my phone every single time there is an update? If so, what's the point? Is there a workaround for this that doesn't include wiping my phone every few months when there is an incremental update?

you cannot apply an OTA to a phone that is rooted, you *must* unroot and also undo *every* modification.
save yourself the trouble and just download the factory image and manually flash the new bootloader, radio, system images then you will be up to date. After that just re-root
Lots of tutorials all over the internet for this

Is that flashing via computer?

orthonovum said:
you cannot apply an OTA to a phone that is rooted, you *must* unroot and also undo *every* modification.
save yourself the trouble and just download the factory image and manually flash the new bootloader, radio, system images then you will be up to date. After that just re-root
Lots of tutorials all over the internet for this
Click to expand...
Click to collapse
Ok, then if I don't want to wipe my phone every couple of months I should just not root it, is that safe to assume?

orthonovum said:
you cannot apply an OTA to a phone that is rooted, you *must* unroot and also undo *every* modification.
save yourself the trouble and just download the factory image and manually flash the new bootloader, radio, system images then you will be up to date. After that just re-root
Lots of tutorials all over the internet for this
Click to expand...
Click to collapse
I apologize as I think I misunderstood you.
You're saying that I can download the official OTA, extract the bootloader, radio, and system images using the Nexus Toolbox?
At that point I'll be good to go with the OTA?

Skullpuck said:
You're saying that I can download the official OTA, extract the bootloader, radio, and system images using the Nexus Toolbox?
At that point I'll be good to go with the OTA?
Click to expand...
Click to collapse
No. You download the official 5.0 factory image. Then you extract those files to a computer. And you flash them to your phone using fastboot.
Then after booting up you will be good to go with the OTA.

I just wanted everyone to know that I have fixed the problem with orthonovum's advice.
In case anyone needs step by step advice, check the comment section of this site for Tom's comment on December 19, 2014 at 22:08: http://aaronhastings.me/updating-to-android-5-0-1-on-rooted-nexus-5/
Basically, download the full stock image for 5.0.1, extract it, then just flash the radio, boot, and system images using the NRT.
radio-hammerhead-m8974a-2.0.50.2.22.img
boot.img
system.img

Or just follow the many guides here and use fastboot.
Sent from my Nexus 5 using XDA Premium App

iirc.. This happened because supersu uses/modifies that install-recovery script to exploit stuff.
a maguro wrote this.

Related

[Q] Can you OTA update a Nexus 5 and keep root?

Ok so I just recently got my hands on a Nexus 5 which I rooted with CF Auto Root and relocked the bootloader with Bootunlocker for security (I'm guessing I should unlock before the update). I see reports surfacing of a possible 4.4.3 update in the near future. So before that happens I want to figure out the best practice for updating a N5 with CF Auto Root. It stands to reason I'll do a full backup so that's a given.
I'm not new to rooting. Done it a few times. Just haven't had a device that gets regular OTAs in my country so it hasn't come up.
Is there a way to update so that root is preserved? Obviously I'd like to keep the process as simple as possible but if I have to work from scratch it's not the end of the world.
As I understand it, you can do normal OTA as long as it's stock but you lose root. In that case, does the OTA relock the bootloader or will it stay unlocked? Which then basically means a new root which wipes the device.
Or perhaps it's better to ask what the best procedure for updating a stock Nexus 5 with CF Auto Root.
Everything that you have ever wanted to know about OTA can be found here http://forum.xda-developers.com/google-nexus-5/general/info-nexus-5-ota-help-desk-t2523217
Ah thanks. Appreciate it.
generally no, after ota you lose root. but there are apps that will save your root so that you keep root after an update.
I've been looking at Survival Mode in Super SU and RootKeeper but there seems to be some question as to their success.
Reaper1242 said:
I've been looking at Survival Mode in Super SU and RootKeeper but there seems to be some question as to their success.
Click to expand...
Click to collapse
ive never used any since i dont ota, i update my custom rom as soon as its updated, but ive heard of success with rootkeeper. but it doesnt matter, it literally takes 3 minutes to root a nexus the right way(via fastboot).
Yea, I should use fastboot in future.
Reaper1242 said:
As I understand it, you can do normal OTA as long as it's stock but you lose root. In that case, does the OTA relock the bootloader or will it stay unlocked? Which then basically means a new root which wipes the device.
Click to expand...
Click to collapse
The stock Android OS update will not relock the bootloader. So, once you apply the OTA.zip file in recovery, all you will need to do is reflash the SuperSU, and you are done.
(Note that depending on your system status, you may not be able to apply the OTA.zip directly - for instance, if you have updated/deleted system files etc, in which case, you will first need to go back to stock - refer to the link that @mistahseller provided for details about how to go back to stock)
jj14 said:
The stock Android OS update will not relock the bootloader. So, once you apply the OTA.zip file in recovery, all you will need to do is reflash the SuperSU, and you are done.
(Note that depending on your system status, you may not be able to apply the OTA.zip directly - for instance, if you have updated/deleted system files etc, in which case, you will first need to go back to stock - refer to the link that @mistahseller provided for details about how to go back to stock)
Click to expand...
Click to collapse
you would need to flash a custom recovery first, then supersu in your custom recovery.
Thanks everyone for the responses.You've made everything much clearer.
simms22 said:
you would need to flash a custom recovery first, then supersu in your custom recovery.
Click to expand...
Click to collapse
Good point. I assumed that op had installed a custom recovery when he rooted, but that is not always the case.
Ok so I'm going to sideload myself. Been a while so I just want to confirm the process so I don't screw up.
I'm using TWRP
Obviously I'll do a NANdroid and probably Titanium as well.
1) Unlock bootloader with Bootunlocker
2) Connect device to PC
3) Boot into TWRP recovery and go to Advanced > ADB Sideload
4) type adb sideload update.zip (or whatever I call the file)
5) reboot device and check if it's working
6) reboot to recovery and reflash superuser.zip
I think that's it. Is there anything else I need to be aware of? If I'm right it should then be updated, rooted and in the same state before I updated.
I am in the same situation. I am currently rooted with a unlocked boot loader. When 4.4.3 comes along I plan to upgrade it. I have only rooted and have CWM no custom ROM. I know o cannot perform a OTA update. So do I copy the update zip (4.4.3) and just flash in CWM? Is this correct, and if so do I lose root/ boot loader. Thanks. I have read the thread above but do not understand
Sent from my Nexus 5 using XDA Premium 4 mobile app
dec1153 said:
I am in the same situation. I am currently rooted with a unlocked boot loader. When 4.4.3 comes along I plan to upgrade it. I have only rooted and have CWM no custom ROM. I know o cannot perform a OTA update. So do I copy the update zip (4.4.3) and just flash in CWM? Is this correct, and if so do I lose root/ boot loader. Thanks. I have read the thread above but do not understand
Sent from my Nexus 5 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Flash stock system.img and flash recovery.img and then do the update.zip from the stock recovery..
If you don't want to flash, then make sure you have removed all the modifications you have done to system apps. If you don't remember then I would certainly recommend flashing stock images...
Sent from my Nexus 5 using Tapatalk

How To Update Rooted Pixel to 7.1.1?

Is there a guide to updating a rooted Google Pixel (XL) to 7.1.1 without losing root or having to wipe data? A google search only came back with info on OTA updates for stock/unrooted Pixels. Thank you!
First make sure you have the latest adb/fastboot.. Flash stock "V" boot(if that's what your current firmware is) .. Reboot to recovery.. Download the ota for O from Google.. Follow the directions there to side load the ota. Reboot back to bootloader . Flash twrp boot image , it will boot into twrp. Then install the supersu zip.. Reboot. If you did it correctly it will still be rooted. First boot takes a little while tho.
kyle4269 said:
Flash stock "V" boot(if that's what your current firmware is) .. Reboot to recovery.. Download the ota for O from Google.. Follow the directions there to side load the ota. Reboot back to bootloader . Flash twrp boot image , it will boot into twrp. Then install the supersu zip.. Reboot. If you did it correctly it will still be rooted. First boot takes a little while tho.
Click to expand...
Click to collapse
Thanks Kyle. I'm actually still on NDE63L, so I guess that's the stock image I would need to flash? Could I just use the SkipSoft Android Toolkit to 'UnRoot' and then sideload the NMF26O OTA?
Also as far as flashing twrp goes, is there anything to be concerned about with this XDA warning for the TWRP alpha2? : "TLDR: It's finally here in alpha form, may eat your data, and you will lose SuperSU root if currently installed. READ the install instructions carefully!"
You should be able to just open the flash-all file with WordPad and remove the "-w" and it will not wipe the device when you run flash-all.bat
LotharioRowe said:
Thanks Kyle. I'm actually still on NDE63L, so I guess that's the stock image I would need to flash? Could I just use the SkipSoft Android Toolkit to 'UnRoot' and then sideload the NMF26O OTA?
Also as far as flashing twrp goes, is there anything to be concerned about with this XDA warning for the TWRP alpha2? : "TLDR: It's finally here in alpha form, may eat your data, and you will lose SuperSU root if currently installed. READ the install instructions carefully!"
Click to expand...
Click to collapse
I don't think you can go from L to O using the OTA file. But you can use the full factory image.. Just remove the -w and it won't wipe date like the above comment said.. I still had to flash the original boot for the OTA to install, so I'm assuming you'll have to do that to install the factory image.. I could be wrong though. Then just reroot and you're all set.
kyle4269 said:
I don't think you can go from L to O using the OTA file. But you can use the full factory image.. Just remove the -w and it won't wipe date like the above comment said.. I still had to flash the original boot for the OTA to install, so I'm assuming you'll have to do that to install the factory image.. I could be wrong though. Then just reroot and you're all set.
Click to expand...
Click to collapse
DO you know if you can go from J to O using original factory image and flash it?
bturkel said:
DO you know if you can go from J to O using original factory image and flash it?
Click to expand...
Click to collapse
I just did. No worries.
What about if you have changed the build.prop for the tethering hack? Can you still sideload the OTA?

process of taking OTA while keeping root?

how exactly do i go about doing this. back in the day root was easy to keep while taking OTA updates but now i'm not so sure about that. Is there a safe way to take the 7.1.1 OTA update and keep root? I'm currently on 7.1 build NDE63V. No i'm not using the Verizon variant as i have Sprint and thus don't need to worry about dealing with Verizon's BS.
If someone can please point me in the direction of some kind of guide in taking OTA while keeping root or unrooting, taking OTA and then re-rooting or something along those lines that would be a great help. I have a few videos showing me how to unroot but that requires me to completely wipe my phone it seems, at least with the guides i've found. And i'd rather avoid that if possible.
silvernirvash said:
how exactly do i go about doing this. back in the day root was easy to keep while taking OTA updates but now i'm not so sure about that. Is there a safe way to take the 7.1.1 OTA update and keep root? I'm currently on 7.1 build NDE63V. No i'm not using the Verizon variant as i have Sprint and thus don't need to worry about dealing with Verizon's BS.
If someone can please point me in the direction of some kind of guide in taking OTA while keeping root or unrooting, taking OTA and then re-rooting or something along those lines that would be a great help. I have a few videos showing me how to unroot but that requires me to completely wipe my phone it seems, at least with the guides i've found. And i'd rather avoid that if possible.
Click to expand...
Click to collapse
Download the newest factory image, extract it all. Right click the flash-all.bat and select edit. Scroll to the -w and delete it. Then boot into bootloader and run the flash-all.bat. Then, fastboot boot TWRP RC2 and then flash the RC2 zip (in TWRP) to keep twrpas your recovery. Then flash the latest supersu in TWRP and reboot.
Deleting the -w stops the flash-all.bat from wiping your device. So when you boot again everything is as it was.
k.s.deviate said:
Download the newest factory image, extract it all. Right click the flash-all.bat and select edit. Scroll to the -w and delete it. Then boot into bootloader and run the flash-all.bat. Then, fastboot boot TWRP RC2 and then flash the RC2 zip (in TWRP) to keep twrpas your recovery. Then flash the latest supersu in TWRP and reboot.
Deleting the -w stops the flash-all.bat from wiping your device. So when you boot again everything is as it was.
Click to expand...
Click to collapse
wouldn't this be the same as taking the ota update? or does the ota lock the bootloader?
Echo2Lincoln said:
wouldn't this be the same as taking the ota update? or does the ota lock the bootloader?
Click to expand...
Click to collapse
Ota does not lock the bootloader, but it will not flash if you have a modified system partition or TWRP recovery. It will simply fail. You could do the above steps with the ota file from Google as well.

Update received - flashing via TWRP?

Hey there fellow U11 Users,
I just received the update concerning 60fps HD-Video etc. I use TWRP so the update can't be installed by itself. So I have two questions:
A
Where do I find the update file. I looked around a lot but couldn't locate it.
B
Once found, can I just flash it with TWRP?
Thanks in advance!
Dito13 said:
Hey there fellow U11 Users,
I just received the update concerning 60fps HD-Video etc. I use TWRP so the update can't be installed by itself. So I have two questions:
A
Where do I find the update file. I looked around a lot but couldn't locate it.
B
Once found, can I just flash it with TWRP?
Thanks in advance!
Click to expand...
Click to collapse
See here: https://forum.xda-developers.com/u11/how-to/collection-htcu-u11-ruu-firmware-t3612048/page63
Alright, thanks! :good: That only leaves the first question unanswered.
Dito13 said:
Alright, thanks! :good: That only leaves the first question unanswered.
Click to expand...
Click to collapse
/data/data/com.htc.updater/files
btw...twrp can install the update but you need to flash the firmware.zip inside the ota manually
Thank you kindly!
OMJ said:
/data/data/com.htc.updater/files
btw...twrp can install the update but you need to flash the firmware.zip inside the ota manually
Click to expand...
Click to collapse
Just to be clear: I only flash the firmware.zip manually via TWRP or do I need to flash the whole ota?
Sorry for the question. I mostly handled Nexus devices...
Dito13 said:
Just to be clear: I only flash the firmware.zip manually via TWRP or do I need to flash the whole ota?
Sorry for the question. I mostly handled Nexus devices...
Click to expand...
Click to collapse
twrp will install the ota zip but it wont install the firmware.zip inside, you have to extract & manually install from download mode
grrr.... I tried following your suggestions, but recieved error 7 in TWRP. Can you help me in the right direction?
Dito13 said:
grrr.... I tried following your suggestions, but recieved error 7 in TWRP. Can you help me in the right direction?
Click to expand...
Click to collapse
list your steps your using to install the ota via twrp....personally, I let the system initiate the install (booted into OS) as if I was 100% stock, once twrp loads, it automatically installs except for the firmware.zip
more details here...
OK, I am a Noob to the HTC world. I am used to easy flashing/rooting/etc. on Nexus devices.
TWRP doesn't do anything after accepting the ota. When I try to install the OTA via TWRP I receive Error 7. I worked my way through a lot of guides here on XDA concerning manual OTA installing. One thing I tried was flashing back to stock recovery which I found in the firmware.zip of the OTA in bootloader mode. That failed also ("FAILED (remote: not allowed on PRODUCTION device).
Edit: The device has obviously an unlocked bootloader, s-on, rooted via magisk and is a DGLU device, software number 1.16.400.5
Are you on an Untouched System Image? Completely stock ROM? While it is great we can flash the OTA in TWRP, the system stills needs to be stock, and of course will still have to fastboot firmware.
schmeggy929 said:
Are you on an Untouched System Image? Completely stock ROM? While it is great we can flash the OTA in TWRP, the system stills needs to be stock, and of course will still have to fastboot firmware.
Click to expand...
Click to collapse
Yes, everything is stock.
I managed to flash the stock recovery now. I didn't remember to use the download mode /sorry. Then Then I checked for the ota again, downloaded it and tried to apply but I landed in the stock recovery with the red exclamation mark and then nothing happened.
Dito13 said:
Yes, everything is stock.
I managed to flash the stock recovery now. I didn't remember to use the download mode /sorry. Then Then I checked for the ota again, downloaded it and tried to apply but I landed in the stock recovery with the red exclamation mark and then nothing happened.
Click to expand...
Click to collapse
re-flash twrp and try it again.
schmeggy929 said:
re-flash twrp and try it again.
Click to expand...
Click to collapse
Same result unfortunately. TWRP hands out Error 7 and "system partition has unexpected contents" or something like that although I didn't do any tinkering with the stock rom. I flashed Magisk and did a backup before and that was all.
Dito13 said:
Same result unfortunately. TWRP hands out Error 7 and "system partition has unexpected contents" or something like that although I didn't do any tinkering with the stock rom. I flashed Magisk and did a backup before and that was all.
Click to expand...
Click to collapse
Only thing I would say is start fresh. Backup all the data for your apps first. Flash the RUU, Take the OTA and reinstall all your apps.
schmeggy929 said:
Only thing I would say is start fresh. Backup all the data for your apps first. Flash the RUU, Take the OTA and reinstall all your apps.
Click to expand...
Click to collapse
Thanks again - seems to have worked. It will be interesting to see which problems occur with the Android Oreo update which was announced till the end of the year by HTC

Feb 2019 update now available

Hope by performance fixes they mean memory leak fix.
I have not seen os ram usage this low after boot in many months.
Did you have round corner?
yaral said:
Did you have round corner?
Click to expand...
Click to collapse
It squared it when I screenshot.
Anybody figure out how to turn off the rounded corners?
Anyone know what the modem sucurity patch is about? Kinda don't want to take it cuz of the sim lock issues awhile back.
enigma2446 said:
Anyone know what the modem sucurity patch is about? Kinda don't want to take it cuz of the sim lock issues awhile back.
Click to expand...
Click to collapse
no clue but i fastboot flashed the images because the OTA refused to work, but flashing the images worked. i'm still able to connect to ATT towers from my sprint sim unlocked PH-1.
TomTheGeek3 said:
no clue but i fastboot flashed the images because the OTA refused to work, but flashing the images worked. i'm still able to connect to ATT towers from my sprint sim unlocked PH-1.
Click to expand...
Click to collapse
Noob question here: When using fastboot to flash the update image, do you have to worry about the "slot A" vs "slot B" thing?? Can you provide a little more insight? I've been reading around the forum, and I'm a little worried about bricking my phone! (The bootloader on my phone is unlocked and I've rooted the phone, but I haven't flashed a third-party ROM. The OTA update feature gives me a "couldn't update" message.)
adiejg said:
Noob question here: When using fastboot to flash the update image, do you have to worry about the "slot A" vs "slot B" thing?? Can you provide a little more insight? I've been reading around the forum, and I'm a little worried about bricking my phone! (The bootloader on my phone is unlocked and I've rooted the phone, but I haven't flashed a third-party ROM. The OTA update feature gives me a "couldn't update" message.)
Click to expand...
Click to collapse
No you don't have to worry about it. The flash all file in the zip will do all the work for you. It wont take update via ota because you have to be on the stock boot.img. the stock boot img has the recovery built into the ramdisk there for if your rooted then there is no stock recovery to use for ota. Be cautious because flashing via fastboot will wipe the phone.
enigma2446 said:
No you don't have to worry about it. The flash all file in the zip will do all the work for you. It wont take update via ota because you have to be on the stock boot.img. the stock boot img has the recovery built into the ramdisk there for if your rooted then there is no stock recovery to use for ota. Be cautious because flashing via fastboot will wipe the phone.
Click to expand...
Click to collapse
If I edit the .bat file and remove "format userdata", that will prevent the wipe?
njsges said:
If I edit the .bat file and remove "format userdata", that will prevent the wipe?
Click to expand...
Click to collapse
It should without issues but always prepare for hickups.
Anyone else having issues when trying to update to the February release? I tried to sideload the OTA update and that kept giving me the error "adb sideload failed to read command: no error" and then I decided to follow Morphius's suggestion here to just unroot my device by flashing to stock bootloader in order to try to take the OTA update and that OTA keeps failing as well. Anyone else having this issue?
hssxda said:
Anyone else having issues when trying to update to the February release? I tried to sideload the OTA update and that kept giving me the error "adb sideload failed to read command: no error" and then I decided to follow Morphius's suggestion here to just unroot my device by flashing to stock bootloader in order to try to take the OTA update and that OTA keeps failing as well. Anyone else having this issue?
Click to expand...
Click to collapse
Are you rooted?
After three days running, memory Leak not fixed.. Bummer
enigma2446 said:
No you don't have to worry about it. The flash all file in the zip will do all the work for you. It wont take update via ota because you have to be on the stock boot.img. the stock boot img has the recovery built into the ramdisk there for if your rooted then there is no stock recovery to use for ota. Be cautious because flashing via fastboot will wipe the phone.
Click to expand...
Click to collapse
Again, a very noob question, (and I do apologize) but can I use something like Titanium Backup to make sure I can restore all my apps the way they were after I flash the update via fastboot? Reinstalling everything seems like a gigantic pain in the backside.
adiejg said:
Again, a very noob question, (and I do apologize) but can I use something like Titanium Backup to make sure I can restore all my apps the way they were after I flash the update via fastboot? Reinstalling everything seems like a gigantic pain in the backside.
Click to expand...
Click to collapse
Titanium Backup used to require root access. You probably need to be rooted before you update via fastboot and run the backup through Titanium Backup. Then you will need to copy your backup files to a computer because fastboot flashing will erase your phone data. Next apply the fastboot update, root again, copy your backup back to the phone and restore your backup.
enigma2446 said:
Are you rooted?
Click to expand...
Click to collapse
I was but I followed all the proper steps but for some reason this morning my computer wouldn't real the OTA zip file. I tried it tonight using a different USB port on my laptop and it is worked first time... so weird...
d14r1 said:
After three days running, memory Leak not fixed.. Bummer
Click to expand...
Click to collapse
I don't have memory leak anymore..
1.5gb ram not in usage.
The last time I restarted my phone was after the update.
I'm using my Essential 'phone in the UK having recently purchased it used. On the 7th I had a notice to say that an update was available. When I tried to install it it downloaded, but refused to install saying: Couldn't update... installation problem. As far as I know the 'phone is running the stock software but I noticed that no updates had been installed since October 2018. I unchecked 'allow bootloader unlocking' in case that was the issue, but still couldn't perform the update.
I went onto the Essential website and downloaded the OTA image to my iMac, then, following the guide, sideloaded the update on to the 'phone. This worked well and I now have an updated PH-1. I'll have to see if March's update now installs correctly or not.
so.... am i reading this right... and here is my thinking...
to keep root and still take the OTAs
- go to Essentials site and download the image zip
- (to keep root) copy boot.img to your device, patch it through magisk, then copy it back to your ota folder.
- open flashall.bat, comment the format userdata (to keep your data), change the boot.img line to patched_boot.img
- run flashall.bat
- profit

Categories

Resources