Is swap camera roll not compadable with iOs4?

Discussion in 'iPhone Tips, Help and Troubleshooting' started by Gmcube, Aug 14, 2010.

  1. Gmcube macrumors regular

    Jun 19, 2009
    Did a search, came up with nothing. when I try to use it it either doesn't show any pictures, or shows thumbnails only, but the pics themsevles are black blanks. its hard to explain it other than neither of the rolls work right with it installed for me.

    If its not, is there an alternative?
  2. eyhk macrumors member

    Aug 27, 2010
    It seems iOS4 added an additional folder called PhotoData which contains thumbnails and photo counts that override the original files from DCIM.

    I simply added this to the file

    if [ -e /var/mobile/Media/PhotoData_2 ]
    	mv /var/mobile/Media/PhotoData /var/mobile/Media/PhotoData_temp
    	mv /var/mobile/Media/PhotoData_2 /var/mobile/Media/PhotoData
    	mv /var/mobile/Media/PhotoData_temp /var/mobile/Media/PhotoData_2
    	mv /var/mobile/Media/PhotoData /var/mobile/Media/PhotoData_2
    	mkdir /var/mobile/Media/PhotoData
    	mkdir /var/mobile/Media/PhotoData/.MISC
    	chown mobile:mobile /var/mobile/Media/PhotoData
  3. hokeyplyr48 macrumors member

    Jun 26, 2010
    I appended this to the end of the file with the entire thing looking like:


    if [ -/var/mobile/Media/DCIM_2 ]
    ** * * *mv /var/mobile/Media/DCIM /var/mobile/Media/DCIM_temp
    ** * * *mv /var/mobile/Media/DCIM_2 /var/mobile/Media/DCIM
    ** * * *mv /var/mobile/Media/DCIM_temp /var/mobile/Media/DCIM_2
    ** * * *
    mv /var/mobile/Media/DCIM /var/mobile/Media/DCIM_2
    ** * * *mkdir /var/mobile/Media/DCIM
    ** * * *chown mobile:mobile /var/mobile/Media/DCIM

    if [ -/var/mobile/Media/PhotoData_2 ]
    ** * * *mv /var/mobile/Media/PhotoData /var/mobile/Media/PhotoData_temp
    ** * * *mv /var/mobile/Media/PhotoData_2 /var/mobile/Media/PhotoData
    ** * * *mv /var/mobile/Media/PhotoData_temp /var/mobile/Media/PhotoData_2
    ** * * *
    mv /var/mobile/Media/PhotoData /var/mobile/Media/PhotoData_2
    ** * * *mkdir /var/mobile/Media/PhotoData
    ** * * *mkdir /var/mobile/Media/PhotoData/.MISC
    ** * * *chown mobile:mobile /var/mobile/Media/PhotoData

    exit 1
    But it still doesn't work. Any ideas as to how you got yours workin?
  4. fuocozero macrumors newbie

    Jun 1, 2010
    I got mine working

    I had the same problem. While your camera roll is working (i.e. no black pics) go and delte the _2 folders. Let the script recreate them and it should work.
  5. eyhk macrumors member

    Aug 27, 2010
    It seems that 4.1 has again broken the fix I posted above.
    Also, there are numerous permission issues that cause SwapCameraRoll to blink a black screen but does nothing.

    To fix the permission issues, I SSH'ed in (or use a mobile terminal compatible with iOS4) and changed the file permissions and owner of everything in DCIM_2 and PhotoData_2 to match DCIM and PhotoData. Command for permissions is 'chmod' and owner is 'chown'.

    I also added a kill process for the photo/camera just in case it was holding on to something, but it doesn't seem to be the case. here's the code in case you want to try it out. I had to install a dev package that includes ps and stuff.

    kill `ps -ef | grep MobileSlideShow | grep -v grep | awk '{print $2}'`
    I've gotten it to the point where I can switch between the two just fine, but whenever I try to add photos to the second camera roll, it either fails, or succeeds but does not survive a swap (meaning after I swap to original roll and then back to extra, the photos disappear.)

    I'll keep looking into what's going on and post when I get a chance.
  6. eyhk macrumors member

    Aug 27, 2010
    Just to clarify, I've tried this method and it worked in iOS 4.0.1 but after updating to 4.1 it created the permission issues. After fixing the permission issues, I tried just deleting the sqlite and plist files. When opening Photo, it does rebuild the index, but still has the issue of not being able to save photos or the photos not surviving a reswap. I'll try completely wiping and rebuilding and see if that helps.

Share This Page