Camera Roll pictures out of order after iOS 11 upgrade

<>
After upgrading the iOS version to iOS 11 many users found an annoying bug in the Apple products, is when they opened "Camera Roll" album, the pictures are no longer in chronological order or out of date sequence. Photos from 3 years ago are appearing as my most recent photos! This is such a big problem for users who are saving thousands of images in their iphone. Unfathomably annoying. However all pictures seem to be in chronological order when accessed via the "Photos" tab.  The problem is even reported with Apple latest release of iOS11.0.3 without any fix for the issue. You can try below fixes to solve the photos out of sequence issue.

iOS 11 camera roll pictures not in chronological order. 
Camera Roll pictures out of order

Fix 1: Hard reset

Hard reset the phone and the photos in the camera roll are back to time sequence order.

Fix 2: Duplicate camera roll photos

It involves selecting the photos out of order and then duplicating them. Obliviously, you need to duplicate them in the proper order to add to the bottom of the roll. Seeing as my photos were just divided at a certain point in 2014, it didn't take long for me. The only thing I lost were burst photos I did not save inside the burst. Everything else including live photos, video, panoramas, etc. copied.


Fix : Update iphone internal query

Before you start)
Back up your phone

1)
Make sure Photos is running on your iPhone
Download iMazing or similar
Connect iPhone to Mac via USB
In the sidebar select your phone
Click File System > Media > PhotoData
Select Photos.sqlite and Copy to Mac at bottom
Find the file you've just copied
First, make a copy of it in a separate location in case of emergency

2)
Open Terminal
At the prompt type
$ sqlite3
You should see your SQLite version listed
Type .open at the sqlite> prompt, then drag the Photos.sqlite file from Finder to the sqlite> prompt, then hit Enter:
sqlite> .open /Users/yourname/Desktop/Photos.sqlite
To test that you've opened the file properly, type .tables and hit enter. You should see a list of files starting with Z, which is what you want.
At the prompt again, paste in:
UPDATE zgenericasset SET zaddeddate = zdatecreated WHERE zaddeddate>0 AND zdirectory LIKE 'DCIM%';
Hit enter. There should be a slight, 1 second delay before you see the sqlite> prompt again. This means the query is working, which is good. You should also see the Modified date for the sqlite file change in Finder
Finally, type .save Photos.sqlite and hit Enter (not actually sure if this is necessary or does anything, but I did it when I was successful)
Quit Terminal, clicking Close on the warning window

3)
Go back to iMazing into the PhotoData folder

I made a 'backup' of the existing Photos.sqlite by renaming it to oldPhotos.sqlite
Copy over the modified Photos.sqlite from your Mac
Quit iMazing
Force quit the Photos app
Reopen Photos
Hopefully, your photos will be in order!

Comments

RF said…
If you have iCloud Photo enabled and you want to ensure the re-ordering by date created of ALL photos in "All Photos", remove the zdirectory clause:

UPDATE zgenericasset SET zaddeddate = zdatecreated WHERE zaddeddate>0;

MC

Amazon Ads