iTunes cannot read the contents of the iPhone

by JC on October 5, 2008 · 45 comments

in Settings

If, like me, you spent days hacking your iPhone to make it work on an unofficial cell phone network, then you can understand how scary it is when iTunes tells you that it wants to restore the phone to factory defaults.

If I’d followed iTunes advice my phone would’ve been rendered useless. So, I was quite pleased when I discovered another fix.

It seems that my phone went on the fritz in the middle of exporting images to iPhoto. So I found a fix online where you delete the contents of the media folder, then when you reconnect to iTunes you get the option to load a the backup. No restore, no factory defaults, all is good!

If you have command line access to your phone you can use the following:

rm -R /var/root/Media

Otherwise you can connect via SSH or SFTP and delete the files manually.

[UPDATE]

Please read the comments, the best fix is from Bosaka, but as new updates to iTunes and iPhones are are made things can change. The best bet is to read all of the comments below. This way you can be sure to get the right fix for your iPhone. I feel very strongly that this whole stance that Apple has taken to inhibit your access to your iPhone data and restrict carrier choices is very backwards, and we fully support everyone at Hackint0sh and the Dev Team in their efforts to fight this. You should check their sites for other solutions to iPhone and iTunes related problems.

Related posts:

  1. Gmail settings for iPhone & MacBook Pro
  2. Nicest support email ever from Bianca at iTunes Store
  3. An update to the carrier settings for your iPhone is available. Would you like to download it now?
  4. WordPress for iPhone
  5. Repair cracked iPhone screen

Sponsored links:

{ 45 comments… read them below or add one }

1 Danail Petrov October 24, 2008 at 2:22 pm

I’ve just got the same message on my iPhone but this clue doesn’t work for me. What is your iPhone version? I have iPhone 8G (old generation) with software version 2.1.

2 JC October 24, 2008 at 2:25 pm

I’m on an unlocked 8gb 1.1.2.

Do you have root access to your phone?

3 Danail Petrov October 24, 2008 at 3:00 pm

Yes, I have. Actually, I found what was the problem. Because I’m using a Custom Firmware which is created with symbolic links, I’ve had to remove the /private/var/mobile/Media/ as well.

Anyway, thank you for your effort! My explanation can be used from other people (or at least I hope so because this page comes at the first place in google result)

Kind regards,
Danail Petrov

4 JC October 24, 2008 at 3:07 pm

Thanks for posting your findings, I too hope this will help others.

Just out of interest, where did you get the custom firmware and what benefits does it have?

5 Danail Petrov October 24, 2008 at 3:51 pm

Well, I’ve downloaded it from a website. I can’t remember what was actually it’s url address but I can find it if you ask to. There are lot of programs which allows you to create even your custom firmware with your favorite applications as well. So once you have installed all the thinks you need, you can create your own image/firmware. It works like old school software called “Norton ghost” (if you’ve heard it).

6 bosaka October 24, 2008 at 7:42 pm

I have figured out more specific cure:
Instead of deleting entire “/private/var/mobile/Media folder”,
just delete “/private/var/mobile/Media/iTunes_Control/iTunes/iTunesDB” database file. Make sure also to remove (back up) media files from”/private/var/mobile/Media/iTunes_Control/Music”. Since database file is deleted these files will have no reference inside itunes anymore. You can add them again to iTunes later.

Next time you launch iTunes -will create new database file.

(I was using iphone 3G, Itunes 8)

7 JC October 24, 2008 at 9:46 pm

Danail, sounds cool, fire me the link if you find it.

bosaka, neat! 3g is my next purchase, just as soon as they iron-out those bugs.

8 alex October 30, 2008 at 4:31 pm

thnx bosaka…this works for iphone 3G 2.1….

9 abdullah October 31, 2008 at 4:33 pm

thank you :)

10 David November 2, 2008 at 2:37 pm

WOW!!! thanks a lot. i was going crazy here for a sec. works great.

11 sapir December 26, 2008 at 6:01 pm

thank you very much bosaka!!!

12 b January 3, 2009 at 9:52 am

You guys are the shit. Thank you so much. I was actually able to grab the photos I thought that were lost when I started the 2.2 restore in itunes without syncing my pix. WOHOO!

13 vick January 24, 2009 at 8:59 am

yo boska boy…u fkin genius man….thanks it worked like butter….thanks

14 Sid January 24, 2009 at 2:32 pm

Bosaka…BOOYAKA! May ALLAH have Mercy on you for the advice. It was an immense help and provided much relief to me after over a month of being without my music and updates to my photo albums. JC, may the Most Gracious provide HIS Grace to you too for providing the forum on which this advice can be found.

PEACE!s

15 Appreciator January 26, 2009 at 12:51 pm

My appreciation to you.

Rgds

16 ahmed April 8, 2009 at 6:15 pm

bosaka you are the best thank you very much .

17 Darren Fava June 20, 2009 at 4:27 pm

Worked beautifully! Thanks very much!!!! especially bosaka! xxxx

18 Sean June 20, 2009 at 4:55 pm

Just a note to all the jailbroken 3.0 fw peeps out there…this fix will work for you too. I thought the jailbreak FUBAR’d my phone…but it was indeed this file that bosaka directs you to delete above.

1. Recover via iTunes.
2. Jailbreak
3. Use iFunBox or the like to delete the file above
4. Open iTunes.
5. Rejoice to the Deity of your choice.

Have a nice day =)

19 judas June 20, 2009 at 6:17 pm

This saved me!!!! THANK YOU VERY MUCH!!

20 NAT June 21, 2009 at 10:52 pm

Need help.. Mine is the 4GB software V. 2.1

I have this problem and I don’t know how to do the command thing, please provide full details.. Any help will truly be appreciated

21 luki July 4, 2009 at 8:55 am

just delete this :/private/var/mobile/Media/iTunes_Control/iTunes/iTunesDB” database file.(only itunesdb and not entire folder from var.,….)

22 yanie July 8, 2009 at 6:34 pm

sorry i m such an amateur here but how would you go about deleting that file luki!??? thanks in advance!

23 iphone_guy July 12, 2009 at 4:02 pm

i am having the same problem.. i tried looking for :/private/var/mobile/Media/iTunes_Control/iTunes/iTunesDB but i cannot find it.. do i do this from my phone or my PC and if so, where do i find it.. i am using a windows pc
PLEASE HELP??

24 Jay July 29, 2009 at 5:10 pm

Bosaka’s tips was really helpful, thanx alot dude : )

25 John August 9, 2009 at 4:14 am

Worked a treat for me on the wifes new iphone
Coulnt sync wanted to restore itself, seeing as thre phone was jailbroken this was not an option, i used iphone browser to delete the relevant files

Thanks so much :)

26 Thomas G August 17, 2009 at 5:04 am

Download the free programm WIN SCP – log on to your iphone with that programm – and read the comments above!

27 Cazzone August 17, 2009 at 1:24 pm

GOD BLEES YOU….I am trying for more then 1 week to find out how to fix this error..but thiss…WOW..this is the fastest and most simple way ever. Just use Ifunbox…and that is it. Thank you very much.

28 Zibest September 17, 2009 at 6:41 am

Lol, last but not least, I’ve found a stuff even better for those of you with OS 3+
I’m with 3.0.1 16Gb and this happened to me when I upgraded iTunes to 9. I disconnected the phone while on sync and since the phone didn’t responded, I made a reset (home and power buttons) and for two days, on different iTunes versions (7 to 9) on different computers (Win XP to Win 7), content of my phone couldn’t be read.
1) Then I ssh’ed today in /private/var/mobile/Media/iTunes_Control/iTunes and found some files named something.tmp1 and something.tmp2
2) … deleted iTunesDB
3) … renamed my something.tmp1 ( this file was 5M+ size and I guess this was the size of my original DB file) file in iTunesDB
4)… restarted iTunes on my computer and iTunes read my phone with all my files

29 firestormxtreme October 13, 2009 at 9:59 am

thanks bosaka worked a treat

30 V SHARMA October 18, 2009 at 10:29 am

It really worked.

I was about to restore again. Lucky I saw your post and saved a valueable time.

I am using Iphone 2g, with OS3.0.

Thanks a lot for post.

31 Rich October 18, 2009 at 10:45 am

worked perfectly! love it!

32 Pris October 19, 2009 at 3:11 am

Is iTunesDB the only one i should delete? Because I did that and itunes still won’t read it. Should I delete iTunesCDB as well?

Any help would be appreciated!

33 V Sharma October 19, 2009 at 12:02 pm

I followed Bosaka

“/private/var/mobile/Media/iTunes_Control/iTunes/iTunesDB” database file. Make sure also to remove (back up) media files from”/private/var/mobile/Media/iTunes_Control/Music”.

34 Monti October 20, 2009 at 10:28 am

i didn’t understand it. I’m using Windows Vista and not able to find what it private/var…
Please tell me step by step what to do

35 V Sharma October 20, 2009 at 10:51 am

To Monti,

those directries ( var,private etc…) are not part of your vista or laptop, those are iPhone directory structure. You can use winscp or ifunbox or other similar windows software / or ifile iPhone application to see such iPhone directries. Use google to search help for those software and you can download those also. I prefer ifile iPhone application as you have to just delete the files only. U can find ifile in cydia.
I think this will help you.

36 Zibest October 20, 2009 at 11:20 am

To Pris:
You can delete iTunes CDB too if you’re using iTunes 9+ on your computer.

To all: Every solution works fine but:
1) Bouyaka’s trick will make your device readable again but will delete ALL your media.
2) Not only “the best”’s solution will make your device readable but also all your media will be recovered.

And additional trick is the following (on OS 3+, itunes 9+).
There is a folder named “backup” in your media folder.
/User/Media/iTunes_Control/iTunes/iTunes Library.itlp/DBTemp/Backup
Browse thru it and you’ll find the last back up of your iTunesDB or iTunesCDB file. Just copy it from there to /User/Media/iTunes_Control/iTunes

Hmmm you also know that /User means private/var/mobile/

37 me October 22, 2009 at 6:58 pm

this kicks ass! thank you, it worked! I had to do a quick tutorial on ssh ( http://appadvice.com/appnn/2009/03/accessing-files-on-your-iphone-a-guide-to-sshsftp-for-windows-users-jailbreak/ ) but it worked!

38 yeaa October 23, 2009 at 2:21 pm

bosaka’s way is perfect, but if for someone it wont help just delete itunes_control and itunes will read your iphone and just restore from your backup which is done everytime you connect your iphone

39 paul December 19, 2009 at 10:23 am

thank you.. and i mean it!

40 Long Beach Kid January 18, 2010 at 3:49 pm

thanx alot bosaka!!! dammmm u saved my life….

i used diskaid to delete itunesDB and music… its free on download.com

41 BlackICE January 26, 2010 at 4:31 am

Nice! it really does work.

thanks a lot………..

42 Irfan February 4, 2010 at 3:07 am

i did as bosaka had recommended. it did work for me but the only glitch is that previously i had 3.70 Gb free with the same stuff, but now it has shrunken to 1.55 gb.
itunes shows Other as 3.29 Gb whereas i hadnt added anything after the problem started.
is there a sort of backup for the deleted itunes database. how can i recover the lost space

43 KAZ February 15, 2010 at 1:06 pm

I also had this problem of itunes not being able to read the contents of my iphone 3gs 16gb. at first bosaka’s fix didnt work! I discovered because I am using iTunes 9+ you also have to delete iTunesCDB file aswell as iTunesDB file. Both of these are found in: /private/var/mobile/Media/iTunes_Control/iTunes/. I also deleted files in: /private/var/mobile/Media/iTunes_Control/Music.
Hope this helps!

44 milan jain March 3, 2010 at 3:03 am

dear sir,

With reference to this post i without looking to the other post i deleted MEDIA folder completly after doing that the itunes issue was resolved but i have another problem the Camera Icon, Ipod icon, Sms Icon are hidden when i use an application to unhide it so that the same is seen on the springboard but it could not be seen when i try to put in a folder created by categories i can see only sms icon and i can use it but not the other two can someone help me

45 Nick La Riviere March 6, 2010 at 4:13 pm

I’ve had a frustrating morning dealing with this problem (was going to go for a bike ride, but instead spent the whole morning fixing this piece of crap), and now that I think I’ve made it work properly AND restore my music again without having to restore and unjailbreak my phone, I thought I’d summarize the steps to fix this problem for the next poor sucker who the phone craps out on.

This assumes that your phone is already jailbroken (I wonder if anyone who has a non-jailbroken phone ever experiences this problem?).

1) On a Mac using Cyberduck or a PC using WinSCP, view the files on your iPhone (google SSH Cyberduck iPhone if you need help with this step)

2) Navigate to /private/var/mobile/Media/iTunes_Control/iTunes/
and delete the file iTunesDB

At this point, iTunes will no longer give you the error message BUT, your music, ringtones, podcasts will still be taking up space on your iPhone but your iPhone won’t try to read them and iTunes won’t see them. The solution is the next step.

3) In Cyberduck (or WinSCP) navigate to /private/var/mobile/Media/iTunes_Control/Music and delete all of the folders in the Music directory

4) Go back one level to /private/var/mobile/Media and go to the Ringtones directory and delete them too.

5) Close iTunes and open it again, allow your iPhone to sync again. It should copy all your music, podcasts, and videos back to your phone, though depending on how much you have, it could take a while.

6) If you have Ringtones in your iTunes and they’re not going back on your phone after all of this, plug your phone in and select the iPhone in Devices in iTunes and click the Ringtones tab. Deselect ’sync ringtones’ and it will display a message warning you that all ringtones will be removed from you phone. Accept that and click ‘apply’. After the phone has finished syncing, select ‘Sync Ringtones’ again and click apply. Allow it to sync. That successfully put the ringtones back on my phone.

I did this on March 6th 2010 on a Jailbroken 3G 16 gig running the 3.1.2 OS and it worked fine. Good luck with your own phones, I hope this works for you and I summarized the instructions clearly enough.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: