Monday, May 7, 2012

Pictures Repair and Cleanup for Epic CM9

Epic isn't that old!
All pictures taken since the start of CM9 for the Epic have contained invalid GPS data that have affect how the pictures are shown in Gallery, this caused photos to appear out of order as Gallery thinks they were taken in year 1969.  Additionally there were previously issues with removable storage but people's thumbnails were still incorrect and not matching their respective pictures.  Also Beta2 and earlier suffered from an issue where if CPU minimum and maximum frequencies were modified they would lose 100Mhz setting so the phone would idle at 200MHz instead of dropping to 100MHz when idle.

Beta 3 has all these issues resolved but the pictures already taken are still affected as well as settings saved for the processor.

This patch does the following:
  • Removes ALL GPS data from CM9 and CM7 pictures
    • Pictures taken with Touchwiz ROMs are not affected
    • Pictures taken with GPS Location ON with Beta 3 and newer as well as CM7 WILL lose GPS data from those pictures if they are not backed up elsewhere before flashing!
  • Clears Gallery's thumbnail cache and databases so it can rescan all the images fresh
    • Gallery may show some of your pictures with GPS data in details but that is just stored in the database and not in the file and will be lost after the script is ran.
  • Wipes the /data/system/throttle folder so CPU governor and states will start at default frequencies
Depending on the number of pictures this can take several minutes. I recommend keeping the phone plugged in while running to ensure the process is not interrupted.

Time stamps shown by Gallery will be off by your Time Zone (-4 hours to -6 hours here in the US). This is a bug affecting all android OSes to present and is NOT device specific. Even with the time-stamps being off the pictures have the correct order and will be read correctly when uploaded to the web or other devices.

Download picture-gpsdate-fix-cwm.zip [1]
Flash in CWM Recovery.

If you appreciate this work, please consider supporting the Epic CM team. Thank you!

10 comments:

  1. I applied this .zip last night and it didn't work.
    Pictures are still scrambled.

    ReplyDelete
    Replies
    1. It puts a log on the SDcard named gpsfix.log. Please tell me what that log says. Thanks.

      Delete
  2. 104 image files updated
    31 image files unchanged

    ReplyDelete
  3. 124 image files updated
    68 image files unchanged
    3 files weren't updated due to errors

    after running this (yesterday) it changed the timestamp on a whole bunch of images to 05/09/2012. is that the 124 it updated?

    ReplyDelete
  4. This will only clear invalid GPS data for pictures stored in the default location of DCIM/Camera/IMG*.jpg which is the naming convention the camera uses. If pictures are renamed or moved they will not be affected.

    ReplyDelete
  5. Is everyone here running one of the pre-beta3 releases or still running beta2? The Gallery/Mediascanner has issues still but that is a global issue unfortunately. If the Gallery/media scanner can't read the exif information from the picture it will use the date modified from the pictures. We are hoping Google will patch the media scanner and gallery to read the image data correctly from the pictures.

    ReplyDelete
  6. I was running beta 3 pre 9.
    It's funny because when I flash the temp rom via sd (which is stock TW), pictures are fine.
    However, back on CM9, all pictures are scrambled.

    ReplyDelete
  7. Half my images were fixed, the other half still thinks it's 1969

    ReplyDelete
  8. I use batch rename utility. Its great for iPhonies image.jpg and photo.jpg file naming bs.

    http://www.bulkrenameutility.co.uk/Screenshots.php

    I set it to strip out the entire filename then rename it based on date taken or date modified. You can do all kinds of stuff.

    ReplyDelete