Fortunately I'm still able to access it using SSH, but I have no idea what to do. I have restore the firmware, so there's no SSH now...
Some may suggest I restore the firmware, but iTunes fails to recognize it (saying 'unknown error'). I've tried QuickPwn twice, but it did NOT make ANY progress when it gets to the 'QuickPwn is about to run on your iPhone' after entering the DFU mode (I've waited for the whole dinner time).
If it could be of any help, here's what I regret to have done:
1. I wrote a little app and copied it into the iPhone using SSH. Then placed it under /Applications/ , and deleted /private/var/mobile/Library/Caches/com.apple.mobile.installation.plist.
2. I reboot my phone and when it came to the Logo, the Xcode prompted a dialog asking me whether to use this iPhone for development. I chose 'Use for development', and thus both Xcode and my phone froze. I force-quitted Xcode, but the phone wouldn't pass the Logo.....
3. I had to 'Home+Sleep' reboot many times but still unable to go passing the Apple Logo.... Sometimes iTunes will discover an 'iPod' is connected but failed to connect to it. Xcode can read the info of the phone (name, id, sn, etc.) but still freezes at 'use for development'. And I noticed that when the phone have stayed a long time at the Logo, it vibrates for a second, and over another long silence or so it either vibrates again or flashes....kinda rebooting....
4. I found that SSH still works, so I deleted that little app on the iPhone, but I had failed to backup that xxxx.plist file.... And the problem is still there....
btw, my phone is 2.2.1 jailbroken but not unlocked since I had upgraded thru iTunes

....
Can anyone help me out? Is the Xcode 'Use for development' related to this issue? Or just that I should find back my xxxx.plist? Or any other methods that can restore my firmware???
*EDIT 1: More frustrated, I just tried restoring it in 'Recovery Mode'. The good news is that it did let it recognized by iTunes and restored to Apple's firmware, while the bad news is that QuickPwn was again stuck at the 'QuickPwn is about to run on your iPhone 3G.' and have to be force-quitted. The jailbreaking fails!!