yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] Thilan1:
It ended up as Boot images download completed and it was stuck at google logo. so i flashed stock image from fastboot then this comes up.

"target reported max download size of 1073741824 bytes

sending 'bootloader' (3120 KB)...

OKAY [ 0.298s]

writing 'bootloader'...

FAILED (remote: flash write failure)

finished. total time: 0.502s

rebooting into bootloader...

OKAY [ 0.113s]

finished. total time: 0.115s

target reported max download size of 1073741824 bytes

sending 'radio' (45425 KB)...

OKAY [ 1.582s]

writing 'radio'...

FAILED (remote: flash write failure)

finished. total time: 2.813s

rebooting into bootloader...

OKAY [ 0.086s]

finished. total time: 0.089s

target reported max download size of 1073741824 bytes

archive does not contain 'boot.sig'

archive does not contain 'recovery.sig'

archive does not contain 'system.sig'

archive does not contain 'vendor.img'

Creating filesystem with parameters:

Size: 13725835264

Block size: 4096

Blocks per group: 32768

Inodes per group: 8144

Inode size: 256

Journal blocks: 32768

Label:

Blocks: 3351034

Block groups: 103

Reserved block group size: 823

Created filesystem with 11/838832 inodes and 93654/335103

Cannot read image.

Creating filesystem with parameters:

Size: 734003200

Block size: 4096

Blocks per group: 32768

Inodes per group: 7472

Inode size: 256

Journal blocks: 2800

Label:

Blocks: 179200

Block groups: 6

Reserved block group size: 47

Created filesystem with 11/44832 inodes and 5813/179200 b

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

Bootloader Version...: HHZ12k

Baseband Version.....: M8974A-2.0.50.2.28

Serial Number........: 0b1323fd02b659ea

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

checking product...

OKAY [ 0.100s]

checking version-bootloader...

OKAY [ 0.096s]

checking version-baseband...

OKAY [ 0.095s]

sending 'boot' (9148 KB)...

OKAY [ 0.496s]

writing 'boot'...

OKAY [ 0.759s]

sending 'recovery' (10006 KB)...

OKAY [ 0.566s]

writing 'recovery'...

FAILED (remote: flash write failure)

finished. total time: 2.636s

Press any key to exit..."

---------- Post added at 03:44 AM ---------- Previous post was at 03:40 AM ----------

same problem here did u manage to solve it?
[Nexus 5 General] sathindukavneth:
Same here. Even if it listed in device manager,not detecting in here. So I have tried QFIL tool for this. It detect my phone. ButI couldnt find proper Qualcomm driversin MBN format for my Nexus 5X.
[Nexus 5 General] iksi:
Hello. Does aany can post proper files for nexus 5x 32 gb, and kddz files for flashing? Thanks and best regards.
[Nexus 5 General] user1919:
Hi, i have got fail on AP CHECK START "Waiting for the device to connect in flash prg", any ideas?
[Nexus 5 General] Kediil:
Tossed my Nexus 5 in the washing machine the other day, because, you know, stupidity.

Opened, wiped down, rice for 2 days. I tested the phone, and it worked, but wanted to remove any residues and reduce the risk of corrosion, so I followed at this point with a 99% alcohol bath for 2 hours, and a 24 hour dry out.

Now the danged thing won't turn on. Figures. Purely by coincidence did the three button power up with it plugged into the computer, which registered the Qualcomm HS-USB QDLoader 9008.

I know that the screen still functions as I have a busted screen backup and it loads this screen just fine, if with some slight colour haze/distortion.

AP, EMMC and SDRAM pass just fine.

My questions are:

Will running this remove my user files (texts, apps, etc.)

If so, is there a way to back up any of that data with the phone in this state? Mostly would like to get my texts, and notes, if possible

Thanks very much, all you hard working XDA people!

---

Went ahead and ran it. Everything finished without a hitch. Still no image though, and still coming up as Qualcomm HS-USB QDLoader 9008. :(
[Nexus 5 General] romangpro:
I finally got Nexus5 boot into QDLoader.

I flashed the 16GB file in thread. I also tried extracted partitions from TOT image.

I also tried using BoardDiag to flash the system, (took 30min) cache(took 20min), persist, modem, recovery, laf... manually one by one.

BoardDiag Flashes complete reporting success, but the phone is still not letting me flash factory/ota image.

I can't erase or flash recovery. I can't flash bootloader.

[WHAT IM GETTING]

target reported max download size of 1073741824 bytes

sending 'bootloader' (3124 KB)...

OKAY [ 0.300s]

writing 'bootloader'...

FAILED (remote: flash write failure)

finished. total time: 0.507s

[WHAT IM GETTING]
[Nexus 5 General] Segnale007:
Hello folks, it all started with the N5X stuck on google logo and now it wont turn on anymore. Red flash light will blink and phone is sometimes recognised as Qualcomm HS-USB QDLoader 9008.

Will doing this procedure wipe out the internal sdcard / data storage? My sister needs to retrive important data from this suddenly dead phone. We really dont care about the phone.

Phone is non rooted, bootloader unlocked. At least I need to restore bootloader functionality to try an attempt anything else. Than again, phone wont turn on.

Any help will be appreciated.
[Nexus 5 General] echow2001:
what partitions have the imei info?
[Nexus 5 General] PRO>KOMP.<:
Hi I have Nexus 5 16GB want to solder new eMMC 32GB do I need something more to do or only to flash files for 32GB variant via BoardDiag ??
[Nexus 5 General] PRO>KOMP.<:
Can anyone answer? :confused: :confused: :o
[Nexus 5 General] nleco:
I'm not 100% sure how my partition tables were screwed up. But maybe one was previously off and runing the repartitioning flash somehow brought it to light.

Anywho, I wound up following this to restore my partitions. I had to modify a bit in order to work on my windows 10.

I had to remove all C++ libraries from "remove software" and install just this (i'm on windows 10).

https://www.microsoft.com/en-us/download/confirmation.aspx?id=5555
[Nexus 5 General] Robert97520:
THANKS for this tutorial! You saved my dear old Nexus 5!
[Nexus 5 General] pharz:
Could you elaborate a bit on what you've done?

I'm trying to do exactly the same, fixing my working n5 which has a repartitioned /cache

I'm on windows 10 (in a vm) and the device doesn't show under com ports, only as bootloader or android device.

Thanks!
[Nexus 5 General] nleco:
To be completely honest, I don't recall. I believe I uninstalled any some packages and installed the one that downloaded when you clicked the link I provided. It was a while ago.
[Nexus 5 General] pharz:
OK, thanks for your quick reply!

I'll fiddle a bit more, trying to get ubports on the nexus but /cache has been recreated in the past and is too small now.
[Nexus 5 General] quest2012:
I have tried however the program crashes every time I try to select a folder , also I dont see the com port in my device manager , any help on this ?
[Nexus 5 General] ilciumbia:
What steps are you following exactly?
[Nexus 5 General] manit77:
Thanks that worked.
[Nexus 5 General] bitdomo:
I will be at home at 3pm GMT+1 timezone. Contact me on hangouts or email: toth.dominik92@gmail.com
[Nexus 5 General] Vanesso:
Hi, everyone. I tried to use this method, but i got a message "device was not found in dload trying flash programmer". Can anyone help me? I have d820 16gb.
[Nexus 5 General] bitdomo:
Do you see Qualcomm QHS-USB QDloader 9008 device in device manager? Have you installed qualcomm drivers? Have selected the correct port number?
[Nexus 5 General] Vanesso:
Yes, i see qualcomm 9008. i select correct com port
[Nexus 5 General] bitdomo:
Press and hold volume_up+volume_down+power keys until the device reconnects
[Nexus 5 General] alcocar:
Please help

Hi! Unfortunately, this doesn't help. i have D821, 16GB (LGD821AT-00-V10e-NXS-XX-JUN-12-2014-KTU84M-USER-16G tot file) and i selected Com Port right. it says "No response from the device. Check PMIC first and if still boot problem, replace AP". I tried checking "PMIC ON", but now it says "Device was not found in dload trying flash programmer". After that i tried to check other buttons, but nothing changed - still "Device was not...". Is there anything else what i could try? Thank you!
[Nexus 5 General] bitdomo:
Open device manager and look at Qualcm HS-USB QDLoader 9008.

On the phone press and hold POWER+VOLUME_UP+VOLUME_DOWN until you see Qualcomm HS-USB QDLoader 9008 reconecting in the device manager. Also double check the port you use.
[Nexus 5 General] lsaman:
Nexus 4 stucked in 9008 mode

Hi Bitdomo,

I have a Nexus 4 in 9008 brick mode. I tried boardiag but i get

failed to open partition from emmc

Can you help?
[Nexus 5 General] bitdomo:
I have no idea what version of the tool you use with wath files, but try this

If you get the same error probably the emmc is dead.
[Nexus 5 General] lsaman:
Test results

Hi

Thanks a lot for you quick reply

I tried the boardiag version you provided

Still get the same emmc error message
[Nexus 5 General] RolF2:
will this tool work for N5 with replaced new emmc, or emmc must be partitioned before soldering ?

R.
[Nexus 5 General] bitdomo:
It will work, but with a blank emmc you dont have efs=>no signal, misc=>you cant use lg flashtool or lock unloxk bootloader and persist=> bootloops on lollipop
[Nexus 5 General] RolF2:
that's not a problem, just asking if this tool can create all needed partitions on blank emmc .
[Nexus 5 General] alcocar:
Phone doesn't responde on any kind of pressing any buttons combination. Nothing changed.
[Nexus 5 General] bitdomo:
Then reconnect the battery. I hope that will help
[Nexus 5 General] MrKaon:
Thanks for this tutorial.
[Nexus 5 General] bitdomo:
OP updated.

I want to make a little comment about this boarddiag tool, and how it works.

Emmc test:

Erase: erase the whole emmc. Even if you select a partition from the dropdown menu,

Read only: Only reads random blocks from the emmc. If you check DUMP it will read back the amount of blocks of a the chosen partition given in the partition.txt

Write only: writes dummy data to the emmc (55AA hex values and some other other random writes on the actual partition).

Read/Write: writes dummy data to the emmc (55AA hex values and some other other random writes on the actual partition) and then verify them by reading it back​

SDRAM test:

I think this test the memory. There is a Level option for it. I dont know what is the differance between the two.​

PIMC ON:

No idea, but in some LG documentations it is for only APQ8064 chipset.​

Restore boot img:

Restores the images.​

How it know which partitions have to be restored?

There is a rawprogram0.xml in model\Nexus5 (MSM8974_HammerHead)\boot_partition_info folder.

The partitions declared here will be flashed to the device if you select nothing in the partititon dropdown menu or in the restore boot img dropdown menu

Boarddiag only cares about the "label" value (have to be tha same as in partition.txt) from rawprogram0.xml. The rest info like startblock, files size and file name will be acquired from the partition.txt.

Partition.txt is a binary file:

0x00-0x03: start block

0x04-0x07: file size in block numbers ( 1 block = 512 byte)

0x08-0x0F: always zero

0x10-0x2F: partition name (must be the same as the label value in rawprogram0.xml)

0x30-0x4F: file name

and the pattern goes on.​

I wrote a little program which converts this binary partition.txt to an actual txt. You can get it from here

Copy the partition.txt to the same folder where the bin2txt and txt2bin exes are. Run bin2txt then it will create a readable_partition.txt file. Edit it with notepad++. The start block is in HEX and the file size is in bytes (must be multiple of 512). Partition entries is the number of partition declared in the partition.txt. If you done with the editing then run txt2bin and it will create a new_partition.txt file.​
[Nexus 5 General] alcocar:
Already tried this too. I'm afraid, that EMMC is dead and nothing will help...
[Nexus 5 General] Alexander T.:
Thank you a lot, man! You saved my brand new phone, which was bricked by 'fastboot flash bootloader bottloaderxxxxx.img' (original bootloader from latest LMY47I nexus 5 google factory image) command for some unknown reason (maybe, bad drivers, or USB port).

Just out of curiosity, I'd like to ask you few questions:

1. Do we need to always flash Primary and Backup GPT while restoring boot?

2. Is the Primary GPT and Backup GPT included for the 32GB version are the real dumps from 32GB version, or it is only the Primary GPT 'dd'ed from other working phone?

3. Does Google include all these files (aboot, abootb, gpts, sbl etc...) in its bootloaderxxxx.img file? I mean, which partitions and other files are being flashed to phone while executing the 'fastboot flash bootloader bottloaderxxxxx.img' command? is there a way to extract the bootloaderxxxx.img file to look what's inside?
[Nexus 5 General] bitdomo:
1. Not needed. If you dont want to restore primary and backup gpt then just remove the corresponding lines from rawprogram0.xml file.

2. Only the primarygpt is a real dump from a 32gb nexus 5. I could not find out the right dd command to read ohly the last 512 kbytes of the emmc. So I decided to make it manualy from the primary GPT. I read some documentations about the gpt structure and how it calculate the CRC and used the GPT of the 16GB as sample to convert the primary gpt to a backup gpt.

3. Yes it includes but not the gpt files. aboot, sbl1 rpm, sdi, tz, imgdata get flashed to the right partitions and it will also update the backup partitions: abootb, sbl1b, rpmb, tzb ( using ota, or flashing bootloader with zip in recovery will not touch the backup partitions)

There isnt any way to extract the bootloader*.img yet, but if you want I figure out the structure of it and write a program which extracts it.
[Nexus 5 General] Alexander T.:
While restoring with boarddiag I have flashed the GPTs as well. So, basically, is there any difference in what was before (factory shipped) and what is now or it is absolutely the same gpts bitwise?

Thanks!!
[Nexus 5 General] bitdomo:
If you had same "factory version" (LG term, dont confuse it with factor firmware or stock rom) as jd1639 then it must be 100% the same. If it was not the same then only the unique partition guid entry would be different and because of that the crc checksum of the partition table and the gpt header check sum would be different as well.
[Nexus 5 General] Alexander T.:
So, in terms of functionality, it doesn't matter at all (different GUID and CRC), right?

BTW, where can I check the exact factory version?

And my last question:

What happens to important partitions as 'misc', 'persist' etc, when a 16GB version GPT is being written to emmc. Are they left intact, and only the last partitions as userdata are relocated and assigned different size?

My knowledge of the internal structure is not too deep, but searching xda did not return too many topics on that, so I'd still would love to fill the gaps in skills. Your explanations are valuable to me :)

Thanks for taking time and answering my dummy questions.
[Nexus 5 General] bitdomo:
To your first question: yes, it does not matter at all in functionality.

To your second question: the 16gb and 32gb model has the same size and same start address and same layout for every partition except the last two userdata and grow (about 5kb in size nevet used by any part of the phone).

So if you use the 16gb files nothing will happen to the important partitions, but your nexus becomes a 16gb one.
[Nexus 5 General] marconeandrade:
HS-USB QDLoa

Hello man works on nokia x?

I have the same problem with a Nokia are recognized as HS-USB QDLoader 9008 : Choro:
[Nexus 5 General] bitdomo:
No
[Nexus 5 General] Vanesso:
Hi, everyone. I try to use this tutorial, but nothing. I always get a message "Device was not found in dload trying flash programmer". ALWAYS! I try to use any buttons, but nothing. I select correct com port, i have qualcomm 9008. Can anyone help me?
[Nexus 5 General] bitdomo:
Oepn device manager

Right click on Qualcomm qdloader 9008 then cick on Properties

What do you see in the Device status?
[Nexus 5 General] Vanesso:
Device is working properly.
[Nexus 5 General] bitdomo:
I have to check this more closer.

Do you allow me to connect to your PC through teamviewer? If you allow then please send the login infos to my email: toth.dominik92@gmail.com
[Nexus 5 General] xitopodo:
Superb!!!

The only method that has revived my Nexus 5 after a brick.

I must thanks you a lot....

I will take a beer in your name. Regards from Spain! :)
[Nexus 5 General] febianuy:
Hi. Im also getting "Device was not found in dload trying flash programmer" error. Driver is properly installed, device detected and the correct com port selected. But i keep getting that error. I tried in my father laptop and the same happens. I have 3 logic boards to try.

They dont output video, i managed to start them in downgrade mode and flash the tot file with lg flash tool but they are as before, no video.

Do you think i can fix them with this tool?

Thank you
[Nexus 5 General] bitdomo:
I dont really understand you. I have no idea what are you trying to tell by that you have 3 motherboards to try and how you could get into download mode if the phone only boots to qualcomm qdloader mode and with the boarddiag tool you could not reflash the bootloader in order to enter download mode or fastboot mode.

Anyway if you get that error message try these:

Connect phone to the PC.

Open device manager.

Press Power+volume_up+volume_down untill you see the Qualcomm qdloader 9008 device reconnecting in the device manager.

Try again with boarddiag.

If not works

Remove USB cable.

Remove battery.

Comnect USB cable.

Try again with boarddiag.

If not works

Remove USB cable.

Ground the emmc's clk pin

Connect USB cable

Remove the grounding from the emmc's clk pin

Try again with boarddiag.

If not works

Something is wrong with the motherboard.

Boarddiag tool will not fix any hardware damage.
[Nexus 5 General] Tech_Savvy:
[MENTION=4325732]bitdomo[/MENTION] will this work if my phone shows up as qhsusb bulk in decivce manager?
[Nexus 5 General] bitdomo:
Just after you installed the drivers. Read the OP everything is there
[Nexus 5 General] Tech_Savvy:
one more quick question...i want to test my emmc to see if its fried...would selecting read only work for that?
[Nexus 5 General] bitdomo:
It is fine to do the r/w test. Better to check the SDRAM test too because after a successfull emmc test the bootloader will be not restored then you have to hold the powerkey until you see the qualcomm qdloader 9008 device disappearing and reappearing again or removing the battery connectors if that not works. So if you check the SDRAM test too then it will restore bootloader. Keep in mind that SDRAM test takes about 5 minutes and also during this time your phone will not show up in the device manager. Just be patient the phone will reconnect when the test is done.
[Nexus 5 General] ashtic:
Hi man!

I've got a bricked HTC One M8 and after installing the Qualcomm drivers, my laptop recognizes my phone as a "Qualcomm HS-USB QDLoader 9008 (COM4)" port.

Is it possible to adapt your guide at any point so that I can unbrick my phone?

Thank you so much in advance! :)

PS. I attach a screenshot of my device manager after connecting my phone to my laptop.
[Nexus 5 General] franave:
You save my N5!!! I've hitted the button but I want to tell you T H A N K S!!!!!
[Nexus 5 General] Yogesh1969:
Adapting to other devices

Can we adapt these procedures for other devices. If we can how to go about it ? What files are needed and how to get them from a similar device?

Thanks.
[Nexus 5 General] bitdomo:
Maybe. What you will need:

Flash programmer

Essential images to make the phone boot. These are the generic: aboot, sbl1, (sbl2, sbl3), tz, rpm, boot, and there are some other necessary partitions which depends on the device for LG phones it is the laf. You will need the primary and backup GPT too if you want to fix them too.

Edit rawprogramm.xml

Make a partition.txt

The choke pont is to find a working flash programmer for you device.

But you can try an SDcard method. Some LG (like LG F460/LG G3 Prime,/LG G3 Cat.6) and Samsung (Note 3 ???) boots to download/odin mode if you make an emmc dump of a working phone and raw write that image to an sdcard. The dump size is determined by the start block of the system partition.
[Nexus 5 General] wasim74:
Asus padfone2 model a68 ( qhsusb_dload )

SORRY .. I KNOW THIS THREAD ITS FOR NEXUS 5 : BUT I NEED YOUR HELP I HAVE ASUS PADFONE 2 MODEL A68 WHICH IS HARD BRICKED WHEN I PLUGIN TO COMPUTER ITS SHOW CAN YOU TELL ME PLEASE HOW I CAN FIX IT I WILL APPRECIATED IF YOU GUIDE ME AND TELL ME WHAT I HAVE TO DO AND THANKS :confused:

---------- Post added at 02:25 PM ---------- Previous post was at 01:48 PM ----------

sorry .. I know this thread its for nexus 5 : But i need your help i have asus padfone 2 model a68 which is hard bricked when i plugin to computer its show( qhsusb_dload ) can you tell me please how i can fix it i will appreciated if you guide me and tell me what i have to do and thanks
[Nexus 5 General] bitdomo:
See above
[Nexus 5 General] wasim74:
Sorry above where what's the page number ??
[Nexus 5 General] bitdomo:
The post before your first post of yours
[Nexus 5 General] wasim74:
thanks bitdomo for the fast replied but the post which you mentioned to me its for nexus 5 and my phone its asus padfone2 model: a68 ?
[Nexus 5 General] bitdomo:
I am talking about this. You can give a try with the sdcard method.
[Nexus 5 General] wasim74:
hey buddy .. but my phone padfone2 it does not has sd card it has just internal storage which is 16 gb ?
[Nexus 5 General] bitdomo:
Then it is nearly impossible to unbrick your phone. Try to find the pins of the emmc and solder the pins to an sdcard reader by wires, then you can reflash the partitions.
[Nexus 5 General] wasim74:
oh boy .. this the only way to unbrick my padfone 2 ? there is no flash program to do that ?
[Nexus 5 General] bitdomo:
There is always a flash programmer. Locked behind 7 doors and sealed thight in the basemant of the motherboard develeopement team. You wont get it unless some who was involved in the developement leak it
[Nexus 5 General] wasim74:
am gonna try the ( ubuntu version 12.04 ) and let you what its gonna happened with me and thank you so much buddy you are awesome and you help us all the time ... and you reply very fast thanks again
[Nexus 5 General] ert69:
The link is dead! Please update it. I am dying over my bricked N5.
[Nexus 5 General] bitdomo:
I will get home in 20 minutes then I will check the links
[Nexus 5 General] bitdomo:
https://drive.google.com/open?id=0B...3pGYmdybkJHcGZ5STlJREIxcVlXa0pzdjg&authuser=0

I hope google drive works for you
[Nexus 5 General] ert69:
It sure does! Thanks!
[Nexus 5 General] WugFresh:
[MENTION=4325732]bitdomo[/MENTION] Thank you! This totally saved my development device today. Tried manually forcing my device into Qualcomm HS-USB QDLoader 9008 mode to use this to repair the partitions and Bingo!
[Nexus 5 General] Quentincc:
Hello, thank fot the tutorial but i have a problem, i have been flash with a 32Gb zip on my 32Gb Nexus 5 motherboard but when i flash a stock 5.1.1 rom with NRT and i go in storage setting, i have only 16Gb.

Please help me
[Nexus 5 General] bitdomo:
Do a factory reset in stock recovery.
[Nexus 5 General] Quentincc:
Stock recovery can't do a factory reset, I have flash 4.4.4 because i prefer it than 5.1.1, I have try to factory reset with TWRP and CWM and i have still 16Gb on OS but 32Gb on the bootloader screen.

My N5 is a D821.
[Nexus 5 General] bitdomo:
Why you cant do a factory reset?
[Nexus 5 General] Quentincc:
I can't on the stock recovery, when i try to go on stock recovery i have this image : http://cdn.howtogeek.com/wp-content/uploads/2012/12/android-recovery-mode.jpg

I can Factory reset on TWRP and CWM but I have still 16Gb on OS
[Nexus 5 General] bitdomo:
Hold down power key then press and release volume_up key