yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] jd1639:
If you can boot into the bootloader try flashing the 5x factory image.
[Nexus 5 General] StarsSeeker:
32 become 16 GB, the last last last attempt to solve the issue

I was in the same situation, metod 1, metod 2 any method to fix it did not work

I've solved it by doing this (make this at your own risk, FIRST be sure that your emmc is not damaged):

root your device, and put parted binary ( find it in the forum) in system/bin with execution permission.

Then reboot in twrp recovery, then in twrp recovery terminal or in adb root shell, type this :

mount system
umount /dev/block/mmcblk0p28
parted /dev/block/mmcblk0
check 28

it should say something like

Error: The backup GPT table is not at the end of the disk, as it should be.
This might mean that another operating system believes the disk is smaller.
Fix, by moving the backup to the end (and removing the old backup)?
Fix/Ignore/Cancel? Fix

Warning: Not all of the space available to /dev/block/mmcblk0 appears to be
used, you can fix the GPT to use all of the space (an extra xxxxxx blocks) or
continue with the current setting?
Fix/Ignore?Fix

answer Fix and Fix.

now type:

print

the last two partitions should be:

28 2032MB 15.8GB 13.7GB userdata
29 15.8GB 15.8GB 5632B grow

if EVERYTHING is like that, let's make a try, type:

mkpart primary ext4 15.8GB 25.8GB name 30 trypart
name 30 trypart
print

if you can make trypart without errors and you can see trypart with the print command then

you can proceed to the next step, that will ERASE your data ( worse your userdata partition, before recreating it), type:

rm 30
rm 29
rm 28
mkpart primary ext4 2032140288B 31268511743B name 28 userdata
name 28 userdata
mkpart primary 31268511744B 31268517375B name 29 grow
name 29 grow
print

you should see the userdata partition with the new size, and the grow partition after.

Exit from parted by typing

quit

Now reboot in fastboot mode and from pc terminal type:

fastboot format userdata

ok reboot (wait it take its time) it should be solved.
[Nexus 5 General] GioVIP:
bro i got another problem yesterday, its restarting continiously, many people faces that problem clicking power button doesnot work for me becouse phone powers of until animation ends, i want to flash factory image but cant stop in bootloader becouse of continious restarts, any idea what to do ? some people say what it is coused by system, some says power button dont jnow what to do
[Nexus 5 General] StarsSeeker:
try to hold vol up + vol dow, then hold the power button, hold the three buttons until the screen power of and for the following 3-4 seconds, then release all
[Nexus 5 General] :
Thanks method 1 worked perfectly.
[Nexus 5 General] bosha4:
please help me !

I installed the stock Rom from developers.google.com/android/nexus/images#hammerhead but I haven't found all the files indicated in the video

how should I continue

---------- Post added at 01:00 PM ---------- Previous post was at 12:55 PM ----------

from where did you install the files ?
[Nexus 5 General] Primokorn:
What did you download/unzip? Post a screenshot.
[Nexus 5 General] bosha4:
i downloaded the last oen (marshmallow6.0.1)from developers.google,com/android/nexus/images#hammerhead[/url]
[Nexus 5 General] Primokorn:
You should have the flash all script after unzipping the downloaded factory images.
[Nexus 5 General] bosha4:
I have another problem: the cmd stuck in erasing 'user data'

i have been waiting for it fo 20 minutes at least but it didn't changed

what should i do ?​
[Nexus 5 General] abaaaabbbb63:
Can you get into recovery? Try to do it manually, erasing the phone's data.
[Nexus 5 General] bosha4:
a couple minutes ago (like 10 minutes) i tried it again .. and as usual i am stuck in erasing 'user data'

so can i turn off the terminal or plug off my phone to do it manually from the recovery ?
[Nexus 5 General] miguelgo81:
After the process I don´t have Wifi and Bluetooth =(

Thanks a lot for the detailed information. I did procedure as you explained but my phone cannot activate wifi or bluetooth. Is there somethign I missed?

Saludos!
[Nexus 5 General] Luma420:
as soon as i plug my phone into my pc i get a message from my pc which says this usb device couldnt connect correctly pls unplug and replug it again. and this message keeps popping up no matter if i plug it in and wait or replug it the message keeps popping up every 5 secs
[Nexus 5 General] audit13:
Boot the phone into fastboot mode and, at the command prompt, type "fastboot erase userdata" without quotes.
[Nexus 5 General] alyahmedd:
I cannot extract bootloader-hammerhead-HHZ11d.img (renamed to bootloader.img). 7-zip says cannot open the file.

Seems like the disc image file is corrupted.
[Nexus 5 General] jd1639:
It sometimes happens. Re-election download the factory image.
[Nexus 5 General] alyahmedd:
Cannot Extract "bootloader-hammerhead-XXXXXX.img"

Hello,

I tried to extract the bootloader image file for versions 5.1.1 (LMY48M) to 6.0.1 (MMB29X) for "hammerhead" for Nexus 5 (GSM/LTE).

Cannot extract any of those bootloader image files even after renaming. Can someone help me out asap?

Thanks
[Nexus 5 General] jd1639:
Are you trying to extract the .img file? If so, why? It's a compiled file. You can't just extract it.
[Nexus 5 General] 5zan:
So I'm on stock ROM 6.0.1, rooted and twrp installed. I want to full unroot using super su and flash a stock recovery as I want to install an ota. Can u please give the the link to a stock recovery as I can't download full ROM due to slow internet.
[Nexus 5 General] DiamondJohn:
To download an OTA, you will be downloading the full package. ie if you download a stock recovery, you will need to actually download more (you will be downloading the stock recovery twice).

There are also many versions of the stock recovery, you have not said which version you want.
[Nexus 5 General] 5zan:
So it is not possible to do it without downloading the whole package? I'm on build number mmb29v tho.
[Nexus 5 General] DiamondJohn:
Below is a link to the recovery from hammerhead-mmb29v-factory-62a68ee9.tgz

http://d-h.st/iTKF

I am running a custom ROM (ie system and data and cache etc are already taken care of) .So I downloaded the whole package, and only flashed the radio and bootloader (I'm using TWRP for recovery). AFIK the OTA downloads the whole package and flashes it appropriately. At best it may not download a data image. However, looking at the whole (compressed) package it is 579MB, and the compressed system image itself is just over 556MB; ie 96% of the download,
[Nexus 5 General] daneellaw:
That was incredibly easy to follow and complete. Thanks.
[Nexus 5 General] rkumbhar:
after clicking on flash all bat file bootloader get locked again, and flashing gets fail
[Nexus 5 General] audit13:
If the bootloader relocks itself at reboot, the emmc chip is probably fried and can only be fixed with a motherboard swap.
[Nexus 5 General] sneak:
this is great. Alot faster than doing it the manual way and it works properly. thanks so much.
[Nexus 5 General] rayvere:
I followed the steps, but when typing in the commands i got the following:

'fastboot' is not recognized as an internal or external command,
operable program or batch file.

Help?
[Nexus 5 General] jcsww:
Do you have the fastboot.exe and files in the same folder as the img files for flashing?
[Nexus 5 General] wally897:
nexs 5 debug

My phone is stuck on logo screen after update my debugging is on will it still work or it wont.

Help pls I just bought the dam phone it worked fine but it updated and got stuck.......
[Nexus 5 General] Stevica Smederevac:
If you have everything stock, go into recovery and clear cache and see if it helps.
[Nexus 5 General] wally897:
Yea I've tried that too but no luck.
[Nexus 5 General] Stevica Smederevac:
Maybe flashing stock img but without losing data? There's a way but I forgot, i think you need to edit script before flashing. Just Google, you will find the answer.

P. S. Is everything stock on the phone?
[Nexus 5 General] wally897:
Yes I believe everything is stock I just bought the phone a week ago.
[Nexus 5 General] Stevica Smederevac:
Download stock img and do this before flashing and all the data will remain.

In the bat file/script you just remove the -w in the command
[Nexus 5 General] wally897:
Even tho I can't take enable debugging
[Nexus 5 General] Stevica Smederevac:
You said that debugging is on:confused:
[Nexus 5 General] wally897:
Sorry I mean I cant turn it on
[Nexus 5 General] Stevica Smederevac:
I can think of another solution but you're not going to like it. You can perform a factory reset from stock recovery but you'll lose everything (not what's on ss card but apps, settings, sms and stuff like that.
[Nexus 5 General] wally897:
At this point I don't care what's in the phone I just want it to work lol
[Nexus 5 General] Stevica Smederevac:
Then do it ;)
[Nexus 5 General] wangdaning:
You don't need debugging for fastboot, debugging is for adb.
[Nexus 5 General] wally897:
OK can I do all this with a surface pro 2
[Nexus 5 General] jd1639:
It runs win 10 right? Should work. Google 15 second adb xda. That'll install fastboot and adb.
[Nexus 5 General] jd1639:
You're just trying to get your device running right? Can you boot into the bootloader and then get to the stock recovery? If so try sideloading an ota in recovery. See this, https://developers.google.com/android/nexus/ota

Download the latest one for hammerhead.

Also, what do you get when booted into the bootloader and type on your pc fastboot devices

Or if you're in recovery and type adb devices
[Nexus 5 General] wally897:
if I type fastboot devices I get

0739a3ffd077adf9

---------- Post added at 10:06 PM ---------- Previous post was at 09:57 PM ----------

I tired it and tells me cannot read hammerhead ota mob30h 672f59e1zip but doesn't this require to enable debug and I cant do that
[Nexus 5 General] wangdaning:
You did unzip the factory image first right?
[Nexus 5 General] wally897:
Yes with 7zip
[Nexus 5 General] jd1639:
The good news is that your pc is recognizing your device and you have fastboot installed correctly. The alpha-numeric number fastboot returned is your devices serial number.

I'm not sure why the ota or factory image from what you tried before isn't working. Let's focus on the factory image and flashing it in the bootloader with fastboot. After you downloaded the factory image I assume you unzipped it. In there is a batch file which flashes all the individual images. Try double clicking on that with your device connected to your pc and the device booted into the bootloader.

Edit, looks like you tried this before.

---------- Post added at 06:14 PM ---------- Previous post was at 06:07 PM ----------

What are you using to unzip the factory image? Use winrar or 7-zip. Other methods haven't worked well for me.
[Nexus 5 General] wally897:
OK after downloading I unzip but it sends me back to the 7zip is that OK or I send it to another folder. Sorry I'm a noob but I don't know who fixes phones here and I don't trust ppl here.

---------- Post added at 02:54 PM ---------- Previous post was at 02:49 PM ----------

I also get a msg "the disc image file is corrupted".
[Nexus 5 General] jd1639:
Do you know what folder it unzipped it to? It's probably a sub folder in the same folder the original zip was in.
[Nexus 5 General] wally897:
It unzipped to download folder
[Nexus 5 General] Marctiell89:
hi, I also have the same problem. I'm sure you have 32gb. I made the proceedings of the second post but I can not solve. what can I do?

bootloader showing that its a 16gb memory phone but its not possibile!!!
[Nexus 5 General] captain_nemo:
Please provide me 'logo.bin' from Nexus 5 stock image.
[Nexus 5 General] gfreek:
Unroot?

Hi guys I rooted my device using CF-Auto method, which worked great however I now need to send back my nexus 5 back to google for warranty replacement so I need to unroot and lock boot loader, from reading this thread my understanding is to unroot you do the following:

Step 1:

In SuperSU app, go to settings and click Full Unroot.

Step 2:

Open a CMD window

Boot phone in fastboot, and connect to PC

And type the following command Code:

fastboot oem lock

Is this correct? for step two do I need additional tools etc.. from here?
[Nexus 5 General] jd1639:
Did you read the op? Just flash the factory image, no need to do anything with su.
[Nexus 5 General] abaaaabbbb63:
Do exactly what this guide says. Only using the unroot option won't reset the Tamper Flag, that shows that the bootloader was unlocked once, and , because if this, your warranty may be taken as voided.
[Nexus 5 General] gfreek:
Thanks ok got it, just want to clarify I have downloaded Nexus BootUnlocker script do I put in the root file of my Nexus 5? or do I put in the same folder in my PC with ClockWordMod recovery image?

Sorry for the noob questions it's been a long time since I done this, bit rusty!
[Nexus 5 General] jd1639:
Boot unlocked script? Just run adb oem unlock.

Edit, just follow this and skip the scripts. http://xdaforums.com/showthread.php?p=47025283
[Nexus 5 General] abaaaabbbb63:
You put the script on your phone storage.

There was a bit of an update to the guide, since a Tamper Flag was discovered within the N5 and latest N4 bootloaders. This flag turns it's value to "true" if the bootloader has ever been unlocked. It's like the flash counter in Samsung devices.

To not risk anything with warranty, it's best to reset this value to "false". That script will do that.
[Nexus 5 General] jd1639:
I need to do some more reading
[Nexus 5 General] gfreek:
Thanks I done that.

However as per your instructions I downloaded ClockWordMod recovery image from here: http://xdaforums.com/show....php?t=2511952. and renamed it to CWM.img.

Put the phone in fastboot and launched CMD prompt within the same folder I downloaded CWM.img in my PC and typed the following command:

Code:

fastboot boot CWM.img

I keep getting error cannot execute? Have I missed something? Should I have placed CWM.img in the phone storage? Could it be because the bootloader is locked?
[Nexus 5 General] awdracer:
i get the same error too. it was before i locked the bootloader too. i get system 1 installation aborted.
[Nexus 5 General] abaaaabbbb63:
Bootloader must be unlocked for you to flash the factory images, or do anything involving fastboot.
[Nexus 5 General] awdracer:
^^ it was unlocked and rooted. but the zip would not fully install in cwm. i locked the bootloader thinking it was the same effect as doing the script. i already ran the zip 3 times when the bootloader was unlocked and it still said the error.

i might be putting the zip in the wrong place? would that be it?
[Nexus 5 General] abaaaabbbb63:
What error is it giving? Might be a recovery bug, considering that CWM is unofficial and still in development.

Zip is in the right place as long as it's on the phone's internal storage
[Nexus 5 General] awdracer:
i reunlocked the bootloader and will go through the process again. its going through the factory reset cycle so i cant do anything atm.

error it was giving if i recall correctly was:

status 1

installation aborted

sorry for the troubles!

edit:

now in recovery twrp

it says

E: unable to mount '/cache

E: unable to mount storage
[Nexus 5 General] abaaaabbbb63:
First, try redownloading the script. If it still doesn't work, try using TWRP instead of CWM. If that still doesn't work, then just proceed with the guide. Hopefully, the tamper flag will be ignored by the warranty guys.
[Nexus 5 General] awdracer:
hopefully so! thanks for the guide
[Nexus 5 General] aerozolic:
Trying to get the phone back to stock too but the cwm-Nexus.Bootlocker.zip script doesn't work. I'm getting:

Verifying device...
Device: Unknown
Bootloader: Unknown

Unsupported device

Your system has not been changed.

Script will now exit...

E: Error in /data/media/0/cwm-Nexus.BootUnlocker.zip
(Status 1)
Installation aborted
[Nexus 5 General] abaaaabbbb63:
Try flashing the factory images first, then, without locking the bootloader, boot cwm and flash the script once.
[Nexus 5 General] aerozolic:
If anybody tests this out then let us know too
[Nexus 5 General] abaaaabbbb63:
Yeah, it seems that the script may be having some bugs.

People, save a kitten, this time by testing this script :)
[Nexus 5 General] jd1639:
After flashing the image boot into the stock recovery. Clear cache, then do a factory reset. It'll solve the memory issue.
[Nexus 5 General] Marctiell89:
I also tried it but do not solve the problem.

the fastboot screen, I see 16gb and not true !!!
[Nexus 5 General] jd1639:
Sounds like it is true. Why do you think your phone is not 16 Gb?
[Nexus 5 General] Marctiell89:
I bought 2 nexus 5 32gb equal. Mine did not give me problems, to my sister is doing problems after upgrading failed to MM from lollipop for root
[Nexus 5 General] nex5top5:
Does this also get rid of a custom recovery?
[Nexus 5 General] jd1639:
Flashing a factory image will remove a custom recovery. I saw your similar question in the other thread. If you become familiar with method 2 in this guide you can do a lot. A custom recovery and the stock recovery is flashed to the recovery partition. In method 2 of this thread you'll see a number of .img files referenced. If you want to replace a custom recovery with the stock recovery all you have to do is follow method 2 but only flash the recovery image with fastboot, i.e. fastboot flash recovery recovery.img. So to remove root and put the stock recovery back on your device use the unroot option in supersu then boot into the bootloader and flash the recovery.img with fastboot.
[Nexus 5 General] nex5top5:
I'm tried method 1 and I never got the small dead Android step. I am trying method 2 now because SuperSU won't let me boot my phone back up.

EDIT: Method 2 has gotten me past the dead Android step and I am now waiting to see if I can boot my device after factory resetting.

EDIT 2: It managed to boot in about 15 minutes. But I am not sure if my SuperSU unrooted anything.

EDIT 3: I am now back to a fully unrooted device, and stock recovery.
[Nexus 5 General] jd1639:
Good to hear
[Nexus 5 General] RO-Hit:
hi freinds,

i'hv unknownly started the boot menu and selected 'START'. then instead of waiting retsrted boot menu by preesing the keys and this time chose 'RECOVERY MODE' now my N5 shows a android dumy standing and a spherical image rolling in front of him.....

What to do please help
[Nexus 5 General] Primokorn:
Select "reboot system now".
[Nexus 5 General] cbnestor:
Not getting 3g/Lte data connection should I return to stock?

Hi guys,

I'm new on this,

I have my Nexus 5 on Android MarshMellow, But it only connects 2G, when it select 3G/4GLTE I get no signal (Emergency calls only), I've tried everything.

I'm thinking of returning to Stock Android 4.4.4 using this tutorial. Should that work? returning from 6.0.1 to 4.4.4

Thanks so much for this tutorial , thanks for your time.
[Nexus 5 General] audit13:
Have you tested the sim card in another phone to see if it gets 3g/4g? The phone shows the correct imei?
[Nexus 5 General] kojak1989:
How to extract some apps from google factory image ?
[Nexus 5 General] Primokorn:
http://xdaforums.com/android/software-hacking/how-to-conver-lollipop-dat-files-to-t2978952

http://xdaforums.com/android/help/extract-dat-marshmallow-lollipop-easily-t3334117

Modems for D820 are the same as D821

http://xdaforums.com/google-nexus-5/development/modem-nexus-5-flashable-modems-efs-t2514095
[Nexus 5 General] wally897:
I tried everything I took it to a cell repair place and they couldn't fix it.
[Nexus 5 General] spydamans:
stuck at System.img

I got everything else to flash but when i get to the system.img file it will not flash. Just hangs there saying "target reported max download size of 536780912 bytes"

Trying to revert to stock rom on nexus 5x from mac.
[Nexus 5 General] Primokorn:
Wrong device mate but you may want to try this:

fastboot -S 512M flash system C:\path....\system.img
[Nexus 5 General] Caront3:
When I lock the screen, It turns automatically on openning the camera. If I flash a factory image I will can fix it or is it a hardware problem?
[Nexus 5 General] ifo.yudha:
i have an elemental X kernel with TWRP recovery, i want back to factory kernel again bcz my wifi cant turn on.

what method should i use?

what's the different method 1, 2 and 3?
[Nexus 5 General] ifo.yudha:
hello.

my wifi cant turn on.

how to fix it?

im already unroot my nexus 5 to lolipop (5.1.1)

thx
[Nexus 5 General] abaaaabbbb63:
So you flashed the factory images but wifi is not working? Not even after a reboot?

Flash again.
[Nexus 5 General] wpbfjr:
i too had the no wifi thing, baked the phone, wifi shows up and so does bluetooth, BUT neither connect.

but still CANNOT flash phone

i believe i "FOLLOW EVERY SINGLE STEP" on page one of this thread, i've followed all instructions, including manually inserting the 'path', but my computer does not see my nexus 5 to flash it.

all required programs installed...done in windows 7 and windows 10 machines.

ideas? suggestions?

thanks, dana
[Nexus 5 General] malonso07:
[/QUOTE]

I have something similar on my Nexus 5 and i send my phone to service and they change my motherboard in phone because it whose broken.[/QUOTE]

The problem is that my Nexus 5 is out of warranty :crying:
[Nexus 5 General] Nischay M M:
Hello when ever I try flash ROM SuperSU and kernels. I get a "unable to mount storage" error in TWRP. But there would be no problem in flashing and everything boots up and works fine.

Why would that error message occur and any fix to it??
[Nexus 5 General] shonak24:
hi im having an issue cannot flash system.img it shows error: cannot load system.img
[Nexus 5 General] Primokorn:
Try this:

fastboot -S 512M flash system path/to/system.img
[Nexus 5 General] shonak24:
Thanks for helping but I tried it already... Still same error
[Nexus 5 General] Primokorn:
Could you post the log? Are you talking about a Nexus 5 or your LeEco Le Max 2?
[Nexus 5 General] shonak24:
I'm taking about Nexus 5x
[Nexus 5 General] Primokorn:
So you should ask in the Nexus 5X forum :)
[Nexus 5 General] overclock360:
my mobile data stopped working after i switched from cm14.1 to purenexus 7.1 rom, during my first try i faced bootloop but after wiping every partition i was able to get purenexus working but since then my mobile data stopped working tried clean flashing cm13, cm14.1 but still no use. if i return to stock will the problem be fixed?
[Nexus 5 General] arsal_93:
Guys, currently i am Lollipop 5.1.1 and planning to update to Marshmallow. Now both firmwares have different versions of bootloaders and radio's, so i wanted to know while flashing(Factory Image) the latest MM firmware (Dec 2016) from my current build no (LMY48B) Lollipop 5.1.1 will there be any kind of problem? , meaning should i first update my stock rom (LMY48B) to another build of lolllipop and after that flash MM. Or should i just flash from current build to MM?
[Nexus 5 General] Primokorn:
If you are stock, just flash the factory images (except userdata.img). They include a new bootloader/radio.
[Nexus 5 General] appuserprime:
hi

Hi. I followed your instructions here and hard bricked my phone. Now I am looking up how to use lgflashtool and download mode to fix it. Do you have any advice for me? I'm hardly as into android as yourself, but why would you tell users to wipe their boot and bootloader? I flashed the bootloader from the hammerhead zip and it booted to a black screen and then was hard bricked. Please help, maybe I missed something.

By the way I really would appreciate the help but I must scold you first about your advice. I am actually a developer and power user and I unwittingly followed your directions without how terrible it is to be erasing the boot/bootloader. Seems like bad advice seeing that I followed the directions perfectly.

Edit: While following the instructions for download mode, my phone booted into fastboot and problems are solved for now. Sorry for scolding you, but now Im curious what the hell is going on!
[Nexus 5 General] abaaaabbbb63:
"boot" is not bootloader, it's basically the kernel. I never tell anyone to erase their bootloader.