V4L2 patch for Android usb webcam

user1358628 picture user1358628 · Apr 26, 2012 · Viewed 11.1k times · Source

I have been trying to get a USB webcam working on my Acer A500 using https://bitbucket.org/neuralassembly/simplewebcam as a guide.

According to the config file on my device it meets all the requirements and the app runs but I still cannot get it to work.

I have found a V4L2 patch here: http://code.google.com/p/android-m912/downloads/detail?name=v4l2_camera_v2.patch but I do not know what to do with it.

I would appreciate anyone who could help me compile/install this patch.

Thanks

Paul

Acer A500 CWM 3.2 Rooted with ADHOC wifi support

Answer

TheCodeArtist picture TheCodeArtist · Aug 16, 2012

UVC compliance is not the problem here. The Acer A500 runs Android and based on your query it looks like you are attempting to get the USB webcam to be recognised by the Android camera app.

The problem you are running into is that the Android framework on your tablet recognises only the built-in cameras and does NOT support enumerating USB-cameras that the underlying Linux kernel supports. The patch you refer to is supposed to fix this issue. It modifies the Android camera framework to add support for generic v4l2 camera. Unfortunately this is NOT for the Acer A500, but for a completely different device (the Gigabyte M912X).

To add support for USB camera on your Acer A500, one will need to:

  • Get access to the android source-code.
  • Modify the camera framework (camera-HAL, camera service).
  • Build it and push the camera-HAL and framework binaries onto the device.