Fastboot flash failed: error too many links

Search This thread

Xeroproject

Member
Jan 16, 2009
20
0
Seattle, WA
How to Restore your phone on a Windows PC using a Nandroid backup

I am going to assume you already have a Nandroid backup created on your SD card using JF 1.31's recovery Alt-B feature. The backup will create a folder called nandroid on your SD.

What you need:
The Android SDK:
Fastboot Windows Binary in this post:http://xdaforums.com/showpost.php?p=3083753&postcount=1
From your Nandroid backup you need three files:
data.img
system.img
boot.img

Steps to restore your phone
1) Put the files Adb and AdbWinApi.dll from the tools folder in the Android SDK into C:\WINDOWS\System32 folder on your PC. Substitute the correct drive letter if windows is not installed on you C: drive
2) Put the Windows Fastboot.exe into the C:\WINDOWS\System32 folder on your PC
3) Create a folder on the C: drive of your PC called android. The path should be C:\Android.
4) Copy the Nandroid backup files data.img, system.img, and boot.img from your SD card to the folder called Android you created by mounting your SD card as removable disk.
5) Unplug the USB cord and power off your phone
6) Power up your phone by holding CAMERA+POWER, you should see three androids on skateboards. If you don't see this go install the Engineering boot loader
7) Plug the USB cord back into your phone and press back. The screen on your phone should say fastboot.
8) Make sure your pc is using the correct driver. Open the device manager on your pc. It is helpfull to have all other USB storage devices besides your phone unplugged for this part. Look for a USB Mass Storage device in the list of the USB devices. Right click on it and update the driver. Pick the option to browse for a driver on your pc. The driver is located in the Android SDK your downloaded in the folder called usb_driver. If this is done right you will now see a device called HTC Dream
9) Press start, go to run and type cmd (If you are on Vista just type cmd in the search box and hit enter). The command prompt will pop up.
10) Type cd C:\android
then enter the following commands:

fastboot flash system system.img
it will say Sending, then writing and say OKAY if it was successful
then type
fastboot flash userdata data.img
wait for the second OKAY and type
fastboot flash boot boot.img
wait for the second OKAY and type
fastboot reboot

Your phone should now be restored exactly as you had it when it was backed up.

I'm young yet in my android/linux learnings and this guide here is great. I've been soaking in information for weeks now on the boards but still, my kungfu is weak.

Hence I'm having an issue today and I've been working on it almost all day so far. Something happened and I ended up having to factory restore my phone and I'm attempting to recover from my nandroid backup files.

I've followed the above instructions to the letter, but now that I'm ready to do the actual fastboot flash system system.img command, I keep getting a "FAILED <command write failed <Too many links>> error". And I've searched high & low looking for a solution to this.

My HTC is correctly running in Fastboot as an ADB Interface in WinXP Pro SP3, I've got my nandroid backup files placed in the C:\Android folder on my pc as directed. Fastboot is in the /system32 folder (and in cmd Fastboot devices lists my phone), but I keep banging my head into this error over & over. Its driving me pretty insane and any help would be appreciated. I know you guys aren't a support desk and I'm probably screwing up something elementary, but I just wanted to say that I'm finally asking as a last resort. I've been trying to figure this out myself for about 9 hours now. My thanks in advance.
 

infernix

Senior Member
Oct 7, 2007
116
64
I've followed the above instructions to the letter, but now that I'm ready to do the actual fastboot flash system system.img command, I keep getting a "FAILED <command write failed <Too many links>> error". And I've searched high & low looking for a solution to this.

If it transfers the image to the phone but aborts halfway or at the end, try adding a ferrite core to your usb cable at the host side, or use one with an integrated ferrite core.

Unfortunately we don't have the source to the SPL so I'm mostly clueless what the "too many links" error means. Alternatively, try on a different pc.
 

Xeroproject

Member
Jan 16, 2009
20
0
Seattle, WA
If it transfers the image to the phone but aborts halfway or at the end, try adding a ferrite core to your usb cable at the host side, or use one with an integrated ferrite core.

Unfortunately we don't have the source to the SPL so I'm mostly clueless what the "too many links" error means. Alternatively, try on a different pc.

Thanks for the suggestion, I'll have to see if I can find a suitable USB cable, although from some inquires to linux buddies more in the know, I was told it was indicating a "a circular reference symlink" either in fastboot or in the command I used.

Considering I used exactly the commands in the guide, I'm puzzled. Also, I pulled the fastboot.exe for win32 from JF's own attachment.

Regarding another PC, yes, that would be ideal for troubleshooting this, however the pc I have at home is Vista 64bit (unfortunately), so shouldn't I run into issues there?
 

neoobs

Retired Moderator
Mar 25, 2008
1,239
11
Hrm, sorry about the few posts in here mods, it seems my issue isn't related to a mistype in the command line of trmacdonal's guide like I thought it was, so its most likely not related to this thread & needs to be split into a separate thread to prevent clutter.

I have noticed something regarding my situation: in command line when I type "fastboot devices" it recognizes & lists my phone. However when I type "adb devices" it does not list my phone. Might this be related?

ADB won't see your device till it has booted into android.

And send me a PM with the post numbers and a new thread title and I will move your posts and any posts related to them.
 

Xeroproject

Member
Jan 16, 2009
20
0
Seattle, WA
So unfortunately getting any work done on this on my Vista machine has been a total no-go. Vista won't take the 64-bit homebrewed driver, regardless of disabling driver authentication.

So I'm stuck. Day 2 here and I still get the "too many links" error. I've since retraced all my steps, redownloaded the SDK, JF's fastboot-win32, and completely removed all drivers from the system (including registry entiries) then reinstalled everything, and tried a shielded USB cable today. Still pulling up that error.

Is there any information I can include that would help pinpoint whats causing this issue?
 

JesusFreke

Inactive Recognized Developer
Oct 23, 2008
736
54
Dallas
So unfortunately getting any work done on this on my Vista machine has been a total no-go. Vista won't take the 64-bit homebrewed driver, regardless of disabling driver authentication.

So I'm stuck. Day 2 here and I still get the "too many links" error. I've since retraced all my steps, redownloaded the SDK, JF's fastboot-win32, and completely removed all drivers from the system (including registry entiries) then reinstalled everything, and tried a shielded USB cable today. Still pulling up that error.

Is there any information I can include that would help pinpoint whats causing this issue?

Have you tried booting normally at least once?

Maybe try "fastboot erase cache", then try again?
 

Xeroproject

Member
Jan 16, 2009
20
0
Seattle, WA
Have you tried booting normally at least once?

Maybe try "fastboot erase cache", then try again?

If you mean booting normally into Vista 64, yes, it sees the G1 as an "unknown device" in Device Manager and when I point it to the 64-bit driver, it won't take it. Same for when driver auth is disabled. (although the message changes from "no device drivers found" to "this driver is not compatible with your device)

If you mean the phone, yes, the phone works, its not bricked, but there's a lot of data I'm losing if I can't solve this issue & backup from my nandroid backups.

I'll give the erase cache thing a shot now and post results, thanks for the suggestion. :)
 

Xeroproject

Member
Jan 16, 2009
20
0
Seattle, WA
interesting, the "fastboot erase cache" command also returns a "FAILED <status read failed <Too many links>>" error

Perhaps the problem is with the fastboot.exe file?
 

JesusFreke

Inactive Recognized Developer
Oct 23, 2008
736
54
Dallas
interesting, the "fastboot erase cache" command also returns a "FAILED <status read failed <Too many links>>" error

Perhaps the problem is with the fastboot.exe file?

I doubt it. I remember seeing this error once when I stopped a fastboot flash while it was doing it's thing. I don't remember exactly what I did to fix it. I thought I just rebooted or something.

It's a shot in the dark, but maybe take the battery out for a few seconds and put it back in and try again?

I would also try any and all of the fastboot commands :)

If nothing else, you could try reflashing the engineering SPL, or even the RC29 nbh.
 

Xeroproject

Member
Jan 16, 2009
20
0
Seattle, WA
I doubt it. I remember seeing this error once when I stopped a fastboot flash while it was doing it's thing. I don't remember exactly what I did to fix it. I thought I just rebooted or something.

It's a shot in the dark, but maybe take the battery out for a few seconds and put it back in and try again?

I would also try any and all of the fastboot commands :)

If nothing else, you could try reflashing the engineering SPL, or even the RC29 nbh.

Yeah, I wish I knew the cause of it, but the initial use was uninterrupted (and everytime I reboot, I will get 5-10sec lag before getting the error, while after that the error will popup immediately)

I'm happy to try any of the fastboot commands, but being a little nubbin, I'm a little afraid of doing any damage. I did try fastboot reboot and fastboot reboot-bootloader and got no response from the phone. "fastboot devices" immediately sees my phone. "fastboot flashall" returns: "error: neither -p product specified nor ANDROID_PRODUCT_OUT set".

Removing the battery is something I've done a couple times the other day, just gave it another shot now, same result. I've noticed the too many links error will say it "failed to read" on the first attempt, after that it reverts to "failed to write".

Concerning reloading the phone back to RC29....you mean taking it back to RC29, then reflashing the Engineering SPL, then immediately trying to backup from my nandroid backups? (prior to installing any of the JF OS versions?)
 

pramods

Senior Member
Oct 24, 2008
65
12
I have also faced this error few time, what I do is disconnect the USB, restart both PC and G1, next time I get proper connection, once time I was able to resolve just by moving the ramdisk.img and kernel file from the directory, this was when I was using the fastboot -w flashall command!!

-Pramod
 

Xeroproject

Member
Jan 16, 2009
20
0
Seattle, WA
Might be onto something there JF, I just checked my SPL edition and I'm running the HardSPL not the EngineSPL.

Is the HardSPL not suited for this perhaps?
 

pramods

Senior Member
Oct 24, 2008
65
12
for fastboot -w flashall to work you need to set the ANDROID_PRODUCT_OUT variable, where boot.img, recovery.img and system.img file are, on window just use the set command
set ANDROID_PRODUCT_OUT=c:\<your directory where the files are>
and then run fastboot -w flashall

-Pramod
 

Xeroproject

Member
Jan 16, 2009
20
0
Seattle, WA
for fastboot -w flashall to work you need to set the ANDROID_PRODUCT_OUT variable, where boot.img, recovery.img and system.img file are, on window just use the set command
set ANDROID_PRODUCT_OUT=c:\<your directory where the files are>
and then run fastboot -w flashall

-Pramod

Alright, I'm with you, just returned "error: could not load android-info.txt"
 

pramods

Senior Member
Oct 24, 2008
65
12
The same directory also need to have android-info.txt file, this file just have a single entry as board=trout in it, if you don't have it create this file and then run fastboot again

-Pramod
 
  • Like
Reactions: Suncatcher16

Xeroproject

Member
Jan 16, 2009
20
0
Seattle, WA
The same directory also need to have android-info.txt file, this file just have a single entry as board=trout in it, if you don't have it create this file and then run fastboot again

-Pramod

Alright, so I did a search on my computer to see if I had an android-info.txt I could copy over, didn't have anything (including in the android-sdk files). So I went ahead and created one and just put "board=trout" in it like you said. New error: "getvar:version-bootloader FAILED <command write failed <Too many links>>"

Progress?

btw Pramod, you're a stud, thank you for all these suggestions
 

JesusFreke

Inactive Recognized Developer
Oct 23, 2008
736
54
Dallas
I've noticed the too many links error will say it "failed to read" on the first attempt, after that it reverts to "failed to write"./QUOTE]

Do you mean on the first attempt after a reboot?

This makes me suspect usb issues. Do you happen to have any usb cords with a ferrite bead on them laying around that you could try?

Reboot, and then try flashing one of the splash images. They are relatively small, so if it is an issue with usb communication, there is less of a chance of it failing. Try it a couple of times.. if you can get it to work once, then I would say it's more than likely some sort of usb communication issue, bad cable, interference, etc.
 

Xeroproject

Member
Jan 16, 2009
20
0
Seattle, WA
I've noticed the too many links error will say it "failed to read" on the first attempt, after that it reverts to "failed to write"./QUOTE]

Do you mean on the first attempt after a reboot?

This makes me suspect usb issues. Do you happen to have any usb cords with a ferrite bead on them laying around that you could try?

Reboot, and then try flashing one of the splash images. They are relatively small, so if it is an issue with usb communication, there is less of a chance of it failing. Try it a couple of times.. if you can get it to work once, then I would say it's more than likely some sort of usb communication issue, bad cable, interference, etc.

Yeah, the first attempt after a reboot.

Yeah I actually picked a ferrite bead USB cable up the other day and then I also shut off my speakers (just in case a magnet or something was causing interference). Just checking around my desk at work, I don't really have anything else that would interfere to my knowledge. We deal with high speed check scanners at work and I haven't had any issues with the images they pull (also via USB, same computer).

I'll give the image deal a whirl, I believe I have all that software for converting them already on my computer.
 

pramods

Senior Member
Oct 24, 2008
65
12
Just try one more thing, creat a new directory and put all *.img files and *.txt file there and reboot your system(PC and G1[fastboot mode]) then set the ANDROID_PRODUCT_OUT variable and then fire the command fastboot devices , if the fastboot return the device identity then try fastboot -w flashall command

-Pramod
 

Xeroproject

Member
Jan 16, 2009
20
0
Seattle, WA
Just try one more thing, creat a new directory and put all *.img files and *.txt file there and reboot your system(PC and G1[fastboot mode]) then set the ANDROID_PRODUCT_OUT variable and then fire the command fastboot devices , if the fastboot return the device identity then try fastboot -w flashall command

-Pramod

All *img & *txt files off the SD card you mean?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    for fastboot -w flashall to work you need to set the ANDROID_PRODUCT_OUT variable, where boot.img, recovery.img and system.img file are, on window just use the set command
    set ANDROID_PRODUCT_OUT=c:\<your directory where the files are>
    and then run fastboot -w flashall

    -Pramod
    1
    The same directory also need to have android-info.txt file, this file just have a single entry as board=trout in it, if you don't have it create this file and then run fastboot again

    -Pramod
    1
    Had this problem as well

    Had this problem as well used a ferrite core on 2 cables (a random cable and the default cable) neither worked. Then I stopped using the usb ports at the front of my computer (they seemed a bit dodgy not recognizing devices etc.) and used one at the rear.

    Worked immediately :) no reboot etc.
    1
    Same problem here, just changed the usb cable and everything worked fine!

    thank's
    1
    I flashed the stock recovery and when I flashed it(fastboot rebootRUU abd the fastboot flash firmware.zip(I had my european rom 989 mb renamed) it said sending zip and then parsing rom and then FAILED too many links. What should I do?