Skip to content

Hardware #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dirk61 opened this issue Jul 19, 2020 · 7 comments
Open

Hardware #2

dirk61 opened this issue Jul 19, 2020 · 7 comments
Assignees

Comments

@dirk61
Copy link

dirk61 commented Jul 19, 2020

What device did you use? I'm using Huawei mate 30 and only one camera preview works.

@ananthrajsingh
Copy link
Owner

I have tried this on Xiaomi Mi 5, Android 8.0.0 API 26

@ananthrajsingh
Copy link
Owner

ananthrajsingh commented Jul 21, 2020

mCaptureRequestBuilderFront = mCameraDeviceFront.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW); mCaptureRequestBuilderFront.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_OFF); mCaptureRequestBuilderFront.set(CaptureRequest.CONTROL_AE_LOCK, true);

Try this while creating capture request for front or both cameras. This made the application work on a custom Quectel hardware running Android 9.

@seann99
Copy link

seann99 commented Jul 22, 2020

Hello,
Thank you for this wonderful code. I am using a Quectel SC600Y and the application crashes when opening the rear camera. Here is the error message: Access denied finding property "vendor.camera.aux.packagelist". I thought it's a permission issue, so I added this in the manifest:
uses-permission android: name = "android.permission.CAMERA"
uses-feature android: name = "android.hardware.camera"
uses-feature android: name = "android.hardware.camera.autofocus"
but nothing to do. Do you have an idea ?
Thanks & Best Regards,

@ananthrajsingh
Copy link
Owner

ananthrajsingh commented Jul 22, 2020

Hey @seann99, you are welcome. Did you try this:

mPreviewBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_OFF);

mPreviewBuilder.set(CaptureRequest.CONTROL_AE_LOCK, true);

mPreviewBuilder.set(CaptureRequest.CONTROL_MODE, CaptureRequest.CONTROL_MODE_OFF);

If problem persists, mind posting the crashlogs?

@ananthrajsingh ananthrajsingh self-assigned this Jul 22, 2020
@seann99
Copy link

seann99 commented Jul 22, 2020

Thank you very much for this quick feedback. In your code it is already mentioned:
previewRequestBuilderRear.set (CaptureRequest.CONTROL_AF_MODE,
CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE).

and i'chnaged in:

previewRequestBuilderFront.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_OFF)
previewRequestBuilderFront.set(CaptureRequest.CONTROL_AE_LOCK, true)
previewRequestBuilderFront.set(CaptureRequest.CONTROL_MODE, CaptureRequest.CONTROL_MODE_OFF)

here are my logs:

2020-07-22 14:09:14.047 17413-17413/com.ananth.frontrearcamera E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2020-07-22 14:09:14.055 17413-17413/com.ananth.frontrearcamera D/CameraFragment: selected aspect ratio 120x160 : 0
2020-07-22 14:09:14.052 17413-17413/com.ananth.frontrearcamera W/frontrearcamera: type=1400 audit(0.0:1044): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=14928 scontext=u:r:untrusted_app:s0:c99,c256,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
2020-07-22 14:09:14.063 17413-17413/com.ananth.frontrearcamera E/libc: Access denied finding property "persist.vendor.camera.privapp.list"
2020-07-22 14:09:14.062 17413-17413/com.ananth.frontrearcamera W/Binder:17413_2: type=1400 audit(0.0:1045): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=14928 scontext=u:r:untrusted_app:s0:c99,c256,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
2020-07-22 14:09:14.069 17413-17426/com.ananth.frontrearcamera E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2020-07-22 14:09:14.151 17413-17413/com.ananth.frontrearcamera E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2020-07-22 14:09:14.158 17413-17413/com.ananth.frontrearcamera D/CameraFragment: selected aspect ratio 120x160 : 0
2020-07-22 14:09:14.166 17413-17413/com.ananth.frontrearcamera E/libc: Access denied finding property "persist.vendor.camera.privapp.list"
2020-07-22 14:09:14.175 17413-17426/com.ananth.frontrearcamera E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2020-07-22 14:09:14.176 17413-17426/com.ananth.frontrearcamera E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2020-07-22 14:09:14.878 17413-17426/com.ananth.frontrearcamera E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2020-07-22 14:09:14.890 17413-17426/com.ananth.frontrearcamera E/libc: Access denied finding property "vendor.camera.aux.packagelist"
2020-07-22 14:09:15.163 17413-17426/com.ananth.frontrearcamera E/libc: Access denied finding property "vendor.camera.aux.packagelist"

2020-07-22 14:09:15.152 17413-17413/com.ananth.frontrearcamera W/Binder:17413_2: type=1400 audit(0.0:1056): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=14928 scontext=u:r:untrusted_app:s0:c99,c256,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
2020-07-22 14:09:20.835 17413-17422/com.ananth.frontrearcamera W/System: A resource failed to call release.
2020-07-22 14:09:20.835 17413-17422/com.ananth.frontrearcamera W/System: A resource failed to call release.

@ananthrajsingh
Copy link
Owner

Hey @seann99, I am not sure these are crash logs.

@ranveerraj248
Copy link

mCaptureRequestBuilderFront = mCameraDeviceFront.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW); mCaptureRequestBuilderFront.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_OFF); mCaptureRequestBuilderFront.set(CaptureRequest.CONTROL_AE_LOCK, true);
can you tell me exactly where i have to paste this code my rear is working fine but front is not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants