Hello there,
I had an unlocked iPhone 3GS (dunno what kind of unlock it was), but it totally crashed: it turned off and wouldn't turn on without plugging it to the charger or to iTunes, and when it turned on, only that "connect to iTunes" screen would show. Well, I decided to upgrade it t 4.0.2...