Hello all !
This is my first post here! I'm really glad I've found your forum and I hope you can help me!
So, I'll first describe the devices&software I use and then I'll describe this problem I have.

1) Devices&software
- I have a 1st generation iPhone (the one with 8GB storage which comes initially with 1.1.2 firmware...if I remember well). This iPhone has the firmware upgraded to 1.1.4 (using a MS-Windows-way of upgrading). Unfortunately, the current state of this iPhone is (almost) bricked due to an unsuccessfull cydia installation. What I mean with "almost bricked" is this:
- the phone starts, it's wireless feature works, I can receive calls, but the SrpingBoard do NOT start, so...all I can see is that white apple on the black screen

- I decided to try and fix this "almost bricked problem" in the Linux way: using Linux xpwn to upgrade my firmware to 2.2.x which will hopefully repair my phone! I downloaded XPwn-0.5.7-Linux from here: Home - xpwn - GitHub

I'm testing it on two different machines:
- a desktop PC with Ubuntu 9.10 x86
- a Fujitsu-Siemens laptop with Ubuntu 9.04 x86
Basically, the problem is identical on both machines (both Ubuntu versions). So, here it is...


2) The problem
I followed exactly the steps in the README.txt of the Pwn-0.5.7-Linux directory. So, I first created the custom firmware with "ipsw" and then tried(!) to install it on the phone with "dfu-util" utility. Here are the exact steps I executed:

1 - I downloaded the "iPhone1,1_2.2.1_5H11_Restore.ipsw" from iClarified - iPhone - Where To Download iPhone Firmware Files From and copied it to xpwn directory

2 - I created the custom firmware with the command:
./ipsw iPhone1,1_2.2.1_5H11_Restore.ipsw my_iphone_2.2.1.ipsw -nowipe '-e "Phone Activation"' bundles/Cydia.tar bundles/YoutubeActivation.tar
The command was successfully executed!!! So, the "my_iphone_2.2.1.ipsw" was created...

3 - I connected the iPhone to the Linux machine using its USB cable and brought the iPhone to the DFU state by following exactly the steps&movie at iClarified - iPhone - How to Put an iPhone Into DFU Mode
All good until this next step...

4 - THE PROBLEM:I tried to install the "my_iphone_2.2.1.ipsw" custom firmware into the phone. I called the dfu-util command like this and I got the below output(this is copy/paste from my terminal):
Code:
./dfu-util 'my_iphone_2.2.1.ipsw' m68ap
---------------------------PLEASE READ THIS---------------------------
Please make certain that all iTunes related processes are not running
at this time (use Task Manager, etc. to end them). Your iPhone/iPod
must be placed into DFU mode AFTER iTunes had been turned off. This
 will allow me to talk to it without iTunes getting in beforehand.
USB Product ID of iPhone ought to be 0x1222
---------------------------PLEASE READ THIS---------------------------
loading: Firmware/dfu/WTF.s5l8900xall.RELEASE.dfu (58590)
loading: Firmware/dfu/iBSS.m68ap.RELEASE.dfu (118016)
dfu-util - (C) 2007 by OpenMoko Inc. Hacked by the iPhone Dev Team
This program is Free Software and has ABSOLUTELY NO WARRANTY

Opening USB Device 0x05ac:0x1222...
Found Runtime: [0x05ac:0x1222] devnum=31, cfg=0, intf=0, alt=0, name="UNDEFINED"
Setting Configuration 1...
Claiming USB DFU Interface...
Setting Alternate Setting ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0800
bytes_per_hash=1171, fileSize=58590
Starting download: [##################################################] finished!
state(4) = dfuDNBUSY, status(0) = No error condition is present
state(7) = dfuMANIFEST, status(0) = No error condition is present
unable to read DFU status
dfu-util - (C) 2007 by OpenMoko Inc. Hacked by the iPhone Dev Team
This program is Free Software and has ABSOLUTELY NO WARRANTY

No DFU capable USB device found
And then the phone suddenly "gets out" of the DFU state somehow. I can tell this because on subsequent calls of the "/dfu-util 'my_iphone_2.2.1.ipsw' m68ap" command, I get the "No DFU capable USB device found" directly (no other extra output)!
What happens here??? Can anybody help me to fix this?!

As far as I can understand, the iPhone is correctly identified as being in "dfuIDLE" state, then a download begins...and finishes successfully, and then the next 3 lines simply ruin everything:
Code:
tate(4) = dfuDNBUSY, status(0) = No error condition is present
state(7) = dfuMANIFEST, status(0) = No error condition is present
unable to read DFU status
While I execute this 4th step, this is what I can see in the /var/log/messages:
Code:
an 27 21:27:07 blackpearl kernel: [34756.784030] usb 2-3: new high speed USB device using ehci_hcd and address 34
Jan 27 21:27:07 blackpearl kernel: [34756.917008] usb 2-3: configuration #1 chosen from 1 choice
Jan 27 21:27:17 blackpearl kernel: [34767.093378] usb 2-3: USB disconnect, address 34
Jan 27 21:27:17 blackpearl kernel: [34767.370189] usb 2-3: new high speed USB device using ehci_hcd and address 35
Jan 27 21:27:17 blackpearl kernel: [34767.501929] usb 2-3: configuration #1 chosen from 1 choice
The first 2 lines correspond to the moment when the iPhone enters the DFU mode. Then, the 3rd line happens sometime in the execution of the "dfu-util" command above...and as you can see by watching at the log lines' timestamps, the 4th and 5th lines occur almost simultaneously (immediately after) the 3rd line.
So, why does this quick USB disconnect/reconnect occurs?

NOTE1: I must say that I tried the steps 1 - 4 several times with the same result!
NOTE2: I also must say I suspected something related to my hardware, but it's not the case: I also tried the deprecated "xpwn" utility from the xpwn suite (remember that I currently have firmware 1.1.4) and that utility worked!!! (I'll paste its output if required). Unfortunately, re-installing 1.1.4 didn't unbrick my phone, so I think I should insist on this dfu-util approach.

So, this is it! I hope I presented my problem clear enough! If there are other things needed, just ask for them and I'll answer!

Any advice and suggestions are welcomed!
Thanks,
Alex