iTune doesn't recognize the iPhone

I have received a used iPhone from the US unlocked and jailbrocken. Software version 3.1.2. When connecting to iTunes after I have created an account I get the following message: "iTunes cannot read the content of the iPhone "iPhone". Go to the Summary tab in iPhone preferences and click Restore to restore the iPhone to factory settings."
The phone serial number is recognized by ITunes but it doesn't let me sync, backup or access the Apple store.
iTunes works fine from the phone and I can download apps with no problem.
Has anyone experienced this problem? I would hate to restore since I received some apps with the phone that I wouldn't like to loose.

Your help will be highly appreciated.

Thanks
It's because the apps are tied to someone else's iTunes acct. Restoring to factory settings thru iTunes will erase everything on the phone and upgrade u to iOS4.0 and you'll lose ur jailbreak and unlock.
Thanks,

So what are my options?
What flavour iPhone is it? 2G, 3G, 3GS?
The phone is a 3GS

Original thread: https://forums.imore.com/threads/itune-doesnt-recognize-the-iphone.194806/