Question : How to enable camera logs on Android builds?
Answer: User space, kernel space and Qualcomm camera HAL logs can be enabled as follows:
1. To enable user space logs, change camera_dbg.h file under vendor\qcom\proprietary\mm-camera\common folder as like below or define MM_DEBUG in Android.mk located invendor\qcom\proprietary\mm-camera folder.
#define LOG_DEBUG
#undef CDBG
#ifndef LOG_DEBUG
#define CDBG(fmt, args...) do{}while(0)
#else
<snipped>
#endif
#endif /* __CAMERA_DBG_H__ */
After “#define LOG_DEBUG”, set 1 for the #define from the list below to enable corresponding 3A logs.
#define CAM3A_AWB_DEBUG 0
#define CAM3A_AEC_DEBUG 0
#define CAM3A_AF_DEBUG0
#define CAM3A_SD_DEBUG0
2. To enable kernel logs, change camera.h file under kernel\arch\arm\mach-msm\include\mach folder.
<snipped>
#define CONFIG_MSM_CAMERA_DEBUG
#ifdef CONFIG_MSM_CAMERA_DEBUG
#define CDBG(fmt, args...) printk(KERN_INFO "msm_camera: " fmt, ##args)
#else
#define CDBG(fmt, args...) do { } while (0)
#endif
3. To enable Qualcomm Camera HAL logs, edit the QualcommCameraHardware.cpp file as follows:
case1 : If using cupcake/donut build, the file is located under \hardware\msm7k\libcamera folder.
case2 : If using eclair build, the file is located under \vendor\qcom\android-open\libcamera2 folder.
#define LOG_NDEBUG 0
#define LOG_NIDEBUG 0
#define LOG_NDDEBUG 0
#define LOG_TAG "QualcommCameraHardware"
#include <utils/Log.h>
<snipped>
4. Capturing the logs to the log files:
Please refer to solution#00018580 as well if you use MSM7x30/8x55/8x60 before staring to capture camera logs of kernel space. The solution describes the way to use dynamic logging method for the chip sets.
- To save userspace logs : adb logcat -v time > USER_SPACE_LOG_FILE_NAME
- To save kernel logs : adb shell cat /proc/kmsg > KERNEL_SPACE_LOG_FILE_NAME
qualcomm How to enable camera logs on Android builds?
最新推荐文章于 2021-07-14 09:08:49 发布