yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] abaaaabbbb63:
Ok, so you installed using the flash-all.bat? Then you have stock recovery.

In bootloader, select "Recovery". When the small Android comes up, press Power Button + Volume UP. From the menu, select "wipe data/factory reset"
[Nexus 5 General] Ex1a:
Ok thanks

Enviado desde mi Nexus 5 mediante Tapatalk
[Nexus 5 General] marco.roman89:
Hello,

I can't seem to get this process rolling. I've installed the Android SDK using the smaller file instead of the complete package. I went ahead and made sure ADB and Fastboot work properly which they do.

Ok, so now I have my Nexus folder with both ADB and Fastboot and already unzipped the factory images to the root of that Nexus folder.

I am in Fatsboot mode and enter the following command inside my terminal:

./fastboot flash flash-all.sh

this is what it's returning:

Marcos-MacBook-Pro:Nexus marcoroman$ ./fastboot flash flash-all.sh
unknown partition 'flash-all.sh'
error: cannot determine image filename for 'flash-all.sh'

I am not really sure what's going on, any help? I am inside the correct folder with the correct files.
[Nexus 5 General] Chromium:
The command you ran is completely incorrect. The flash-all file is a standalone executable script and should not be paired with the "fastboot flash" command. To make the file executable so that you can run it, use the following commands:

chmod +x flash-all.sh

./flash-all.sh
[Nexus 5 General] marco.roman89:
Ok I see, so I went ahead and first ran the executable and it opens in iTerm and received a

fastboot: command not found

Then I went ahead and cd to the correct folder where the hammerhead files are in and pasted your code:

Marcos-MacBook-Pro:hammerhead_stock marcoroman$ chmod +x flash-all.sh
Marcos-MacBook-Pro:hammerhead_stock marcoroman$ ./flash-all.sh
./flash-all.sh: line 17: fastboot: command not found
./flash-all.sh: line 18: fastboot: command not found
./flash-all.sh: line 20: fastboot: command not found
./flash-all.sh: line 21: fastboot: command not found
./flash-all.sh: line 23: fastboot: command not found
[Nexus 5 General] Chromium:
Looks like you havent setup fastboot/adb correctly. Move all of the contents of the platform tools folder into the same directory where the flash all.sh file is located.
[Nexus 5 General] marco.roman89:
I'm not sure what's wrong...Both ADB and Fastboot are correct. If I run both of theses commands respectively:

./adb devices

and

./fastboot devices

then I can see my phone's serial # and says either device or fastboot.

Ok so once I am in the root directory of my Android folder, do I just paste

chmod +x flash-all.sh

then

./flash-all.sh

and that flash-all.sh should automatically execute? Sorry but I don't get it. I used the SDK to root and unlock it just fine but now this is giving me a hard time. Oh and yes all files are together in the root path.
[Nexus 5 General] karolcio:
So that would mean that if I wanted to go a step further and also re-lock the bootloader I would just add

fastboot oem lock

to

fastboot flash recovery recovery.img

, correct? My goal is to only root the phone, and then go back to stock recovery and locked bootloader.

Also, I would have registered just to say thanks for the great "Understanding.." guide and the others. Much less intimidating..

THanks!
[Nexus 5 General] abaaaabbbb63:
Yes, after you flash the recovery, you can lock the bootloader with

fastboot oem lock

Your welcome :D
[Nexus 5 General] floepie:
I couldn't seem to get the factory reset to work from the factory recovery to initiate. Power + Vol Up simply does nothing. I tried power first, then volume key and vice-versa. So, I just went through the settings menu to it instead. Are you sure that this is the sequence of keys?
[Nexus 5 General] abaaaabbbb63:
Yes, but it's not a sequence. You have to press them at the same time.
[Nexus 5 General] dn00:
My god. Thank you for this. Holding power PLUS volume up at the same time won't do anything except reboot. Just quoting this so people who had trouble like I did can see.
[Nexus 5 General] abaaaabbbb63:
I'll make some modifications to the OP, to make it clearer.
[Nexus 5 General] gee2012:
LOL. sorry bro didn`t see that thread :silly:
[Nexus 5 General] eyalinc:
boot loops cant mount SDcard plz help

HI abaaaabbbb63

i get bootloops and sdcard wont mount.

i posted this thread showing all i tried to do to flash stock.

http://xdaforums.com/showthread.php?t=2528019

i got a replay to follow your guide, my Q is

when you say

★In the same folder, from the original archive, extract "bootloader-hammerhead-XXXXXX.img" (

rename it to bootloader.img

) and "radio-hammerhead-XXXXXX.img" (

rename it to radio.img

)

do i copy these files (after rename) to where i Extracted the files from image-hammerhead-krt16m.zip and override the existing files?
[Nexus 5 General] eyalinc:
10x man! Its Solved now
[Nexus 5 General] tranduymb:
Thanks :)
[Nexus 5 General] abaaaabbbb63:
You're welcome!
[Nexus 5 General] motionat1:
I really like these tuts. :)
[Nexus 5 General] smrdelj:
Thanks!! I will do it via TWRP using this:

http://xdaforums.com/google-nexus-5/development/rom-android-m-preview-2-flashable-zip-t3157299
[Nexus 5 General] smrdelj:
Here again.

Finally, i flashed m preview 2, and it sucks. Big time. So i want to reflash backwards to lollipop. I should just follow this guide, right?

Thanks!!
[Nexus 5 General] Primokorn:
Yep
[Nexus 5 General] Primokorn:
[MENTION=4261222]caitlin.[/MENTION] if you wiped your intermal memory then your data are lost. However you should be able to enter into recovery mode to flash a new custom rom though adb sideload.

Or you can start from scratch by flashing the latest factory images. Then you will flash a custom recovery again and go back to your favorite custom rom.
[Nexus 5 General] mpgrimm2:
[MENTION=1611121]caitlin[/MENTION] ,

This is for my HpTouchpad but 95% of it will apply to USB OTG on most devices that support it and should help if you want to make your own cables.

[INFO] HP TP USB OTG Notes, Tips, & Tricks (4-28-14)

The big difference for the Nexus5 is that it supplies enough power back out the microUSB port for basic devices like a thumbdrive, USB mouse, etc.

The Touchpad requires external power for otg to work.

PS: my Nexus5 died so I can't throw together any pictures of using OTG with it.

Sent from my LG G4 on Tapatalk.
[Nexus 5 General] caitlin.:
thank you. i apologize , i read my post again and I haven't slept in over a day so it doesn't make much sense. I did try sideload through the recovery but since I can't change the settings to enable usb debug, I can't transfer anything. I will look more into flashing a factory image from Android Studio, is that what you mean? I was just reading something about that. It's crazy I feel like so much of this is unfamiliar now... i don't know how long exactly but I was still on 4.4.4 and just figured eventually SlimKat would update....

Thanks again for your help:)

edit: yeah, if I would have thought for a second before i panicked to stop the factory reset things would be fine. I don't keep much on my phone that isn't synced. grrrr silly me.

---------- Post added at 10:44 AM ---------- Previous post was at 10:36 AM ----------

Great! Thank you I will definitely check it out. I will prob just buy one eventually but my boyfriend and i have so many cables I thought I would try. Oh well, awake too long+uneducated+ inexperienced i figured it wouldnt. Maybe I'll keep trying and get it someday
[Nexus 5 General] efrant:
I don't understand what your issue is. Just plug the N5 to your computer, and follow the steps in the first post. You will have a fully working device on the stock ROM.

And you don't need USB debugging to be enabled to perform the steps in the first post. (USB Debugging is an Android setting -- it is only relevant when you are booted into Android. If you are booted into the bootloader, it is not needed. If you are booted into TWRP, it is enabled by default...)
[Nexus 5 General] tvBilly:
lmy48i ROM file changes

Factory Images for hammerhead-lmy48i are up in the

usual place

. (As are those for the other Nexus devices).

For those of you updating manually (not via the OTA updates), here's what's the same and what's changed from the previous update (hammerhead-lmy48b)

The same (radio/bootloader/userdata/cache):

MD5 (hammerhead-lmy48b/image-hammerhead-lmy48b/cache.img) = 2248e72acdd2884e7e6693c3df49675d

MD5 (hammerhead-lmy48i/image-hammerhead-lmy48i/cache.img) = 2248e72acdd2884e7e6693c3df49675d

MD5 (hammerhead-lmy48b/image-hammerhead-lmy48b/userdata.img) = 968739805ca1b2c3007f6aad733ed306

MD5 (hammerhead-lmy48i/image-hammerhead-lmy48i/userdata.img) = 968739805ca1b2c3007f6aad733ed306

MD5 (hammerhead-lmy48b/bootloader-hammerhead-hhz12h.img) = d7632bc44cb018e55dd931bf70673444

MD5 (hammerhead-lmy48i/bootloader-hammerhead-hhz12h.img) = d7632bc44cb018e55dd931bf70673444

MD5 (hammerhead-lmy48b/radio-hammerhead-m8974a-2.0.50.2.26.img) = a85dea03fdae2b2c6c7d30e11e8b8ef5

MD5 (hammerhead-lmy48i/radio-hammerhead-m8974a-2.0.50.2.26.img) = a85dea03fdae2b2c6c7d30e11e8b8ef5

Changed (boot/recovery/system)

:

MD5 (hammerhead-lmy48b/image-hammerhead-lmy48b/boot.img) = f1ba0cdedb649fafc8b03ec22613d06a

MD5 (hammerhead-lmy48i/image-hammerhead-lmy48i/boot.img) = 675dcf9317db63a0b5a91757fef33fc6

MD5 (hammerhead-lmy48b/image-hammerhead-lmy48b/recovery.img) = 1bac28fc6bb98a6834166f71f95abe1a

MD5 (hammerhead-lmy48i/image-hammerhead-lmy48i/recovery.img) = 8314c0551ad5635215c0b8e11cad3aef

MD5 (hammerhead-lmy48b/image-hammerhead-lmy48b/system.img) = 4ab953defc30b4673b4b5cf1025d69b7

MD5 (hammerhead-lmy48i/image-hammerhead-lmy48i/system.img) = 7a071804dbec0a816652986c83308990

So for me (running a stock, rooted, TWRP recovery'd ROM), that means I'll just flash the boot and system images, and clear the caches. Then add back all the stuff that goes in the system partition (SU, BB, hosts, etc).
[Nexus 5 General] caitlin.:
Unfortunately I don't understand my issue either. With option on when I try to run the first bat it just says soomething similar to "detecting device." for what seems likea long time Is it possible I am being too impatient? Does it take a while? Everything else seemed
[Nexus 5 General] swat4samp:
Very informative post. One doubt, is it really necessary to flash factory image? Or can I wait for custom ROM with latest aosp_r9 merge?
[Nexus 5 General] tvBilly:
Necessary? Well, with my setup of a stock but rooted ROM, I can't use the OTA updates because my system partition has been modified. So whenever an update comes along, I have to use the factory image and just flash selective parts that have changed. And then I add back all the modifications I've made to the system (like rooting it, etc).

But if you're running a custom ROM, and plan on sticking with it, then I'd just wait for the update with the security patches to be released by your ROM creator. If you're really worried about the MMS bug, you can turn off auto downloading of MMS' until your ROM creator has an update available.
[Nexus 5 General] Primokorn:
Do you really have fastboot installed on your computer? Try the following command: fastboot devices

Is your device listed with its serial number?
[Nexus 5 General] Pig Vomit:
Sounds to me like she doesn't have Android Bootloader and ADB drivers installed.

Download Google USB drivers, put phone in bootloader mode, connect to computer, go to Device Manager, right click on Android device, Update Drivers, then manually browse to location of Google USB drivers.
[Nexus 5 General] MrKaon:
This one does better job:

ADB, Fastboot and Drivers - 15 seconds ADB Installer
[Nexus 5 General] MrPenez:
It didn't flash the image-hammerhead-imy48i

just everything else
[Nexus 5 General] MrPenez:
Someone please help me. It doesn't flash the .zip file or the files inside it.
[Nexus 5 General] jd1639:
You need to give us more detail. What have you tried? Have you tired flashing each image file individually using fastboot?
[Nexus 5 General] MrPenez:
I opened the flash all file.
[Nexus 5 General] jd1639:
Don't use the flash-all.bat. See the long method in the op of this thread. Flash each image file separately.
[Nexus 5 General] Prodeje79:
Very recently, I've stated several times to only use the long method 2 for now. Maybe should have OP update first post as people only read that post?
[Nexus 5 General] kikikaka:
update the android sdk platform-tool to preview 23rc5..

Seems the new fastboot can flash the zip without and problem on my N5, N9 .

It refused to update with zip before, which need to flash img one by one....
[Nexus 5 General] MrPenez:
"fastboot flash cache C:\androidimage\cache.img"

Does "/androidimage" mean the image hammerhead folder?
[Nexus 5 General] Nyph:
Never gets to "Wipe Data/Factory Reset"

Followed all the steps, but then selecting Recovery Mode just has it hang at the white "Google" logo. Never gets to the next option. Help?
[Nexus 5 General] Pig Vomit:
Another day, another platform-tools release.

Attached is a zipped copy of the most recent platform tools, final release version 23. Not a release candidate. Not sure what's changed since RC5. Downloaded directly from Google using Android SDK.

I have used these files to flash Marshmallow preview 3 with flash-all no problem. Someone may want to try them with LMY48I and report back regarding whether it solves the flash-all problem on that build. The last time I tried to flash LMY48I it was with release candidate 4, I think, and it didn't work. Since this is a final release hopefully it works.

Please attempt flash-all.bat with LMY48I and report back.
[Nexus 5 General] lion369:
Unique problem with flashing namely lollipop. SOLVED

Hello, I faced unique problem. Device Nexus 5 D820. I've read this topic and did everything the same as described here.

Problem is than I am not able to flash lollipop (Android 5+) factory images. I mean everything goes fine, but when it comes to final start of the system it stuck on flying dots (dots are moving) over 4-5 hours and won't open. However the KitKat (Android 4+) factory images flashes properly, the system loads in 10 minutes. I also tried to update from Android 4.4.4 by google update (Android 5+) notification, but it also gets stuck on the same flying dots. The problem began when my device running Android 5.1 several months suddenly rebooted and system stated that the data was corrupted. Then, following errors appeared:

E:failed to mount /cache (Invalid argument)

E:can't mount /cache/recovery/log

E:Can't open /cache/recovery/log

E:failed to mount /cache (Invalid argument)

Then, after several flash things these errors do not appear already, but problem still remains...

UPDATE: Problem is SOLVED

Greatest [MENTION=4325732]bitdomo[/MENTION] posted guide as unique as my problem. It is caused by /persist partition which was corrupted and THANKS to @ bitdomo I managed to solve it following this topic

[GUIDE][FIX] Boot loop on Lollipop 5.0 and above (fix persist partition)
[Nexus 5 General] sirkingsir:
I followed every step of the tutorial ,but when I start the flash-all.bat file at the beginning it's ok, until it says :

archive does not contain 'boot.sig'

archive does not contain 'recovery.sig'

failed to allocate 1046364921 bytes

error: update package missing system.img

press any Kay to exit ...

I executed the file in a folder containing all the files shown in the tutorial. Can anyone help me please ?
[Nexus 5 General] jd1639:
First, don't worry about the *.sig errors. Those are normal. Try the long method, flashing each image file separately. Also, make sure you have the latest version of fastboot. The easiest way I know how to do that is Google 15 second adb install xda. Install that, it had the recent version.
[Nexus 5 General] sirkingsir:
thank you, I tried the long method and it worked, however I think there's an error in the commands that must be typed, in fact the last command says "fastboot flash cache C:\androidimage\cache.img" although the other ones refer to the hammerhead-krt16m... folder. Am I wrong ?
[Nexus 5 General] jd1639:
You're probably correct. I always open a command window in the same folder as the image file is in so I don't need to worry about the path to the file. Open that folder and then in an unoccupied area right mouse click. A pop up will pop up where one of the allowed commands is "open a command window here"
[Nexus 5 General] sirkingsir:
Another little question: can I follow the last part of the tutorial (dealing with the locking of bootloader) if I have already turned on the phone following the first part of the tutorial ?
[Nexus 5 General] jd1639:
If you're talking about re-locking the bootloader, there's a much easier method. Get bootunlocker from the play store. That'll let you lock and unlock the bootloader, without wiping the device. It also allows you to re set the tamper flag.
[Nexus 5 General] sirkingsir:
Thank you very much for the suggestion, but the app needs root, and I am trying to restore completely to stock my nexus 5, so I would follow the tutorial if this could help me, But it seems to me that, at the end, I will have installed a TWRP custom recovery instead of the stock one. Will I ?
[Nexus 5 General] jd1639:
Here's what you should do if you want to flash the tamper reset zip file and still keep the stock recovery.

1. Download the tamper zip to your device

2. Google nexus 5 teamwin and download the twrp image file to your pc, we are not going to install it, only boot into it

3. Rename the twrp file you downloaded to twrp.img. This is for simplicity

4. Boot into the bootloader on your device and connect it to your pc

5. Open a command window in the same folder as twrp.img is in

6. In that command window type the command, fastboot boot twrp.img. This will boot you into twrp but not install it

7. When you're booted into twrp then install the tamper.zip you downloaded in step 1

Reboot and the tamper flag still be reset and you'll still have the stock recovery on your device.
[Nexus 5 General] hawrehas:
Relocking bootloader with broken screen

*SOLVED*

Hi guys,

I got a few questions, hopefully someone can help ;)

I'd like to lock the bootloader and reset the temper flag of my broken nexus 5.

I've already successfully done this before, but now the screen is broken and i ran into problems.

Nexus 5:

rooted; unlocked bootloader

broken screen:

I can only see some coulerfull lines; almost impossible to make out what the screen is showing;

loots of "ghost touches"; surface of the screen is perfectly fine; defect started without phone falling, flashing etc.

My first Problem with the tutorial:

How to do this without screen feedback:

"

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

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

★Select "Wipe data/factory data reset"

★Reboot. Your phone should be stock.

"

-alternative a: can this be done via commands?

-alternative b: could someone guide me throug the menue? like: 2x volume button down to select recovery, then power, then wait 3 minutes etc...

-alternative c: any way to mirror the display to my laptop in fastboot mode? (droid@screen does not seem to work?!?)

-alternative d: could i use a toolkit for this? ( yeah, I feel very sorry for asking this here :p )

Cheers

Also [MENTION=4346614]abaaaabbbb63[/MENTION]

I had to use the manual option due to an error message about missing system.ini

In the OP, after:

"fastboot erase cache" the code box ends and there is one more command with a wrong(?!?) path:

"fastboot flash cache C:\androidimage\cache.img"

should be C:\image-hammerhead-krt16m\recovery.img, right?

And thanks for the awesome tutorial!

edit:

Flashing factory image and wiping solved by using a toolkit.

Still would be nice to know if it could be done manually.

The reseting of the temper flag couldn't be done with the toolkit because i couln't enable udb debugging without the buggy screen.

I used this tutorial and commands to do it.

just open cmd after booting TWRP and type:

twrp install <location of unlocker.zip>

hope this edit helps someone!

Thanks again for the awesome tutorial :)
[Nexus 5 General] xpertaim:
cant find the correct version of twrp for my nexus 5

How do i know which twrp file should I download?

I used nexus 5 LRX22C
[Nexus 5 General] efrant:
Shouldn't really matter. Use the latest version.
[Nexus 5 General] AaronXXL:
what does (LMY48B), (LMY48I), (LMY48M) mean?
[Nexus 5 General] Highway 55:
Those are build numbers for different factory images.
[Nexus 5 General] efrant:
https://source.android.com/source/build-numbers.html
[Nexus 5 General] Ebra92:
anyone has stock recovery for lmy48i plz ? I only have the ota zip file and no recovery image file in it and I don't wanna download the whole image file. I just need the recovery to normally update OTA instead of sideloading and wiping/backing u...etc. and while we're at it , I'm gonna need the new update's stock recovery also. How come adb sideloading an OTA zip doesn't update the recovery ? I'm missing something here :/
[Nexus 5 General] :
[MENTION=6013642]Ebra92[/MENTION]: Here you go. Hope it still helps you :) Click!
[Nexus 5 General] Ebra92:
Thx ! I keep clicking the thx button but nothing happens, but thx,lol .
[Nexus 5 General] :
Don't bother about the Thanks button :P
[Nexus 5 General] CannibalAngel:
So, it doesn't matter what build I download?
[Nexus 5 General] Primokorn:
Yep BUT it's recommended to download the latest one for each Android version.
[Nexus 5 General] Thisal:
Please help

why is that i keep getting this error massage

archive does not contain 'boot.sig'

archive does not contain 'recovery.sig'

failed to allocate 738714620 bytes

error: update package missing system.img

Press any key to exit...
[Nexus 5 General] wizeup881:
That comes from the flash all batch file. If you place all the images in the same folder and rename them like system.img you just click on file to open a command prompt from where the images are you just run down in order. So if you renamed xxx to system.img you would run the command fastboot flash system system.img
[Nexus 5 General] Thisal:
yes i also tried the 2nd method..then i get this error

C:\Users\Thisal>fastboot flash system C:\image-hammerhead-krt16m\system.img

target reported max download size of 1073741824 bytes

error: cannot load 'C:\image-hammerhead-krt16m\system.img'
[Nexus 5 General] Primokorn:
Can you post the full log? Do you have an unlocked bootloader?