Lost all my contacts after flashing custom rom (sg2) I got a Galaxy S2 as an upgrade from my HTC Hero around January this year. My phone contacts have always been synced to my Gmail account and the backup worked since I got all my contacts on my SGS2 from my HTC Hero. However, I flashed a custom ROM on my SGS2 and since then only 14 of my contacts have been retrieved. When I try to manually sync the phone with Google it still only shows the 14 contacts. I visited http://google.com/contacts and to my surprise I only have the 14 contacts there as well. 

How can I fix this problem? Do I have to flash it back to custom rom or is there any other way?
Via your desktop computer, go to the Contacts section in Gmail. Click the MORE button and then RESTORE CONTACTS.

You'll be shown a dialog box where you can pick a particular time to restore to within the past 30 days.

That should restore your contact data.

After that just sync your device.