{"id":1885,"date":"2012-02-01T16:35:33","date_gmt":"2012-02-01T15:35:33","guid":{"rendered":"http:\/\/www.sigterm.ch\/?p=150"},"modified":"2012-02-01T16:35:33","modified_gmt":"2012-02-01T15:35:33","slug":"pictures-appearing-multiple-times-ics-2","status":"publish","type":"post","link":"https:\/\/sigterm.ch\/?p=1885","title":{"rendered":"Pictures appearing multiple times &#8211; ICS"},"content":{"rendered":"<p>A few weeks ago I installed the new Android 4.0 &#8211; &#8220;Ice Cream Sandwich&#8221; on my Samsung Galaxy SII. There is no stable version yet so I took the experimental build of CyanogenMod 9. You&#8217;ll find the latest ROM <a title=\"[ROM][IML74K][4.0.3] CyanogenMod 9 experimental Build [DEVELOPMENT ONLY!]\" href=\"http:\/\/forum.xda-developers.com\/showthread.php?t=1410400\" target=\"_blank\" rel=\"noopener\">here<\/a>.<br \/>\nAfter using it for few days, maybe I did an upgrade to a newer version &#8211; can&#8217;t remember, the pictures in my albums appeared twice or more&#8230; I deleted the data of the gallery app, I manually checked the data of the gallery app with adb and I searched for .thumbnails and deleted them all. None of all these steps worked.<!--more--><br \/>\nFinally I figured out that the Android media provider has a database with all pictures. There was the problem! As this is independent from the gallery app this phenomenon could appear on other galleries too&#8230; The media providers databases are located in \/data\/data\/com.android.providers.media\/databases. I was to lazy to correct the databases &#8211; I just wiped them all. The gallery app has a cache of the pictures which we need to clear otherwise the previews in the gallery are not longer corresponding with the actual pictures. After a restart the gallery app was scanning for new media on the phone and the multiple instances of pictures were gone! After the wipe of all media provider databases I guess Android has to re-scan for all other media files too, e.g. mp3s, videos, etc.<br \/>\nI wrote a script which is doing the wipe for you. You can download the script <a title=\"wipeMediaProvider.sh\" href=\"http:\/\/www.sigterm.ch\/stuff\/wipeMediaProvider.sh\">here<\/a>.<\/p>\n<pre class=\"brush:shell\">adb push wipeMediaProvider.sh \/data\/local\/tmp\nadb shell\nsu\ncd \/data\/local\/tmp\nchmod 777 \/data\/local\/tmp\/wipeMediaProvider.sh\n.\/wipeMediaProvider.sh<\/pre>\n<p>Probably it&#8217;s easier to delete the databases yourself than use my script&#8230;<\/p>\n<pre class=\"brush:shell\">adb shell\nsu\ncd \/data\/data\/com.android.providers.media\/databases\nrm -r *\nfind \/data -name *gallery3d* -exec rm -r {} \\;\nfind \/mnt -name *gallery3d* -exec rm -r {} \\;<\/pre>\n<p>I don&#8217;t know if this is a general problem of Android 4.0 or if it&#8217;s only because of the experimental build. I currently have installed Android 4.0.3 &#8211; the build 01292012 and GApps 11.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few weeks ago I installed the new Android 4.0 &#8211; &#8220;Ice Cream Sandwich&#8221; on my Samsung Galaxy SII. There is no stable version yet so I took the experimental build of CyanogenMod 9. You&#8217;ll find the latest ROM here. &hellip; <a href=\"https:\/\/sigterm.ch\/?p=1885\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[41,46,50,87,89,91,98,99,100,134,135,138,158,166],"class_list":["post-1885","post","type-post","status-publish","format-standard","hentry","category-android","tag-cyanogenmod-9","tag-double-pictures","tag-gallery-app","tag-i9100","tag-ics","tag-images-double","tag-media-provider","tag-multiple-images","tag-multiple-pictures","tag-samsung-galaxy-i9100","tag-samsung-galaxy-s2","tag-sgs2","tag-triple-pictures","tag-wipe-media-provider"],"_links":{"self":[{"href":"https:\/\/sigterm.ch\/index.php?rest_route=\/wp\/v2\/posts\/1885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sigterm.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sigterm.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sigterm.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sigterm.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1885"}],"version-history":[{"count":0,"href":"https:\/\/sigterm.ch\/index.php?rest_route=\/wp\/v2\/posts\/1885\/revisions"}],"wp:attachment":[{"href":"https:\/\/sigterm.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sigterm.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sigterm.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}