How can I add UVC camera into Android

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I add UVC camera into Android

3,111 Views
berniechen
Contributor II

I have ported uvc camera into android 4.4.2, kernel 3.0, but when I  installed other camera app, the original built-in camera app can't not to connect camera, and remake boot.img system.img, and reflash, I can't see camera app installed anymore.., I check my log with following:

device/fsl/imx6/etc/ueventd.freescale.rc

--- a/imx6/etc/ueventd.freescale.rc

+++ b/imx6/etc/ueventd.freescale.rc

@@ -1,13 +1,7 @@

/dev/pmem_gpu             0660   system     graphics

/dev/ttymxc4              0660   bluetooth  bluetooth

/dev/ttymxc0              0666   system     system

-/dev/snd/*                0660   system     audio

-/dev/ttyUSB*              0640   radio      radio

-#Roger mark

-#/dev/ttyACM*              0640   radio      radio

-#Roger add

/dev/ttyACM0              0777   gps      gps

-/dev/video*               0660   system     camera

/dev/video0               0660   system     camera

/dev/video1               0660   system     camera

/dev/video2               0660   system     camera

device/fsl/imx6/BoardConfigCommon.mk

--- a/imx6/BoardConfigCommon.mk

+++ b/imx6/BoardConfigCommon.mk

@@ -33,7 +33,7 @@ BOARD_MODEM_VENDOR := HUAWEI

BOARD_MODEM_ID := EM750M

BOARD_MODEM_HAVE_DATA_DEVICE := true

BOARD_HAVE_IMX_CAMERA := true

-BOARD_HAVE_USB_CAMERA := false

+BOARD_HAVE_USB_CAMERA := true

device/fsl/sabresd_6dq/init.rc

diff --git a/sabresd_6dq/init.rc b/sabresd_6dq/init.rc

index 89f6ba3..42ae64d 100755

--- a/sabresd_6dq/init.rc

+++ b/sabresd_6dq/init.rc

@@ -76,9 +76,9 @@ on boot

     #For landscape mode, orient is 0

     #For portrait mode, orient is 90

     #the android before honycomb are all in portrait mode

-    setprop back_camera_name ov5640_mipi

+    setprop back_camera_name uvc

     setprop back_camera_orient 0

-    setprop front_camera_name uvc,ov5642_camera,ov5640_camera

+    setprop front_camera_name uvc

     setprop front_camera_orient 0

And there are something I think maybe it is wrong..

I/CameraService( 2347): CameraService started (pid=2347)

I/CameraService( 2347): Loaded "Freescale CameraHal Module" camera module

I/FslCameraHAL( 2347): Face Back Camera is 0, orient is 0

I/FslCameraHAL( 2347): Face Front Camera is 0, orient is 0

Back Camera is 0, should I see uvc ??

I really need help, thank you.

1 Reply

1,156 Views
berniechen
Contributor II

I do these action:

setting → apps → camera → disable and the log is:

I/ActivityManager( 2711): Force stopping com.android.camera2 appid=10020 user=0: pkg changed

setting → apps → camera → enable and the log is the same

I/ActivityManager( 2711): Force stopping com.android.camera2 appid=10020 user=0: pkg changed