yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] cardula:
FAILED() error after flashall.bat script after erasing userdata...

Hi

Just performed the ritual of flashing the 5.1.1 LMY48B factory image onto my N5, all went well until the script tried sending userdata.img, which labelled the file as 0 bytes so it failed. It was no big issue since everything else flashed ok, and since the script failed, I was able to manually reboot into stock recovery and format /cache and /data, rebooted and everything seems ok so far.

-I checked the md5 of the factory image, all OK there

-I was able to manually extract the userdata.img file from the image-hammerhead-lmy48b.zip file, (with a size of 140,614,528 bytes)

-I've flashed many factory images from this PC before on a few Nexus devices, with the only issue ever being the unable to allocate memory issue after flashing bootloader/radio (which for me a reboot of my PC is enough to fix.), but this is a new one.

Anyone else had this error? Again, not too worried about it as everything seems to have flashed OK, just thought I'd post it in case someone else had it happen. I doubt it's anything I've done wrong, and I'm not too worried about it.

Just my $.02, a bit disappointed with Google since the 5.0 release. I've been using Android since 2011 with the 4.0 launch, ICS had its issues but was certainly better than L so far. Now all my devices are running custom ROMs, except my N5. If my issues aren't fixed with 5.1.1, I'll also be ROM shopping for it as well. But, I'm a bit understanding, as a new runtime and a huge OS revamp are bound to have bugs/issues.
[Nexus 5 General] Nnyan:
Thank you! I have the following:

Total Space: 26.76GB

I'm hoping that's fine.
[Nexus 5 General] gian569:
deleted
[Nexus 5 General] Pig Vomit:
Many people have had this problem and similar problems (especially getting a byte size error while flashing system.img) ever since 5.0. I've read about and tried lots of possible fixes, none of them worked for me, regardless of whether it was my primary machine (Win 8.1) or my secondary machine (Win 7), whether I used Command or Windows PowerShell, Chrome open or closed, etc.

If you truly want a nice clean flash, just use the secondary method outlined in the beginning of this thread, as it accomplishes the exact same thing as flash-all.bat. Or, do what I did......set up a machine to dual boot Linux, read up on it, and flash via flash-all.sh in Terminal, as that worked for me no problem.
[Nexus 5 General] cardula:
Yeah, I experienced the system.img error when trying to flash 5.1, and for me a reboot and re-flash fixed it (Win7). Personally, I believe it's a RAM thing specific to Windows causing these strange fastboot errors. Windows, being Windows, even when it has enough memory just sometimes refuses to load that much data into RAM. I think it's because these factory images are so much larger than the KitKat or earlier ones, as I, along with many others, haven't seen these errors before Lollipop came out. Makes sense that Method 2 and/or a Linux flash shouldn't have such issues on a machine with lots of RAM and reliable hardware.
[Nexus 5 General] ivanferdino:
use this "fastboot flash cache cache.img" command before or after you use this"fastboot erase cache"?

so the order is this:

1. fastboot flash cache cache.img

2. fastboot erase cache

or erase cache first then flash cache.img?
[Nexus 5 General] wafflecoptor:
I get stuck at flashing the radio, just sits there at "writing..." on the phone.

On command prompt it finishes.

any help appreciated.
[Nexus 5 General] mtabreu:
My Nexus 5 is stuck on Google Logo, if i do this method 2 on the first page , the OTA updates will still work on the future ?
[Nexus 5 General] :
Yup. You'll be pure stock. So unless you flash a custom recovery and make system changes again.. ...ota should work just fine. :good:
[Nexus 5 General] yerfenuj:
Hi, how to excecute .bat file and how come i dloaded 5.1.1 when i extracted it using winrar. it came out with just one file?
[Nexus 5 General] Ali_Tarlani:
Can anyone please upload stock recovery.img extracted from "hammerhead-lmy48b-factory-596bb9c1.tgz"?? I need it but I don't have whole factory image :(
[Nexus 5 General] walpurgisnacht30:
https://play.google.com/store/apps/details?id=com.cgollner.flashify
[Nexus 5 General] dmonleo:
^^^Nice! In my Tony Baker comedian voice "I never knewwww!"
[Nexus 5 General] Prodeje79:
My phone is completely stock. It has never been rooted or a customer recover nor a custom ROM loaded. Via OTA, I am on the newest 5.1.1. In an effort to fix my bluetooth. I want to flash an older factory image. Thinking will try hammerhead-krt16m. I have it all extracted and ready to go.

I installed adb and fastboot drivers.

I got the factory image ready to go. (4.4)

Now I am unlocking the boot loader as noted. This is where I'd like some confirmation.

http://xdaforums.com/google-nexus-5/general/guide-nexus-5-how-to-unlock-bootloader-t2507905

Do I just do the step 1 here "1. Unlocking Bootloader" . Meaning I do not do anything else here, such as "2. Installing a Custom Recovery". Basically I jump back to this thread "Flashing the factory images" into Method 1 or Method 2?

Also, upon reading recent responses, there is an additional step to do since 5.1? Basically the post noting "fastboot erase cache"

I am talking about this specific post http://xdaforums.com/showpost.php?p=61059365&postcount=1934

It says "Just one additional step is required:

Code:

fastboot flash cache cache.img

"

I don't want to mess things up! Thanks!
[Nexus 5 General] mosaiques:
Hi there!

I'm trying to restore my Nexus 5 to the factory image (Lollopip 5.1.1) because I had the 12.5GB issue (I have a 32GB model)

I've tried everything and nothing seems to work.

I've downloaded the factory image and I got the "update package missing system.img" error and I've tried to flash separately as many tutorials said and the result was the same, still 12.5GB

I've tried to go back to KitKat 4.4.4 with Nexus Root Toolkit. I worked, but now I've only 26.7 instead of 32GB.

I'm still trying to flash to Lollipop 5.1.1 and I get the same error: "update package missing system.img"... :crying:

Guys, I'm stuck, please help!!!

Thanks in advance.
[Nexus 5 General] salvorhardin80:
You're not going to get the full 32gb since you lose some space to android. To get it to show your full available space after flashing the stock rom, boot into stock recovery and wipe data and cache. Once it boots it should show the correct amount of free space. That's the only way it works for me. Around 27gb free sounds about right. As far as the errors you've received, I've never had those so I can't help you with that.
[Nexus 5 General] mosaiques:
I see.

Thanks for your answer. I'll try that!
[Nexus 5 General] salvorhardin80:
As long as you can get 5.1.1 flashed correctly it should work. Usually as soon as I'm done flashing the system images I reboot into bootloader and then boot into stock recovery and wipe data.
[Nexus 5 General] mosaiques:
Thanks!

It's working now. 26.7GB... I think I had more space with previous lollipop versions... :rolleyes:

I've stopped flashing some time ago, this storage issue is kinda new, it wasn't there in previous Lollipop releases and I got confused.

Greetings!
[Nexus 5 General] maurocds:
fastboot flash bootloader C:\hammerhead-lmy48b/bootloader-hammerhead-hhz12h.img

fastboot reboot-bootloader

fastboot flash radio C:\hammerhead-lmy48b/radio-hammerhead-m8974a-2.0.50.2.26.img

fastboot reboot-bootloader

fastboot flash system C:\hammerhead-lmy48b/system.img

fastboot flash userdata C:\hammerhead-lmy48b/userdata.img

fastboot flash boot C:\hammerhead-lmy48b/boot.img

fastboot flash recovery C:\hammerhead-lmy48b/recovery.img

fastboot erase cache

used this manually to flash 5.1.1 sucesfully
[Nexus 5 General] Prodeje79:
This still gives the same errors as noted in the posthttp://xdaforums.com/showpost.php?p=61059365&postcount=1934 !!!!!!!!!!!!!!! :eek:

Here is what I'd like to know exactly:

Does the line "fastboot flash cache cache.img" go right before or right after "fastboot erase cache"

also the commands below don't work as the slashes don't match up. They all need to be '\' and not '/'

---------- Post added at 02:59 PM ---------- Previous post was at 02:08 PM ----------

I created some updated instructions that worked for me. The old instructions posted here didn't work for me. I found myself in a color spiral loop after rebooting.

I received those cache errors as noted in posthttp://xdaforums.com/showpost.php?p=61059365&postcount=1934

Within the bootloop, I held down my power button until it rebooted, I then booted it in fastboot by pressing and holding Power Button + Volume Down at the same

time..... then I started over as follows.....

1. Create a folder named androidimage off of your root C drive. Path will be C:\androidimage\

2. Extract the image-hammerhead-xxxxxx.zip into it.

3. Move the appropriate "bootloader-hammerhead-XXXXXX.img" into C:\androidimage\ and rename it to just bootloader.img

4. Move the appropriate "radio-hammerhead-XXXXXX.img" into C:\androidimage\ and rename it to just radio.img

5. Now fire up your CMD window, navigate to your AndroidSDKSlim (or whatever you are using), and fire away the commands:

fastboot flash bootloader C:\androidimage\bootloader.img

fastboot reboot-bootloader

fastboot flash radio C:\androidimage\radio.img

fastboot reboot-bootloader

fastboot flash system C:\androidimage\system.img

fastboot flash userdata C:\androidimage\userdata.img

(Note: this command will wipe your device (including /sdcard), EVEN if your bootloader is already unlocked.)

fastboot flash boot C:\androidimage\boot.img

fastboot flash recovery C:\androidimage\recovery.img

fastboot erase cache

fastboot flash cache C:\androidimage\cache.img

6. After everything finished, select "Recovery" using the volume buttons.

7. When a small Android appears, press Power Button + Volume UP.

8. Select "Wipe data/factory data reset"

9. Reboot. Your phone should be stock.

10. Proceed with "Optional, but necessary for warranty purposes - Locking your bootloader+ Resetting the tamper flag" if you wish.

11. Don't forget to read this section if this happens: "32 GB phone now shows 16GB?" http://xdaforums.com/showpost.php?p=47156078&postcount=2
[Nexus 5 General] maurocds:
well it worked for me just as i said, even using / and \

i guess it is about the adb files you use or something
[Nexus 5 General] Pig Vomit:
From Android Police:

[Android M Feature Spotlight] Fastboot Fixes Notorious "missing system.img" Bug, Adds 'Flashing' Commands And Cleaner Syntax For reboot-bootloader
[Nexus 5 General] muzaffarkhan95:
is it necessary to copy paste the files extracted from the FACTORY IMAGE in the adb n fastboot folder??? or i can run the flashall.bat from any disk of my pc???
[Nexus 5 General] Prodeje79:
The option one using the flashbat didn't work correctly for me on the latest images. The method 2 didn't either. I had to do an additional step. I spelled it out a couple posts ago. These steps exactly worked fine.
[Nexus 5 General] Pig Vomit:
I would be nice if someone is going to use flash-all.bat if someone would grab the new fastboot (see my post #1951, above) for M Preview and try to use it with factory 5.1.1 to see if it works on a machine where old fastboot doesn't.

If there's an updated factory image released soon (as there might be) I'll do it myself, but if someone else is flashing anyway, please give it a try.
[Nexus 5 General] dreamer94:
I have a question regarding to flashing process using fastboot.

I always use flash-all.bat script to flash images to my Nexus 5. Sometimes, when I use this script, I see a 'warning'. While re-partitioning, there's a line in command panel saying 'Cannot read image'. Althought the process goes successfully, I noticed that, when i get that 'cannot read image' warning, the userdata.img is not sending to device. It's like;

erasing System..

sending System..

writing System..

erasing userdata..

erasing cache..

sending cache..

writing cache..

As you see it erases userdata but it's not sending the new one. And this surprisingly happens while I'm using flash-all script...

What could be the problem? Sometimes I get that 'cannot read image' warning, sometimes i don't. When I don't get that, it sends userdata..
[Nexus 5 General] iNishinKareem:
Will this work if i got custom kernal like ElemtalX?

Will this work if i got custom kernal like ElemtalX?
[Nexus 5 General] coolek33:
Yes, it will work.
[Nexus 5 General] billy662:
Thanks for that, it does help a lot:)
[Nexus 5 General] bigblue95z:
Following this guide using the factory image from Google, 5.1.1, I'm getting an error flashing system.img.

C:\AndroidFastboot>fastboot erase system

erasing 'system'...

OKAY [ 0.967s]

finished. total time: 0.967s

C:\AndroidFastboot>fastboot reboot-bootloader

rebooting into bootloader...

OKAY [ 0.016s]

finished. total time: 0.016s

C:\AndroidFastboot>fastboot flash system C:/AndroidFastboot/system.img

load_file: could not allocate 1046266608 bytes

error: cannot load 'C:/AndroidFastboot/system.img'

Not sure where to go from here.... It's the 32gb, coming from LiquidSmooth. Radio, bootloader seem to flash OK. Thought doing the system wipe would do the trick, but no dice. Any advice?
[Nexus 5 General] Primokorn:
Is fastboot up-to-date?

Try Method 2 and check the file names and their path.

Here are 2 tricks that should work:

http://xdaforums.com/showthread.php?p=60881211&postcount=20

http://highonandroid.com/android-sm...re-error-could-not-allocate-1778070480-bytes/
[Nexus 5 General] Prodeje79:
I noted this in one of my posts above and/or PMed the OP about the syntax. Your slash is the wrong direction. That being said, I highly recommend that you don't use those instructions at all due to missing another line of code. Please see my post for full correct instructions.

Here it is:

http://xdaforums.com/showpost.php?p=61420722&postcount=1949
[Nexus 5 General] TonyStark R.I.P.:
[MENTION=4346614]abaaaabbbb63[/MENTION]

Please advise to tutorials accuracy at the moment.

Thank you,

TonyStark
[Nexus 5 General] Pig Vomit:
Regarding flash-all.bat and system.img errors, per Android Police, the latest version of Platform-Tools (and specifically, adb and fastboot) released with M Preview is supposed to resolve these problems. Will someone getting these errors please try the new platform-tools and reply back? I have not yet tried this myself.

Attached is the latest version (zipped), just downloaded this morning from Android SDK, Revision 23rc3.

UPDATED 07/14/2015: I got sick of begging for others to try this, and I was having minor problems that only a factory reset would fix, so I tried this myself.

IT DOES NOT WORK. So it appears they've solved the problem for M Preview, but NOT for 5.1.1 LMY48B. As such, I've removed the platform-tools attached to this message.
[Nexus 5 General] bigblue95z:
I don't think that is has to do with the slashes as it found the bootloader and radio no problem and flashed them as expected. It also appears to have found the system.img as that is the correct size of system.img it is trying to allocate. I will be trying the updated platform-tools and see if that gets me anywhere. I just downloaded the version I have from Google in the last couple months as it's a new laptop.
[Nexus 5 General] Prodeje79:
Dude, its clear as day in your post. All slashes in DOS need to be \ . The one lime that didn't work was using the wrong slash of / .

My instructions will work. The OP instructions haven't been updated in a long time and never worked due to the / slash will never work.......

And sorry Mr pig vomit, no one wants to try that for some reason. I may try next time I flash.
[Nexus 5 General] bigblue95z:
I'll try it, but I'm not buying it. It found and flashed the bootloader and radio using that syntax. It doesn't say it can't find the path, it says it can't allocate that room. I got the path wrong due to typo on bootloader the first time and it explicitly said that it couldn't find the image. It clearly found it if it's showing the correct file size it's trying to allocate. We'll see in an hour when I get home.....

Yeah, not a bit of difference, dude.

C:\AndroidFastboot>fastboot devices

04852d7c251fb952 fastboot

C:\AndroidFastboot>fastboot flash system C:\AndroidFastboot\system.img

load_file: could not allocate 1046266608 bytes

error: cannot load 'C:\AndroidFastboot\system.img'

So another update. I flashed the 4.4.4 just fine. But ANY 5.x fails with the same error about "could not allocate xxxxxxxx bytes" for the system partition.

Is there a way to find partition sizes, or is there an update that re-partitions? 4.4.4 went just fine, 5.x+ fails.

I'm doomed to be on 4.x. Lol!

Has anyone encountered this?

One more:

Sitting on 4.4.4 freshly flashed factory image, checked for updates and got the 5.0.1 OTA notification. Downloaded it, but when it rebooted, it failed with Andy on his back with red triangle. Failed.
[Nexus 5 General] Prodeje79:
OK just note that the slash / used by op and you will never work....

Never seen this issue. I would recommend redownloading and reextracting the files, perhaps with antivirus software off. Follow my procedure exactly too.

GL
[Nexus 5 General] abaaaabbbb63:
Sorry, I have been very busy lately with exams and trying to get into university. I corrected the slashes in the thread (back in my day, slash type didn't matter :D ) I also added a "fastboot flash cache.img" at the end of the process, as I've been told by [MENTION=1451244]Prodeje79[/MENTION] that it is necessary to do in the newer Android versions.

Is there anything else I can correct?
[Nexus 5 General] Prodeje79:
I think that's it!

Oh wait, check under the "32 GB phone now shows 16GB?" post, I think that is a repost of method 2?

An additional thought, people are having to do method 2 as method 1 isn't working. Pigvomit advised that in Android M method 1 may begin working again..........
[Nexus 5 General] abaaaabbbb63:
The erase part usually does the trick. That's the difference.

So method 1 isn't working with lollipop? Weird. Is there something wrong with the script?
[Nexus 5 General] muzaffarkhan95:
when m flashing 5.1.1 factory image on my nexus 4, it says ERROR : UPDATE PACKAGE MISSING SYSTEM.IMG .......then it says press any key to exit :/ what shud i do???
[Nexus 5 General] Prodeje79:
what method are you using?

Due to the batch file method 1 not working since 5.x, I'd recommend doing method 2.

Technically speaking, this thread is for returning to stock and NOT flashing ahead to M.
[Nexus 5 General] Pig Vomit:
Use the newest version of platform-tools (new fastboot) that has been released with M Preview. Attached is a copy. It has supposedly fixed the problem, and I haven't been able to get anyone to test it on 5.1.1 (I don't want to wipe my phone until an updated factory ROM is released or I would do it myself). This version was downloaded this morning through Android SDK Manager, platform-tools Revision #23rc4. Please try it and report back.

UPDATED 07/14/2015: I got sick of begging for others to try this, and I was having minor problems that only a factory reset would fix, so I tried this myself.

IT DOES NOT WORK. So it appears they've solved the problem for M Preview, but NOT for 5.1.1 LMY48B. As such, I've removed the platform-tools attached to this message.
[Nexus 5 General] muzaffarkhan95:
Yeah, and i found out the solution why it was not working from 5.1 , atleast solution for me, coz when u unzip a zip while in windows 7 it will ask u a special permission, sending a prompt with YES/NO, and we choose yes, so that the thing disturbing to open the img zip in cmand prompt....so if u remove that thing then it works with 5.1 too :)
[Nexus 5 General] snamer:
Guys, this appears to me in nexus root toolkit, then i tried here, and the same happen :/
[Nexus 5 General] :
First, try another download... From a different source if you can. It's saying there's an issue with the firmware file.
[Nexus 5 General] alwayslele:
Hi Guys,

after completely return stock i can't boot with twrp and i have that error. "FAILED (remote: dtb not found)"

What's this?

what happens?
[Nexus 5 General] nihn75:
what if my power button doesnt work?

what if my power button doesnt work?
[Nexus 5 General] coolek33:
Unlocked bootloader after flashing stock? Rooted and flashed twrp?

Replace it? Should be same as Galaxy s3 etc.
[Nexus 5 General] :
The Nexus 5 has an issue with stuck power buttons :P There's a technique on how to slightly bang your phone on the table to get the button unstuck. I had an issue with the button, too - did it once and now it's gone again. Didn't have to do it for 6 months now :)
[Nexus 5 General] mpgrimm2:
Nexus 5 Won't Boot past "Google" screen

Well as I always say, I am not a developer or play one on TV...

My N5 locked up on me the other day after a call. I was on 5.1.1. LMY48B, basic stock with root going on a month or so since the 5.1.1 update which I did via full flash Method 2 originally (as all my updates).

- Phone stops at the "Google" screen.

- I can get to Fastboot, and I can get to factory recovery.

- I am lucky if I can get it to turn on at all so I can get to Fastboot screen; and when it locks, it takes a bit of a miracle to get it to turn off.

- I have been able to reflash the factory images from Post 1 with LMY48B 2x and went back and tried LMY47D for giggles. Same results.

It seems like something is corrupt with my /boot perhaps. Not sure if I should try a fastboot erase on all the partitions (EDIT: Tried that from post 2, no change) or if anyone has any other suggestions. My N5 is in great shape and I hate to let it and my Qi Chargers go out for parts but I might have to. (I picked up an LG G4 on the cheap if I can't get my N5 back on its feet).

See attached.
[Nexus 5 General] nihn75:
I paid 60 for that already and it stopped working two days later. The man told me i had to pay more to fix it again or i could buy one of his phones

---------- Post added at 01:07 AM ---------- Previous post was at 01:05 AM ----------

Banging my phone on the table did not work
[Nexus 5 General] coolek33:
What can I say, you've got a hell of a "handy man" there. I would replace it for you (it's what I do) but cause of distance it will be expensive. None of YouTube fixes won't help if it was replaced. Who knows how it was soldered...
[Nexus 5 General] smrdelj:
Hi, i want to install android M preview in my nexus 5. So, should i follow this guide (method 1, as i had installed lollipop)?

Or should i install M preview directly from TWRP?

What would you recommend? Thanks!!
[Nexus 5 General] CamoGeko:
Thanks for the guide, awesome to revisit all the steps! :D

---------- Post added at 05:43 PM ---------- Previous post was at 05:39 PM ----------

Thats so weird, so you tried flashing all stock imgs and it still wont start?

If are already unlocked and have TWRP its easy enough to just flash the zip in recovery.
[Nexus 5 General] mpgrimm2:
That is correct. Full erase also. As a last ditch i even tried WugFresh's N5 Toolkit just to see if it would somehow do something different on a stock reload. (LMY48B now)

Nope. No change.

Comes to a dead stop at the Google logo and just gets hot if i leave it there.

Really hoping someone knows something else to try so i can tuck the LG G4 away as a spare and get my N5 back.

Sent from my LG G4 on Tapatalk.
[Galaxy S III Q&A, Help & Troubleshooting] rednit:
i am using ARIZA patch to get a network signal.

currently i am on EMH1 baseband.

how can i upgrade to the new 4.3 without losing my network signal ?

i have an EFS backup if needed

thank you all for your help
[Galaxy S III Q&A, Help & Troubleshooting] danarama:
Remove modem.bin from rom zip?

Or backup EFS and baseband from philz recovery

-----------------------

Sent via tapatalk.

I do NOT reply to support queries over PM. Please keep support queries to the Q&A section, so that others may benefit