I wanted to share this for others who might come across this post with the same problem.
This fix will work for ipods/iphones/etc.
What has happened is an itunes control or preferences file has somehow gotten corrupted on your device. Why Apple hasnt built the option to do this into itunes is beyond me. In effect you may lose your music library on the device but all contacts/notes/apps/etc will be untouched and fine. Apparently Apple thinks wiping the whole thing is a better option?
First try to delete one song from your playlist, and turn off/on your device. This will hopefully overwrite the corrupt database file. Try connecting to itunes again and see if that does it.
If the above doesnt work:
1) Download/Install "i-FunBox" which gives you control of the iPhone’s file system from your computer.
2) Open i-FunBox and search for iTunesDB or iTunesCDB. They should show up in a folder, ie; /var/mobile/Media/iTunes_Control/iTunes
3) Personally, I had to rename "iTunesCDB" "iTunesContol" and "iTunesPrefs" on my iphone 4 before mine sync'd to itunes again. Its always a better idea just to rename these files incase you need to go back or restore them. If for any reason you cannot rename them, then delete them as a last resort.
DO NOT delete or rename anything other than these 3 files!!!
Keep in mind you WILL LOSE YOUR MUSIC LIBRARY. Everything else will be OK though. (contacts/notes/apps/etc)
4) Open itunes again and reconnect your device. Voila!
Alternately, if youre jailbroken, open ifile and navigate to: /var/mobile/Media/iTunes_Control/iTunes
DO NOT RESTORE
- It could be one of two (or both) files are corrupt on your iPhone (or other iDevice), they are iTunesDB andiTunesCDB.
- There is an fast fix for this, even if your iDevice is non jailbroken.
- You want to disconnect your iDevice from your computer and close iTunes to ensure you DO NOT RESTORE.
- Download iFunBox or iTools a Free Tool for accessing the iDevice file system. It has both a OSX version andWindows version for download.
- After you download the version of iFunBox or iTools for your OS, you will need to install it and run it.
- After installing and running iFunBox or iTools, connect your iDevice to your computer.
- You will see a message in the Upper Right of iFunBox ”connecting to iDevice“, after iFunbox has connected to your iDevice, click on the tab “iFunbox Classic“.
- On the left panel, expand “Raw File System” (click on the +), then expand “iTunes_Control“, then click on “iTunes“.
- In the right panel you will see a number of files, right-click on the file “iTunesCDB” and select rename, please add X after the iTunesCDB in the file name, this will allow you keep the file in case you need it again (you should never need it, but better to be careful than sorry.)
- After you have renamed the file, click on your iDevice name on the upper right of iFunBox and select “Device Safe Removal“, this will ensure the file name change will be written back to your iDevice.
- After you see your iDevice is closed (“No device connected” will be displayed in the upper right), you should now close iFunBox
Now run Apple iTunes, it will see your iDevice and you will be able to Sync again.