Repository: flutter
Issue: Camera application is crashing and throws an exception - Access denied finding property "vendor.camera.aux.packagelist"
Labels: e: device-specific,platform-android,p: camera,package,P2,team-android,triaged-android

Lenovo TB-X605L has issue with activating/lookup device's camera with flutter / camera library.

Same code works fine (camera is able to be used to capture image / video) on Samsung S6 tablet (and works fine also Samsung A20, MotoOneZoom mobiles).

Re-issued as per https://github.com/flutter/flutter/issues/44178

## Steps to Reproduce

1. dependency version:
`camera: ^0.5.7`
2. Code sample:

```dart
  Future<Null> _fetchCameras() async {
    // SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);

    try {
      List<CameraDescription> cameras = await availableCameras();

      if (controller == null) {
        controller =
            new CameraController(cameras[0], ResolutionPreset.veryHigh);
        await controller.initialize();
      }
    } on CameraException catch (e) {
      logError(e.code, e.description);
    }
  }
```
3. startup app


**Target Platform: Android**
**Target OS version/browser: 9**
**Devices: Lenovo TB-X605L & Samsung S6**


## Logs


```bash
12-11 14:38:54.037   763 16853 D NuPlayerDriver: notifyListener_l(0xecc30680), (1, 0, 0, -1), loop setting(0, 0)
12-11 14:38:54.026 16766 16766 W Binder:16766_2: type=1400 audit(0.0:466): avc: denied { read } for name="u:object_r:vendor_camera_prop:s0" dev="tmpfs" ino=6503 scontext=u:r:untrusted_app:s0:c134,c256,c512,c768 tcontext=u:object_r:vendor_camera_prop:s0 tclass=file permissive=0
12-11 14:38:54.041 16766 16779 E libc    : Access denied finding property "vendor.camera.aux.packagelist"
12-11 14:38:54.041   753  7950 I CameraHardwareInterface: Opening camera 0
12-11 14:38:54.041  1203  1304 I CamDev@1.0-impl: Opening camera 0
12-11 14:38:54.041  1203  1304 I QCamera : <HAL><INFO> getCameraInfo: 342: Camera id 0 API version 256
12-11 14:38:54.041  1203  1304 I QCamera : <HAL><INFO> getCamInfo: 8809: camera 0 resource cost is 100
12-11 14:38:54.041  1203  1304 I QCamera : <HAL><INFO> cameraDeviceOpen: 407: Open camera id 0 API version 256
12-11 14:38:54.042   544   544 D audio_hw_primary: adev_set_parameters: enter: cameraFacing=back
12-11 14:38:54.042   544   544 D audio_hw_extn: audio_extn_set_anc_parameters: anc_enabled:0
12-11 14:38:54.042   544   544 D audio_hw_spkr_prot: audio_extn_fbsp_set_parameters: Speaker protection disabled
12-11 14:38:54.043  1203  1304 D vndksupport: Loading /vendor/lib/hw/power.qcom.so from current namespace instead of sphal namespace.
12-11 14:38:54.043   582   693 D APM_AudioPolicyManager: stopOutput() output 13, stream 1, session 105
12-11 14:38:54.046  1203  1304 I QCamera : <HAL><INFO> openCamera: 1827: [KPI Perf]: E PROFILE_OPEN_CAMERA camera id 0
12-11 14:38:54.047   570   611 E ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
12-11 14:38:54.048   781   781 I mm-camera: < INFO> 395: enable_memleak_trace: start memleak tracking.
12-11 14:38:54.048   781   781 W libc    : Unable to set property "persist.camera.debug.logfile" to "0": connection failed; errno=13 (Permission denied)
12-11 14:38:54.049   781   781 I mm-camera: <MCT   >< INFO> 63: mct_controller_new: Creating new mct_controller with session-id 1
12-11 14:38:54.049   781 16858 I mm-camera: <MCT   >< INFO> 4529: mct_pipeline_start_session_thread: E sensor
12-11 14:38:54.049   781 16858 I mm-camera: <MCT   >< INFO> 4536: mct_pipeline_start_session_thread: Calling start_session on Module sensor
12-11 14:38:54.050   781 16860 I mm-camera: <MCT   >< INFO> 4529: mct_pipeline_start_session_thread: E iface
12-11 14:38:54.050   781 16860 I mm-camera: <MCT   >< INFO> 4536: mct_pipeline_start_session_thread: Calling start_session on Module iface
12-11 14:38:54.051   781 16861 I mm-camera: <MCT   >< INFO> 4529: mct_pipeline_start_session_thread: E isp
12-11 14:38:54.051   781 16861 I mm-camera: <MCT   >< INFO> 4536: mct_pipeline_start_session_thread: Calling start_session on Module isp
12-11 14:38:54.051   781 16861 I mm-camera: <ISP   >< INFO> 205: isp_module_start_session: session id 1
12-11 14:38:54.052   781 16863 I mm-camera: <MCT   >< INFO> 4529: mct_pipeline_start_session_thread: E stats
12-11 14:38:54.052   781 16860 I mm-camera: <MCT   >< INFO> 4539: mct_pipeline_start_session_thread: Module iface start_session rc = 1
12-11 14:38:54.052   781 16860 I mm-camera: <MCT   >< INFO> 4547: mct_pipeline_start_session_thread: started_num = 1, success = 1
12-11 14:38:54.052   781 16860 I mm-camera: <MCT   >< INFO> 4554: mct_pipeline_start_session_thread: X iface
12-11 14:38:54.052   781 16863 I mm-camera: <MCT   >< INFO> 4536: mct_pipeline_start_session_thread: Calling start_session on Module stats
12-11 14:38:54.053   781 16864 I mm-camera: <MCT   >< INFO> 4529: mct_pipeline_start_session_thread: E pproc
12-11 14:38:54.053   781 16864 I mm-camera: <MCT   >< INFO> 4536: mct_pipeline_start_session_thread: Calling start_session on Module pproc
12-11 14:38:54.055   781 16865 I mm-camera: <MCT   >< INFO> 4529: mct_pipeline_start_session_thread: E imglib
12-11 14:38:54.056   781 16865 I mm-camera: <MCT   >< INFO> 4536: mct_pipeline_start_session_thread: Calling start_session on Module imglib
12-11 14:38:54.056   781 16864 I mm-camera: <MCT   >< INFO> 4539: mct_pipeline_start_session_thread: Module pproc start_session rc = 1
12-11 14:38:54.056   781 16864 I mm-camera: <MCT   >< INFO> 4547: mct_pipeline_start_session_thread: started_num = 2, success = 2
12-11 14:38:54.056   781 16864 I mm-camera: <MCT   >< INFO> 4554: mct_pipeline_start_session_thread: X pproc
12-11 14:38:54.059   781 16863 E mm-camera: <STATS_AIS ><ERROR> 173: dsps_send_req: DSPS Send Request Timeout!!
12-11 14:38:54.059   781 16865 I mm-camera: <MCT   >< INFO> 4539: mct_pipeline_start_session_thread: Module imglib start_session rc = 1
12-11 14:38:54.059   781 16865 I mm-camera: <MCT   >< INFO> 4547: mct_pipeline_start_session_thread: started_num = 3, success = 3
12-11 14:38:54.059   781 16865 I mm-camera: <MCT   >< INFO> 4554: mct_pipeline_start_session_thread: X imglib
12-11 14:38:54.060   781 16861 I mm-camera: <MCT   >< INFO> 4539: mct_pipeline_start_session_thread: Module isp start_session rc = 1
12-11 14:38:54.060   781 16861 I mm-camera: <MCT   >< INFO> 4547: mct_pipeline_start_session_thread: started_num = 4, success = 4
12-11 14:38:54.060   781 16861 I mm-camera: <MCT   >< INFO> 4554: mct_pipeline_start_session_thread: X isp
12-11 14:38:54.061   781 16863 I mm-camera: <MCT   >< INFO> 4539: mct_pipeline_start_session_thread: Module stats start_session rc = 1
12-11 14:38:54.061   781 16858 I mm-camera: <MCT   >< INFO> 4539: mct_pipeline_start_session_thread: Module sensor start_session rc = 1
12-11 14:38:54.061   781 16863 I mm-camera: <MCT   >< INFO> 4547: mct_pipeline_start_session_thread: started_num = 5, success = 5
12-11 14:38:54.061   781 16863 I mm-camera: <MCT   >< INFO> 4554: mct_pipeline_start_session_thread: X stats
12-11 14:38:54.061   781 16858 I mm-camera: <MCT   >< INFO> 4547: mct_pipeline_start_session_thread: started_num = 6, success = 6
12-11 14:38:54.061   781 16858 I mm-camera: <MCT   >< INFO> 4554: mct_pipeline_start_session_thread: X sensor
12-11 14:38:54.067   781   781 I mm-camera: <MCT   >< INFO> 4450: mct_pipeline_start_stream_internal: Adding session stream streamid= 0xf for session=1
12-11 14:38:54.067   781   781 I mm-camera: <MCT   >< INFO> 4498: mct_pipeline_start_stream_internal: Linking session stream for session 1
12-11 14:38:54.067   781   781 I mm-camera: <MCT   >< INFO> 510: mct_stream_start_link: Start linking Session-stream 0x1000f
12-11 14:38:54.068   781   781 I mm-camera: <ISP   >< INFO> 801: isp_port_check_caps_reserve: port 0xec3e7c80 ide 1000f type 10 dim 0 0
12-11 14:38:54.068   781   781 I mm-camera: <PPROC >< INFO> 446: pproc_port_add_modules_to_stream: in identity 1000f stream 10 int_link = 0xec3fc400
12-11 14:38:54.068   781   781 I mm-camera: <PPROC >< INFO> 458: pproc_port_add_modules_to_stream: :LINK linking mods tmod and c2d for identity 1000f
12-11 14:38:54.068   781   781 I mm-camera: <C2D   >< INFO> 1490: c2d_module_notify_add_stream: width 0, height 0, stride 0, scanline 0, is_type 0
12-11 14:38:54.068   781   781 I mm-camera: <PPROC >< INFO> 458: pproc_port_add_modules_to_stream: :LINK linking mods c2d and cpp for identity 1000f
12-11 14:38:54.068   781   781 I mm-camera: <CPP   >< INFO> 2154: cpp_module_notify_add_stream: :width 0, height 0, stride 0, scanline 0, framelen 0
12-11 14:38:54.068   781   781 I mm-camera: <CPP   >< INFO> 2319: cpp_module_notify_add_stream: : stream 10, fmt 1, asf_mode 0, sharpness_level 0.000000,asf mask 0, denoise 0, denoise_mask 0, dsdn mask 0,dsdn enable 0, tnr mask 0, tnr enable 0, ds_mask 0
12-11 14:38:54.068   781   781 I mm-camera: <PPROC >< INFO> 458: pproc_port_add_modules_to_stream: :LINK linking mods cpp and paaf for identity 1000f
12-11 14:38:54.069   781   781 I mm-camera: <PPROC >< INFO> 458: pproc_port_add_modules_to_stream: :LINK linking mods paaf and ezt for identity 1000f
12-11 14:38:54.069   781   781 I mm-camera: <PPROC >< INFO> 458: pproc_port_add_modules_to_stream: :LINK linking mods ezt and quadracfa for identity 1000f
12-11 14:38:54.069   781   781 E mm-camera: <STATS ><ERROR> 2822: stats_port_check_caps_reserve: Invalid Port capability type!
12-11 14:38:54.069   781   781 I chatty  : uid=1006(camera) mm-qcamera-daem identical 3 lines
12-11 14:38:54.069   781   781 E mm-camera: <STATS ><ERROR> 2822: stats_port_check_caps_reserve: Invalid Port capability type!
12-11 14:38:54.070   781   781 I mm-camera: <MCT   >< INFO> 4507: mct_pipeline_start_stream_internal: Session stream linked successfully session 1
12-11 14:38:54.073   555   597 I SDM     : ResourceImpl::SetMaxBandwidthMode: new bandwidth mode=1
12-11 14:38:54.076  1203  1304 I Thermal-Lib: Thermal-Lib-Client: Registration successful for camera with handle:1
12-11 14:38:54.076  1203  1304 I Thermal-Lib: Thermal-Lib-Client: Registration successful for camcorder with handle:2
12-11 14:38:54.076  1203  1304 I QCamera : <HAL><INFO> openCamera: 1840: [KPI Perf]: X PROFILE_OPEN_CAMERA camera id 0, rc: 0
12-11 14:38:54.077   739   885 I ThermalEngine: Thermal-Server: Adding thermal event listener on fd 61
12-11 14:38:54.077  1203 16884 I Thermal-Lib: Thermal-Lib-Client: Client received msg camera 0
12-11 14:38:54.077  1203 16884 I Thermal-Lib: Thermal-Lib-Client: Client received msg camcorder 0
12-11 14:38:54.078   781 16879 E mm-camera: <MCT   ><ERROR> 1056: mct_pipeline_decide_hw_wakeup: Couldn't find meta stream
12-11 14:38:54.080   781 16879 I chatty  : uid=1006(camera) CAM_MctServ identical 1 line
12-11 14:38:54.080   781 16879 E mm-camera: <MCT   ><ERROR> 1056: mct_pipeline_decide_hw_wakeup: Couldn't find meta stream
12-11 14:38:54.084  1203  1304 I QCamera : <HAL><INFO> getCameraInfo: 342: Camera id 0 API version 256
12-11 14:38:54.084  1203  1304 I QCamera : <HAL><INFO> getCamInfo: 8809: camera 0 resource cost is 100
12-11 14:38:54.087 16766 16766 E libc    : Access denied finding property "vendor.camera.aux.packagelist"
12-11 14:38:54.087  1203  1304 I QCamera : <HAL><INFO> getCameraInfo: 342: Camera id 0 API version 256
12-11 14:38:54.087  1203  1304 I QCamera : <HAL><INFO> getCamInfo: 8809: camera 0 resource cost is 100
12-11 14:38:54.130 16766 16766 I CameraDeviceState: Legacy camera service transitioning to state CONFIGURING
12-11 14:38:54.131 16766 16888 I RequestThread-0: Configure outputs: 2 surfaces configured.
12-11 14:38:54.131 16766 16888 D Camera  : app passed NULL surface
12-11 14:38:54.139 16766 16888 I RequestThread-0: configureOutputs - set take picture size to 1920x1080
12-11 14:38:54.171   781 16859 E mm-camera: <SENSOR><ERROR> hi556_qh_m10_eeprom_get_calibration_items: 49: is_wbc:0,is_afc:1,is_lsc:0,is_dpc:0,is_insensor:1,  is_ois:0
12-11 14:38:54.171   781 16859 E mm-camera: hi556_qh_m10_insensor_get_raw_data:23,Enter
12-11 14:38:54.171   781 16859 E mm-camera: hi556_qh_m10_insensor_get_raw_data:30,Exit
12-11 14:38:54.173  1203 16855 I QCamera : <HAL><INFO> setDualCameraMode: 14872: Dual camera mode set 0
12-11 14:38:54.173  1203 16855 I QCamera : <HAL><INFO> setPreviewSize: 1513: Requested preview size 1280 x 720
12-11 14:38:54.175   781 16879 E mm-camera: <MCT   ><ERROR> 1056: mct_pipeline_decide_hw_wakeup: Couldn't find meta stream
12-11 14:38:54.176   781 16859 E mm-camera: <SENSOR><ERROR> 601: actuator_load_lib: name=cn3937a
12-11 14:38:54.176 16766 16766 I CameraDeviceState: Legacy camera service transitioning to state IDLE
12-11 14:38:54.177   781 16859 E mm-camera: <SENSOR><ERROR> hi556_qh_m10_eeprom_autofocus_calibration: 323: Enter
12-11 14:38:54.177   781 16859 E mm-camera: hi556_qh_m10_eeprom_autofocus_calibration:349,liuying_af before adjust initial code 185, adjusted code_per_step: 1, qvalue: 1024
12-11 14:38:54.177   781 16859 E mm-camera: hi556_qh_m10_eeprom_autofocus_calibration:366,liuying_af otp_step_bound 120, new_step_bound 306 total_steps 255
12-11 14:38:54.177   781 16859 E mm-camera: hi556_qh_m10_eeprom_autofocus_calibration:371,liuying_af after adjust initial code 178, adjusted code_per_step: 1228, qvalue: 1024
12-11 14:38:54.177   781 16859 E mm-camera: <SENSOR><ERROR> hi556_qh_m10_eeprom_autofocus_calibration: 373: Exit
12-11 14:38:54.181 16766 16766 I RequestQueue: Repeating capture request set.
12-11 14:38:54.192 16766 16888 W LegacyRequestMapper: convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
12-11 14:38:54.192 16766 16888 W LegacyRequestMapper: Only received metering rectangles with weight 0.
12-11 14:38:54.193 16766 16888 W LegacyRequestMapper: Only received metering rectangles with weight 0.
12-11 14:38:54.200  1203 16855 I QCamera : <HAL><INFO> setDualCameraMode: 14872: Dual camera mode set 0

$ `flutter analyze` 
Nothing to fix
```


$ flutter doctor -v
```bash
[√] Flutter (Channel dev, v1.13.0, on Microsoft Windows [Version 10.0.18362.476], locale en-GB)
    • Flutter version 1.13.0 at c:\dev\env\flutter
    • Framework revision 09126abb22 (8 days ago), 2019-12-03 17:43:00 -0800
    • Engine revision 6179380243
    • Dart version 2.7.0 (build 2.7.0-dev.2.1 a4d799c402)

 
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\dev\env\Android
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 28.0.3
    • ANDROID_HOME = C:\dev\env\Android
    • Java binary at: C:\dev\tools\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Android Studio (version 3.5)
    • Android Studio at C:\dev\tools\Android\Android Studio
    • Flutter plugin version 42.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code, 64-bit edition (version 1.40.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.7.0

[√] Connected device (1 available)
    • Lenovo TB X605L • HA0K4WJ0 • android-arm64 • Android 9 (API 28)

• No issues found!
```