"Unfortunately the camera has stopped working"...

hammad_212

Member
Dec 9, 2016
6
0
0
Visit site
This seems like an hardware problem. Don't try to fix it urself as that may damage your device even further. Best course of action here would be to bring it to the repair shop (warranty or no warranty).
 

ExperimentalGeek

New member
Aug 19, 2017
3
0
0
Visit site
It's the DCIM folder!

Okay. For those who still are facing the abrupt camera crash after taking a photo, it is
likely a permission issue(owner and group messed up) on DCIM folder on the internal
SD card. So, to confirm it, on adb shell, check logcat command's output. If it says,
permission denied for the file created(JPEG file) for the photo taken, then it's indeed
the issue. So, rename the DCIM folder to something else like DCIM1. Now, close the
camera app if already open and reopen, take a photo, and see the crash won't happen.
And there is a new DCIM folder created with your photo file(JPEG) in it. Once done,
move the contents of DCIM1 to the new DCIM folder so that your gallery will show all
the old photos, etc. If you need root access to change permissions, etc of folders within
DCIM, switch to root(su command), if your device is rooted. Or else figure out some
other way to get the permissions to move them.

DCIM should have media_rw as the owner and group instead of system, etc as the
owner and/or group. Check it with ls -l output.

Here are the steps I followed to stop "Camera has stopped" and "Camera keeps
stopping" issue on Android 7.1.2 DarkROM :

======
Command on Linux PC : adb shell
Android shell :
hammerhead:/ $
hammerhead:/ $ logcat | grep Camera
E CAM_CaptureSessionImpl: java.io.FileNotFoundException: /storage/emulated/0/DCIM/Camera/IMG_date..somefilename.jpg (Permission denied)
hammerhead:/ $
======
Now, open Camer app on mobile, take a photo, open that photo from gallery
if possible. Keep an eye on logcat output. If it shows, permission denied as
above, the fix it like below.
======
hammerhead:/ $ su
hammerhead:/ #
hammerhead:/ # cd /storage/emulated/0/
hammerhead:/storage/emulated/0 #
hammerhead:/storage/emulated/0 # mv DCIM DCIM1
hammerhead:/storage/emulated/0 # exit
hammerhead:/ $
hammerhead:/ $ exit
======
Close camera app on mobile. Open camera app. Take a photo. Open the photo taken
from gallery. Camera won't crash and the photo taken should be seen. Now , move the
contents old DCIM to new DCIM.
======
hammerhead:/ $ su
hammerhead:/ # cd /storage/emulated/0/DCIM1
hammerhead:/storage/emulated/0/DCIM1 # mv ../DCIM/* .
hammerhead:/storage/emulated/0/DCIM1 # mv ../DCIM/Camera/* Camera/
======
Check that gallery now shows all the old photos, etc.. from old DCIM folder.
Cheers.

PS: I suspected it's NOT a hardware issue as it worked a day before. There was some
file system permission, SELinux, etc issue as I was experimenting with my Android
Dark ROM in recovery mode. Thereafter, the Camera app and all the third-party Camera
apps on Google Play started behaving weirdly! So, "logcat" became the savior! And I
got the idea of renaming the DCIM folder from another blog post where Screenshot was
not being saved, and solution to that was to rename "Pictures" folder to something else
and try.
 

ShadowTiger

New member
May 22, 2018
4
0
0
Visit site
So, I tried everything available on the internet to make my camera come back to life and nothing worked, but I've come with a simple solution that might help those in the same situation.

A little background, I tried:
1 - Cleaning camera cache;
2 - Cleaning all camera data;
3 - Using another camera app;
4 - Reboot;
5 - Turn on and off;
6 - Set via developer option "no background processess" and turn off all camera notifications;
7 - Reset all app preferences;
8 - Take the battery for an hour and turn on;
9 - Factory reset;
10 - Reflash at least 3 different stock ROMS.

None of those worked for me, so I decided to open the cellphone following some rear camera replacing videos on YouTube. I tried taking the flat off from both cameras (rear and front) and putting them back, put all the screws back and turn the phone to see what error that might come. When I turned on nothing seemed to change, so I turned off and replaced all the camera flats back and just fixed the back not putting the screws back.

When I turned the cellphone on, to my surprise the cameras were back, but as soon as I put the screws back, the cameras would stop again. The same happened when I put the back plastic lid (don't know the name) on without the screws. Long story short, I managed to find which contacts were mildly oxidized and cleaned them with an electronic contact cleaner, but I believe isopropyl alcohol and some rubbing may do the work, heres a picture of the contacts:

IMG_20180522_165208.jpg

If there's your warranty has expired you could give this a try, worked for me and also fixed a problem with the volume down button (I cleaned its contact by removing the camera lens glass).