I had the same problem with Camera 1 API on my test device "LG V30". I found that this message ( Access denied finding property "camera.hal1.packagelist" ) appeared when I opened the camera as follows:
int numberOfCameras = Camera.getNumberOfCameras(); CameraInfo cameraInfo = new CameraInfo(); for (int i = 0; i < numberOfCameras; i++) { Camera.getCameraInfo(i, cameraInfo); if (cameraInfo.facing == CameraInfo.CAMERA_FACING_BACK) { camera = Camera.open(i); cameraId = i; } }
The important thing is that this happened only for the LG V30, which has 2 rear cameras ( numberOfCameras=3 ).
After some testing, I found out that this works for this device:
public static Camera getCameraInstance(){ Camera c = null; try { c = Camera.open();
The above code example will refer to the first backward-facing camera on a multi-camera device. Here you can find a detailed description.
Manuel schmitzberger
source share