phhusson / treble_experimentations

Notes about tinkering with Android Project Treble
3.4k stars 660 forks source link

[Cubot P.] MT6763T (Helio P23) - Camera disappearing on AOSP 9/10 #1235

Open oscx opened 4 years ago

oscx commented 4 years ago

With Stock ROM works OK, no hardware defective.

Tested with AOSP 10.0 v214 (not stable on this device) and AOSP 9.0 v123 (stable and running well on the device incl. Dual SIM, BT etc. - except Camera usage). No camera available and according to Open Camera, no camera is found at all.

Attachments:

In the logs, I couldn't find any hint about missing camera-related libs or missing vndk content:

cat logcat_boot.txt | grep lib | grep -i cam # no result
cat logcat_boot.txt | grep "E "|grep -i cam # no result
cat logcat_boot.txt | grep "W "|grep -i cam
01-01 01:15:19.329  1098  1098 W PackageManager: Failed to scan /vendor/app/EmCamera: Apps that share a user with a privileged app must themselves be marked as privileged. com.mediatek.emcamera shares privileged user android.uid.phone. # probably not related; this seems to be the bloatware camera app

Is there another hint in the logs or another file where we could find the reason for the missing camera?

Thanks for help!

phhusson commented 4 years ago

Hum weird, I see really nothing relevant to camera in those logs. adb shell getprop |grep camera ? do you see camera related files in /vendor/etc/init? if yes include them

Le lun. 6 avr. 2020 à 16:18, oscx notifications@github.com a écrit :

With Stock ROM works OK, no hardware defective.

Tested with AOSP 10.0 v214 (not stable on this device) and AOSP 9.0 v123 (stable and running well on the device incl. Dual SIM, BT etc. - except Camera usage). No camera available and according to Open Camera, no camera is found at all.

Attachments:

-

vendor_manifest.xml.txt https://github.com/phhusson/treble_experimentations/files/4438834/vendor_manifest.xml.txt

logcat_boot.txt https://github.com/phhusson/treble_experimentations/files/4438835/logcat_boot.txt

In the logs, I couldn't find any hint about missing camera-related libs or missing vndk content:

cat logcat_boot.txt | grep lib | grep -i cam # no result cat logcat_boot.txt | grep "E "|grep -i cam # no result cat logcat_boot.txt | grep "W "|grep -i cam 01-01 01:15:19.329 1098 1098 W PackageManager: Failed to scan /vendor/app/EmCamera: Apps that share a user with a privileged app must themselves be marked as privileged. com.mediatek.emcamera shares privileged user android.uid.phone. # probably not related; this seems to be the bloatware camera app

Is there another hint in the logs or another file where we could find the reason for the missing camera?

Thanks for help!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/1235, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAA4OWXCZASCD2DGUXEYS3RLHQE7ANCNFSM4MCKD6EQ .

oscx commented 4 years ago

Thanks for prompt reply.

adb shell getprop |grep camera
[camera.disable_zsl_mode]: [1]
[camera.mdp.cz.enable]: [1]
[camera.mdp.dre.enable]: [0]
[init.svc.camerahalserver]: [running]
[init.svc.cameraserver]: [running]
[ro.mtk_camera_app_version]: [1]

in /vendor/etc/init/, the only related file i see is:

cat /vendor/etc/init/camerahalserver.rc
service camerahalserver /vendor/bin/hw/camerahalserver
    class main
    user cameraserver
    group audio camera input drmrpc sdcard_rw system media graphics
    ioprio rt 4
    capabilities SYS_NICE
    writepid /dev/cpuset/camera-daemon/tasks /dev/stune/top-app/tasks
phhusson commented 4 years ago

Okay, then give the result of adb logcat --pid=$(adb shell pidof camerahalserver) -d

Le lun. 6 avr. 2020 à 16:53, oscx notifications@github.com a écrit :

Thanks for prompt reply.

adb shell getprop |grep camera

in /vendor/etc/init/, the only related file i see is:

cat /vendor/etc/init/camerahalserver.rc service camerahalserver /vendor/bin/hw/camerahalserver class main user cameraserver group audio camera input drmrpc sdcard_rw system media graphics ioprio rt 4 capabilities SYS_NICE writepid /dev/cpuset/camera-daemon/tasks /dev/stune/top-app/tasks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

oscx commented 4 years ago

Empty output.

adb shell pidof camerahalserver
734
adb logcat --pid=$(adb shell pidof camerahalserver) -d|wc -l
0
adb logcat --pid=$(adb shell pidof camerahalserver) -d
phhusson commented 4 years ago

okay, let's restart it and get logs again: adb shell su -c 'setprop ctl.restart camerahalserver'

wait few seconds then do again adb logcat --pid=$(adb shell pidof camerahalserver) -d

Le lun. 6 avr. 2020 à 17:01, oscx notifications@github.com a écrit :

Empty output.

adb shell pidof camerahalserver 734 adb logcat --pid=$(adb shell pidof camerahalserver) -d|wc -l 0 adb logcat --pid=$(adb shell pidof camerahalserver) -d

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/1235#issuecomment-609848913, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAA4ORNMAJAL55Y3BAEOZDRLHVFHANCNFSM4MCKD6EQ .

oscx commented 4 years ago

camerahalserver.log.txt

phhusson commented 4 years ago

yup it happily says it has exactly 0 cameras. Tell me what you see which looks camera-related stuff in /system/lib64, or /system/lib or /system/build.prop

Le lun. 6 avr. 2020 à 17:12, oscx notifications@github.com a écrit :

camerahalserver.log.txt https://github.com/phhusson/treble_experimentations/files/4439212/camerahalserver.log.txt

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/1235#issuecomment-609855368, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAA4OXWVLT2ZG2OBKPVTSTRLHWO3ANCNFSM4MCKD6EQ .

oscx commented 4 years ago

in attachment /system/build.prop and /vendor/build.prop:

/system/lib64/libcameraservice.so
/system/lib64/libcamera_metadata.so
/system/lib64/libcamera_client.so
/system/lib64/libcamera2ndk.so
/system/lib64/android.hardware.camera.provider@2.4.so
/system/lib64/android.hardware.camera.device@3.4.so
/system/lib64/android.hardware.camera.device@3.3.so
/system/lib64/android.hardware.camera.device@3.2.so
/system/lib64/android.hardware.camera.device@1.0.so
/system/lib64/android.hardware.camera.common@1.0.so
/system/lib64/vndk-28/libcamera_metadata.so
/system/lib64/vndk-28/android.hardware.camera.provider@2.4.so
/system/lib64/vndk-28/android.hardware.camera.metadata@3.3.so
/system/lib64/vndk-28/android.hardware.camera.metadata@3.2.so
/system/lib64/vndk-28/android.hardware.camera.device@3.4.so
/system/lib64/vndk-28/android.hardware.camera.device@3.3.so
/system/lib64/vndk-28/android.hardware.camera.device@3.2.so
/system/lib64/vndk-28/android.hardware.camera.device@1.0.so
/system/lib64/vndk-28/android.hardware.camera.common@1.0.so
/system/lib64/vndk-27/libcamera_metadata.so
/system/lib64/vndk-27/libcamera_client.so
/system/lib64/vndk-27/android.hardware.camera.provider@2.4.so
/system/lib64/vndk-27/android.hardware.camera.metadata@3.2.so
/system/lib64/vndk-27/android.hardware.camera.device@3.3.so
/system/lib64/vndk-27/android.hardware.camera.device@3.2.so
/system/lib64/vndk-27/android.hardware.camera.device@1.0.so
/system/lib64/vndk-27/android.hardware.camera.common@1.0.so
/system/lib64/vndk-26/libcameraservice.so
/system/lib64/vndk-26/libcamera_metadata.so
/system/lib64/vndk-26/libcamera_client.so
/system/lib64/vndk-26/libcamera2ndk.so
/system/lib64/vndk-26/android.hardware.camera.provider@2.4.so
/system/lib64/vndk-26/android.hardware.camera.metadata@3.2.so
/system/lib64/vndk-26/android.hardware.camera.device@3.2.so
/system/lib64/vndk-26/android.hardware.camera.device@1.0.so
/system/lib64/vndk-26/android.hardware.camera.common@1.0.so

and equivalent files (same names) in /system/lib/.

oscx commented 4 years ago

@phhusson is there another info that i could provide for comparison, from stock rom where the camera works as expected?

oscx commented 4 years ago

(for completion, i also tried with the new v215. no success with that, too. back to v123.)

oscx commented 4 years ago

after removing dalvik cache and rebooting again (on v123), at least the mention of "hwservicemanager". is this regular or clarifying what's missing and where..?

01-01 01:12:03.656   736   736 I camerahalserver: Camera HAL Server is starting..., ADV_CAM_SUPPORT(1)
01-01 01:12:03.777   719   719 I cameraserver: ServiceManager: 0xeda22f00
01-01 01:12:03.782   320   320 W hwservicemanager: getTransport: Cannot find entry android.hardware.camera.provider@2.4::ICameraProvider/legacy/0 in either framework or device manifest.
01-01 01:12:03.782   320   320 W hwservicemanager: getTransport: Cannot find entry android.hardware.camera.provider@2.4::ICameraProvider/external/0 in either framework or device manifest.
01-01 01:12:03.844   736   736 D MtkCam/Utils: ###### get camera log property =-1
01-01 01:12:03.908   736   736 I mtkcam-devicemgr: [CameraDeviceManagerBase] "internal" this:0xf4663004 persist.mtkcam.aosp_hal_version: persist.mtkcam.aosp_hal_legacy:1 persist.mtkcam.aosp_hal_legacy:0
01-01 01:12:04.957   736   736 I mtkcam-devicemgr: [initialize] +
01-01 01:12:04.960   736   736 I mtkcam-module: [ModuleStore] ctor
01-01 01:12:04.960   736   736 I mtkcam-module: [dump_module] [registered] module_id:0x0x1 module_factory:0xf141587d register_name:vendor/mediatek/proprietary/hardware/mtkcam/main/core/module/drv/register_HalSensor.cpp
01-01 01:12:04.960   736   736 I mtkcam-module: [dump_module] [registered] module_id:0x0x2 module_factory:0xf1417b15 register_name:vendor/mediatek/proprietary/hardware/mtkcam/main/core/module/drv/register_HwSyncDrv.cpp
01-01 01:12:04.960   736   736 I mtkcam-module: [dump_module] [registered] module_id:0x0x3 module_factory:0xf26438b1 register_name:vendor/mediatek/proprietary/hardware/mtkcam/main/core/module/drv/register_iopipe_CamIO_NormalPipe.cpp
01-01 01:12:04.960   736   736 I mtkcam-module: [ShowLoading] loading (MODULE_GROUP_ID:0 MODULE_GROUP_COUNT:4 ...
01-01 01:12:04.960   736   736 I mtkcam-module: [load] MtkCam_getModuleFactory_drv(0xeef29e89) @ libmtkcam_modulefactory_drv.so
01-01 01:12:05.264   736   736 I mtkcam-devicemgr: pHalSensorList:0xf145f3e8 searchSensors:0 queryNumberOfSensors:0
01-01 01:12:05.264   736   736 I mtkcam-devicemgr: [logLocked] Physical Devices: # 0