Fixing My iPhone Camera

I recently updated my iPhone’s firmware to 1.1.3. Last weekend I took the boys to the park and used my phone to take a few photos (or so I thought), unfortunately when I got home there were no photos on the phone….

I searched the web and found a blog post and two Apple Support threads describing pretty much the same issue as I was seeing, unfortunately without a definitive fix….

"Topic : Camera will not save pictures to phone after snapping photo"

"Topic : My iphone will not save the photos I have taken with the phone"

"My iPhone Ran Outa Film?"

Even though I rarely use the camera, the fact that it wasn’t working pissed me off so I decided to look around in the phone and see what I could see. Luckily I’m an old-school Unix guy so the iPhone directory structures and commands are familiar to me… 

Anyway, after too much time spent poking around I found the problem… The directory that the camera saves into was missing and the parent directory was not writeable by the "mobile" user so even if the camera app can recreate the missing directory it was out of luck. I replaced the missing directory and fixed the parent directory permissions and it’s all working again….

I’ll post the details below, I also posted to the blog and Apple Support threads.

——8<——–

I recently updated to 1.1.3 (unlocked, jailbreak) and started experiencing the same problem. I rarely ever used the camera so I don’t know if it just started in 1.1.3.

Anyway it was really annoying me so I started poking around via ssh and found that if I ran the camera application manually as root then it seemed to work just fine.

/Applications/MobileSlideShow.app/MobileSlideShow –launchedFromSB –role Camera

I could take photos and look at them, they wouldn’t appear in iPhoto though. If I ran the camera as the "mobile" user which is the normal setting the problem would occur and I would see an error message each time I took a photo

/Applications/MobileSlideShow.app/MobileSlideShow –launchedFromSB –role Camera
CGImageDestinationCreate destination parameter is nil

This lead me to think that the problem is related to permissions as the behavior differed depending on the logged in user.

using the "find" command to see what files were changed today…

find / -mtime -0

I found that there were what looked to be photo files in the directory

/private/var/root/Media/DCIM/100APPLE

Now the camera preferences file has a reference to "DCFLastDirectoryNumber" and a value of "100", looking at the Media directory for the mobile user showed no "100APPLE" directory so I created the following directory

 /private/var/mobile/Media/DCIM/100APPLE

mkdir /private/var/mobile/Media/DCIM/100APPLE

and changed the ownership to the mobile user

chown mobile:wheel /private/var/mobile/Media/DCIM/100APPLE

and now the camera is working again…..

I also noticed that the parent directory

/private/var/mobile/Media/DCIM

was not writeable by the mobile user so if the directory was deleted then the problem would occur again so I made in writeable by all

chmod 777 /private/var/mobile/Media/DCIM

Yes I know this poses a security risk, but then the only users on the system are root and mobile and I want them both to be able to write to the DCIM directory.

After the fix I was able to take photos, import them into iPhoto and delete the originals with no problems.

Note: This fix is maybe 10 minutes old so no guarantees. Also you need ssh access to the phone so only people with hacked phones can use this fix….

I hope it works for some of you at least…

Cheers
Dan
——8<—–

This entry was posted in Technology and tagged . Bookmark the permalink.

24 Responses to Fixing My iPhone Camera

  1. Silvano says:

    Hi!
    I have a 16GB 1.1.3 jailbroken iPhone (using ZiPhone) and I am having a problem with my camera as well. But in my case, everytime I click the camera icon (or try via SSH the command you pointed, with either root or mobile user) it starts the camera then it blinks and reboots the iPhone. I can access the photo albums with no problem. The is no photo in there.

    I tried many things including the ones you describe here.

    I’ve also tried:
    – refurbish (ZiPhone) and restore the firmware (the camera still does not work)
    – tried to erase all data and settings and set it up as a new phone (no luck)
    – tried to include a photo in the iTunes and sync to the iphone. The photo appears on the iphone, but the camera stills crashes
    – to delete the DCIM directory on /var/mobile/Media and /var/root/Media (no luck)
    – pray (no luck so far)

    How do you debug it?

    In the panic log I see:

    (…)
    kernel abort type 4: fault_type=0x1, fault_addr=0x0
    r0: 0xc0b63100 r1: 0xc330d600 r2: 0xc0b63150 r3: 0xc0b63150
    r4: 0x00000000 r5: 0xc043fa50 r6: 0xc330d600 r7: 0xe37abe18
    r8: 0x00000000 r9: 0xc5b90b34 r10: 0x00000000 r11: 0xc386e7a8
    12: 0xc0438aac sp: 0xe37abe0c lr: 0xc043fa78 pc: 0xc043f9e0
    cpsr: 0x200f0013 fsr: 0x00000007 far: 0x00000000

    Debugger message: Fatal Exception
    (…)
    Task 0xc386e7a8: 2 threads: pid 152: MobileSlideShow
    thread 0xc5b90b34
    kernel backtrace: e37abcf4
    lr: 0xc0061fb3 fp: 0xe37abd18
    lr: 0xc0063368 fp: 0xe37abd24
    lr: 0xc0063814 fp: 0xe37abdb0
    (…)

    Not very helpful to me just yet.

    Can you please help?

    Thank’s in advance.

  2. Dan says:

    I’m afraid I can’t offer much to you on this problem. I can say that after my initial update to 1.1.3 I had a similar problem with Mail, it would crash immediately on opening and the only way to fix it was a restore.

    I know you have tried a restore once already, perhaps try it again. I know that I have had times when a second restore did the trick.

    Sorry I can’t offer any more than that.

  3. chau says:

    Hi,
    I have a 16GB 1.1.3 jailbroken iPhone (using ZiPhone) which worked perfectly for two days then had exactly the same problem as Silvano mentioned above. I’ve tried every possible fix including restored my iPhone (1.1.3) several times then updated to 1.1.4 but the problem persists. I think this problem may be due to faulty hardware, not software. Any help is greatly appreciated.

  4. Silvano says:

    @Dan,
    do you know the other commands of the MobileSlideShow app? I dont find it anywhere.

    @Chau,
    I also updated to 1.1.4 and it did not resolve the problem.

    Do you have problems with the sleep mode too?

    If I put my iphone on sleep mode while it is not plugged to power it dies after a few seconds and I have to force a reboot.

  5. chau says:

    Hi Sivano,
    My iphone also had problems with the sleep mode but fortunately I found a solution to fix it:

    1. OpenSSH/WinSCP into Iphone then go to:
    \System\Library\SystemConfiguration\PowerManagement.bundle

    2. Find the file:
    com.apple.SystemPowerProfileDefaults.plist
    Then rename it to (or delete)
    com.apple.SystemPowerProfileDefaults.plist2

    3. Reboot your phone and your done.

  6. Peto says:

    Hey I have the exact same problem… camera blink then reboot and the sleep problem as well…. I dont know what you mean by or how to do
    1. OpenSSH/WinSCP into Iphone then go to:
    \System\Library\SystemConfiguration\PowerManagement.bundle

    thanks for your help

  7. chau says:

    Hi Peto,

    You can follow the WinSCP guide to edit a file in your iPhone as per my post above:
    http://limitededitioniphone.com/windows-guide-to-using-winscp-with-iphone/

  8. Peto says:

    Great!!! any clues on how to fix the camera aswell…

  9. Silvano says:

    @chau
    U DA MAN! It did the trick for the sleep mode. That was the worst problem, so thank you very much! If you find anything on the camera problem, please let us know. I will do the same.
    I can live without a camera on my phone, but not recharging the phone every 6 hours.

    Thanks!

  10. Nelly says:

    Thanks bro!!!! Did everything you said and worked perfectly on my 1.1.4 jailbroken iphone…

  11. Zack says:

    I have same problem as well with my 16GB after I used to jailbroken iPhone using ZiPhone 2.5c. So I think Ziphone causes problems with the sleep mode as well, because I have to do that everytime after using ZiPhone.

    There was one occurance when using iphone camera it states “There is not enough room to take additional pictures”. When this happen iphone camera pro app would start with display but does not show the output of the camera. This error disappeared after changing folder structure.

    Just want to know if you have jailbroken without using Ziphone and the camera restart still exists?

  12. chau says:

    I’ve tried everything but still had no luck with the camera problems. I think the problems (camera/sleeping mode) may be caused by ZiPhone.
    As soon as WinPwn becomes available, I’ll try to restore/jailbreak my iPhone again to see if this method can fix the problems. Anyone has a Mac may give Pwnage Tool a try???

  13. nenenenad says:

    I have a problem as well. I can take photos and all, but when i connect iphone to PC, there are no pictures when i open it via my computer>apple…I have few photos in Camera Roll, so it’s not empty. The same porblem happens with SwirlyMMS. When i go to “pick photo” no images are shown. I think that MNPLight’s pellicules feature messed some symlink on my phone, but i don’t know wich one. Anyone has a clue?

  14. Silvano says:

    I bring great news guys!

    I was able to fix my camera installing Snapture

    http://www.snapture.org/

    When I installed it I tried the camera icon and it says there is not enough room to take pictures. I restarted the iphone and now it is working great!

  15. chau says:

    Hi Silvano,
    Great news for you but unfortunately it doesn’t work for me as my iPhone still crashed when opening Snapture.

  16. Silvano says:

    OK, I took some pictures then deleted some and guess? Had the same problem again. Reinstalling Snapture did not resolve the issue and my camera is rebooting the iphone again.

    I did not spend more time on it to try figure it out. But at least we know that this is a software issue.

  17. chau says:

    It happened to me few months ago when I installed CameraPro. I thought it fixed the problem but the same issue came back as soon as the iPhone was rebooted.
    I also had no luck with winpwn thus we can only hope that the new 2.0 firmware would fix this problem.

  18. Nithin says:

    Hi Guys,

    I unlocked my iphone with Ziphone. And has both sleep mode and camera prob’s. Howevr readin this forum helped me to fix sleepmode prob. But camera prob still exists. Whenevr i tap on my camera icon it reboots/restarts the phone completely. tried all the methods please help me out if anyone of u couldnt solve it… thanks in advance… you can email me atleast.. plz plz plz.
    email: chatwithnoone@gmail.com

  19. Well it worked for me.

    I restored my pictures after a refresh of the 1.1.4 firmware.
    Afterwards I copied the pictures, changed permissions and ownership and everything workd again.

  20. Chau says:

    Hi Schimmelkolonie,
    Good news!
    After restoring the 1.1.4 firmware, can you describe step by step what you did to fix the problem.
    Thanks

    PS: I restored my iPhone with the winpwn custom 2.0 firmware. I was able to take 3 pictures but the problem came back after rebooting the iPhone.

  21. Shao says:

    u may just delete the folder /var/mobile/Media/DCIM/100APPLE
    the system will rebuild the folder
    and give the folder ‘777’

  22. Josen says:

    Hi there,i didnt read everything,and so sorry for my bad english.I had the same problem as you all,and find and easiest way to recover my camera from saving files.
    I have an 1.1.4 iphone,now updated and jailbreaked to 2.2.1.

    I just donwloaded and did used the soft Touchcopy.

    Browse my iphone files to folder /var/mobile/Media/DCIM/100APPLE

    and just deleted the directory 100APPLE

    Without desconnecting my iphone from the usb,did take somepictures,and the problem is fixed.

    Just wish help somebody!!

  23. Athena says:

    The same thing happens to me.

  24. aTHENA says:

    the same thing happens to me. WHEN I TAP THE CAMERA ICON THE PHONE REBOOTS. I tried restoring it, and it still happens. I though it was jsut s spot in the camera so I even moved the camera icon to a whole new area. it still happened. The phone was previously unlocked. My firmware now is i think 3.1.2. I’d tell you the exact firmware, but my phone just rebooted again.

Leave a Reply to chau Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.