Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force override camera image on android

Is there any way to force the android camera to see a specific thing, like an image?

I have an app called FakeGPS, and basically, any system that tries to use Android's GPS methods will get the fake coordinates that I setup using that app.

I want to do the exact same thing, except with the camera.

Any app using the camera will get the image that I put in.

like image 456
Overcode Avatar asked Aug 25 '13 02:08

Overcode


People also ask

How can I access my Camera from another Android phone?

You can remotely control Android phone camera from another phone with the help of AirMirror and let's discuss how to do it. Install the AirDroid Personal app on the phone A. Phone A is the phone whose camera has to be remotely accessed from another phone. Once installed, log in to your AirDroid account.

How do I change Camera permissions on Android?

On your phone, open the Settings app. Tap Privacy. Turn off Camera access or Microphone access.

What is the permission for using the Camera?

Enable camera on an Android device Open the “Settings” app. Tap “Apps & notifications”. Tap “Merge Explorer” or “Object Viewer” (both need permission). Tap “Permissions”, then choose the “Camera” permission to enable.


2 Answers

The camera implementation is completely native, everything works with IPC calls between the system and the camera driver (that are provided by the different manufactor).

There is no way to intercept this chain without recompiling the entire OS.

You can find more info here.

like image 148
dmarcato Avatar answered Sep 28 '22 02:09

dmarcato


as @dmarcato said - if you want to manipulate anything with the camera that would be relevant to every camera application - only way is to change android's native source code somehow - something that can be done only when compiling android OS image containing this changes.

so, if you are not going to provide to each one of your user a custom OS firmware (for each device you want to support - it's different image containing the specific binaries drivers..) you can forget about that.

if that's not enough, there is also the issue that native core camera code is not necessarily android code, but vendor specific code which probably entirely different on each device. this means that you probably need to implement your "hack" different for each device image to make it work.

like image 38
Tal Kanel Avatar answered Sep 28 '22 02:09

Tal Kanel