I'm writing a program that depends on the camera. I need to test how my program reacts when the camera is not present or disabled.

Is there a way to turn it off completely?

  • 1
    Well, you could always take a Sharpie™ to the lens. Honestly you'd probably need a custom ROM to do that. – ale Jan 6 '12 at 2:01
  • 2
    A little bit more context is probably helpful here, what are you really trying to do? Why just never starting the camera app doesn't cut it? Do you have concern that malicious apps might attempt to use the camera without your consent or do some bug in the camera stack causes Android to crash? Then you're asking the wrong question. A little context would be needed to find the best solution for your problem. – Lie Ryan Jan 6 '12 at 2:51
  • Made an edit to try to clarify. Let me know if it needs more clarification. – Dustin Kendall Jan 9 '12 at 18:03
  • 1
    If your application requires a camera, you should use the android manifest to declare that your app requires it. This will prevent the app from being displayed in the market on devices which don't have a camera. – Wesley Wiser Jan 9 '12 at 18:52

If you have root access on your device and just denying access to the camera is enough, you can try an app like Permissions Denied to disable the permission for your app to read the camera.

If you are comfortable with taking apart your phone, it looks like the camera cable could be physically disconnected without going too far into the device, according to this teardown.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.