Friday, March 13, 2015

iPhone: Repair black/white and corrupt photo thumbnails in camera roll


The iPhone camera roll photo thumbnail database can become broken and corrupt. This results in either black/white thumbnails and fully functional photos or functional thumbnails but black/white photos. Typically this happens when the users backup their iPhone camera roll photos to a computer without using iTunes, which is not even available for the popular Ubuntu/Debian/Fedora Linux distributions. The fix, which is described here, is to regenerate or repair the photo thumbnail database.

ios, fix, tutorial, guide, black, white, missing photo, missing thumbnail, photo error
Everyone should ensure that they back up the photos on their phones from time to time. Whether this is done to the cloud or to their home computer, a working routine is extremely important to prevent irreparable damage if one loses the phone. For iPhone users, backup to iCloud of the camera roll photos can be easily set up, although in the long run this is not a sustainable solution due to the space limitations on the iPhone itself as well as on iCloud. Simply put, keeping all photos ever taken on your iPhone is not a sustainable solution. Therefore, users should occasionally backup their photos to a computer to free up the storage space of their iPhone as well as iCloud account.

The process of backing up the iPhone photos from the camera roll can be performed through iTunes, although many users find it slow, bloated and sluggish. For Linux users, such as the popular Ubuntu and Debian users, iTunes is not even available. Thus, the use of a file manager to transfer the data in the DCIM folders is preferred by many for its transparency, and effectiveness. Unfortunately, it has been shown that backing up photos in this way may corrupt the photo thumbnail database, causing it to lose its sync with the camera roll. This results in either non-existent (black/white) photos, or black/white thumbnails when the users attempts to access their iPhone photos. This tutorial shows how to fix and repair the camera roll photo thumbnail database.

How to repair photos and thumbnails in camera roll

The likely most thorough fix to repair the iPhone photo and thumbnail database is to completely regenerate the database. This may sound like a daunting task, although the process is in actuality completely safe and every modified file can (and should) be backed up until the user can ensure that the photos and thumbnails in the camera roll are properly functioning.


Preparation:
For Windows and Mac OS X users, a utility (file manager) which can explore the file system is needed. Good free alternatives here are iFunBox, iExplorer and iMazing. It really does not matter which one you choose, since we will simply delete a few files in a directory on the iPhone itself.

For Linux users, access to the file system is already implemented in the popular file managers, for example, Nautilus in Ubuntu and Debian.


Regenerate and repair iPhone photo and thumbnail database in 3 simple steps:
Step 1: Now that we have the proper utility to modify the iPhone file system, applying the fix is a relatively simple task. On the iPhone, use your favorite file manager and navigate to:
Media -> PhotoData
Step 2: In the PhotoData directory, delete (or move them to your computer) the following three files:
- com.apple.photos.caches_metadata.plist
- Photos.sqlite
- PhotosAux.sqlite
Step 3: Once the files are deleted, simply reboot your iPhone.


Do not be alarmed if upon rebooting your iPhone you find that your camera roll is empty. This is expected as iOS will completely regenerate the thumbnail database that will link to all photos on the iPhone. Give the iPhone some time and the thumbnails will pop back into the camera roll as each photo in the camera roll is indexed!


For me who use several operating systems every day, relying on iTunes for anything is extremely impractical. Hopefully this tutorial will help some of you out there to repair your photo database in case you have managed to corrupt it!


21 comments:

  1. I did this and it helped restore the thumbnails but a lot of photos have got deleted

    ReplyDelete
    Replies
    1. Sorry to hear that. However, this fix will not modify the contents in the DCIM folder which contains the actual photos. The explanation to what you are seeing could be one of the following:

      1. The thumbnails take some time to be generated. Give it a while and wait to see if the photos pop up.

      2. The fix will force iOS to regenerate the thumbnail database and does not modify the DCIM folder containing the photos at all, and any photos that are actually corrupt or non-existant will be removed from the thumbnail database and not show up in the camera roll. Hence, something must have happened to your photos, either they have been deleted or become corrupt. This is also probably the reason why you saw corrupted thumbnails in the first place.

      Let me know if it makes sense!

      Delete
  2. This was really a great help for my Iphone6. I used Iexplorer and it worked perfectly for 2500 images.

    ReplyDelete
  3. Hi, I downloaded iExplorer to my PC running Windows 8, I've backed up my DCIM folder and I also made a copy of the PhotoData folder. So u get to the next step,but when I look in my PhotoData list, the only file I can actually see is Photo.sqlite (can't see the other two?) and it won't allow me to delete this file at all. Any clues what I'm doing wrong??

    ReplyDelete
    Replies
    1. If you cannot see the other two files, it is still fine. They will be regenerated when needed. This means that you only need to delete Photos.sqplite. If you cannot delete that file, try closing all apps on your phone and reboot your phone, then try deleting Photos.sqlite again.

      Hope it helps!

      Delete
    2. Thanks I'll give that a try and let you know how I go! TIA

      Delete
  4. I am thoroughly agreed with you that while the users backup their iPhone camera roll photos to a computer without using iTunes, iPhone camera roll photo thumbnail database can break as well as corrupt. Whenever I need any kind of repairing, I always go with iPhone reparasjon oslo and got 100% satisfactory results.

    ReplyDelete
  5. did the deletions, but no success. thumnail database on iphone still corrupt.

    ReplyDelete
    Replies
    1. Did you reboot your phone afterwards? It takes a while to regenerate the DB.

      Delete
  6. yep, still thumbnails not repaired and files can not be transfered to iMac

    ReplyDelete
  7. It didn't work for me unfortunately. I deleted the files (the cache one didn't exist, instead there was a bulletins one). After reboot pictures come up for a little while but then it stops. It says restoring but no more photos load.

    ReplyDelete
    Replies
    1. There are a lot of corrupt files that I can see when I explore the phone. They are supposed to be pictures, but I can't open them nor delete them. I figure that's what prevents the camera roll from restoring the right way. Even when I take a new picture it takes forever to appear on the camera roll...

      Delete
  8. Hi, thank you for this manual. However, in the current iOS 11.0.3 two of the files are not listed in the folder:
    - com.apple.photos.caches_metadata.plist
    - PhotosAux.sqlite

    which files should I delete in this version instead? Thank you!

    ReplyDelete
    Replies
    1. Maybe you've already solved this but just delete the Photos.sqlite file

      Delete
  9. Did this and now photos are grey. Any way to fix?

    ReplyDelete
    Replies
    1. Did they eventually come back? The system needs to rebuild all the thumbnails. Mine did 35,000+ overnight

      Delete
  10. Update: this still works under 11.2.1 however there is only the Photos.sqlite file

    Close photos on the phone before starting
    Plug in and use one of the file browsing tools
    Unplug, reboot the phone
    Wait... thumbnails may take hours to rebuild (mine did 35,000+ photos overnight)

    ReplyDelete
    Replies
    1. Thanks for the input dave! Good to know this still works on iOS 11.

      Delete
  11. Hi, this worked for me and turned any grey photos back to the originals, however I seem to have a problem when editing photos. If I edit on the iPhone, it still turns the photo grey/blank. I’m not sure what to do as I can’t use the edit function-this has been going on since I had the iPhone 6 in 2014, I now have the SE since 2016. Anybody know a way of fixing this? I asked at the Apple forums but didn’t get much help. Thanks

    ReplyDelete
  12. Quick chime in here to say that this tip really does work. If your iCPL is plagued by black, or what you suspect to be corrupted thumbnails, in any view, then going into the filesystem to delete Photos.sqlite on iOS12, does the trick. My 12.9" iPad Pro took 18hrs or so to re-generate all thumbnails in my 145,000+ iCPL, and now I'm able to see everything across all levels of granulatiry just like I should. Over a year working w Apple Support senior techs, on the phone & via endless emails & troubleshooting steps, custom profile installation to collect debug logs, supposedly fed back to Apple engineers, yielded precisely fuck-all. Delighted that this worked as advertised.

    ReplyDelete
  13. สล็อต ทดลอง เล่น ระบบใหม่ปัจจุบันที่ได้สะสมเกมทดสอบเล่นสล็อตค่าย PG SLOT ที่ทดสอบ เล่นสล็อตฟรีสปิน ทดสอบเล่นได้ก่อนผู้ใคร ไม่ต้องสมัคร ไม่ต้องฝาก ทดลองเล่นสล็อตฟรี

    ReplyDelete