I got a used iphone 2g running ios 3.1.2 recently. The owner did the same
thing and the phone stuck in the connecting to itunes. I made it work by
restoring to the iOS 3.1.2 and jailbreak it using blackrain. Here is what
you may want to try:
1) download the iOS3.1.2 or iOS3.1.3 from internet. Just google the keywords
, you will find websites to download these iOSs. And install the iOS to your
iphone via itunes.
2) download the blackrain to your mac computer (google it, you will find a
link to download as well). Close itunes, and run blackrain on your mac
computer. Make it rain... You will have your phone jaibroken. And the
blackrain app will show in your phone.
3) Install cydia from blackrain app. If you got stuck in cydia, use the
safari on your phone to visit jailbreakme.com, they will help you jailbreak
your phone with a fixed cydia.
4) run cydia and search in cydia for bootneuter.
5) Install bootneuter. You phone will have to restart
6) unlock your phone by bootneuter (you can find instructions on using
bootneuter by google)
Good luck!