android-rpi / device_arpi_rpi4

Device build-config for Raspberry Pi 4
216 stars 87 forks source link

Add camera support #15

Closed ghost closed 4 years ago

ghost commented 4 years ago

This also requires https://github.com/android-rpi/kernel_arpi/pull/2. Hotplug is not supported.

ghost commented 4 years ago

It does build, but I can't test it, because I don't have the RPi camera

ramasamyesvar commented 4 years ago

Does this work for both Raspberry pi camera and usb webcam ?

ghost commented 4 years ago

No, but I'll also add that.

ghost commented 4 years ago

I tried adding it, please test it if you want.

ramasamyesvar commented 4 years ago

Without the external camera change I tries and it says camera not available. 2020-06-21 23:22:06.393 1165-1165/com.simplemobiletools.camera W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@f82e7c8 2020-06-21 23:22:06.456 1165-1165/com.simplemobiletools.camera W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@1c9c1e3 2020-06-21 23:22:06.562 1165-1165/com.simplemobiletools.camera W/CameraBase: An error occurred while connecting to camera 0: Status(-8, EX_SERVICE_SPECIFIC): '4: connectHelper:1418: No camera device with ID "" currently available' 2020-06-21 23:22:06.589 1165-1165/com.simplemobiletools.camera W/OrientationEventListener: Cannot detect sensors. Not enabled

I will try the external camera changes now

ghost commented 4 years ago

Do they work?

ramasamyesvar commented 4 years ago

I thought I could use my Nikon camera as USB but couldn't. I have ordered a webcam. I Will test after I receive it. With raspberry pi camera is gives that error.

Does it need more entries for camera sepolicy. I get the AVC denied errors. Like this https://android.googlesource.com/device/google/marlin/+/android-o-preview-2/sepolicy/camera.te

ghost commented 4 years ago

Can you please do this:

I also updated the kernel PR for USB support, make sure you got the changes there too.

ramasamyesvar commented 4 years ago

Please find the logs. find /dev in the begining camera.txt Yes it has all kernel changes including USB This is the branch I use https://github.com/ramasamyesvar/device_arpi_rpi4/tree/rpi4_arpi10

ghost commented 4 years ago

Thank you! What camera was connected while running find /dev? Please test USB and RPi. (note: For RPi, the camera has to be plugged in before turning the Pi on, reboot between testing USB and RPi cam).

ramasamyesvar commented 4 years ago

Internal Camera. Didn't get USB cam yet. The /dev/video0 is not found. If I use a different build like the lineage I could see the video. Pasting the working logs from a different build just FYR

camworking.txt

ramasamyesvar commented 4 years ago

Any reason why you closed this issue