[Moto X Android Development] rjshrjndrn:
Hi,

I lost my back camera. I tried to install google camera and it says my device don't have a main camera

steps:

1. flashed this os after wiping system dalvik and cache

camera works fine

2. restart the device wipe the system and dalvik and flash the os again

camera gone

3. tried fresh install, even wiped user data

camera is gone.

this is the logcat while i open the camea, which always shows the front camera.

```

10-03 22:07:40.030 224 773 E QualcommCamera: Qint android::start_preview(camera_device*): E
10-03 22:07:40.030 224 773 I CameraHalWatchdog: Starting Watchdog Thread...
10-03 22:07:40.030 224 773 E hardware/qcom/camera/QCamera/HAL/core/src/QCameraStream.cpp: streamOff: Stream:0 is not active
10-03 22:07:40.030 224 773 E hardware/qcom/camera/QCamera/HAL/core/src/QCameraStream.cpp: streamOff: Stream:0 is not active
10-03 22:07:40.030 224 773 I QCameraHWI_Parm: uint32_t android::QCameraHardwareInterface::getVideoRotation() : Video rotation is 0
10-03 22:07:40.031 212 6592 I mm-camera: config_proc_native_ctrl_cmd: CAMERA_SET_PARM_DIMENSION called
10-03 22:07:40.031 212 6592 E mm-camera: config_validate_dimension: RDI 0: W X H: 1920 X 1088, RDI 1: W X H: 1920 X 544
10-03 22:07:40.031 212 6592 E mm-camera: config_validate_dimension: RDI2: W X H: 2048 X 4101
10-03 22:07:40.041 224 773 V QCameraHWI_Still: getBuf : E
10-03 22:07:40.041 224 773 D QCameraHWI_Still: virtual int android::QCameraStream_SnapshotMain::getBuf(mm_camera_frame_len_offset*, uint8_t, uint8_t*, mm_camera_buf_def_t*): Allocating Snapshot num = 6, size = 3162112
10-03 22:07:40.051 224 773 V QCameraHWI_Still: getBuf: X
10-03 22:07:40.068 224 773 I QCameraHWI_Parm: uint32_t android::QCameraHardwareInterface::getVideoRotation() : Video rotation is 0
10-03 22:07:40.068 224 773 I QCameraHWI_Parm: bool android::QCameraHardwareInterface::isVTCropEnabled() : VT Crop is 0
10-03 22:07:40.069 207 326 W qdmemalloc: GRALLOC_USAGE_PRIVATE_MM_HEAP cannot be used as an insecure heap! trying to use IOMMU instead !!
10-03 22:07:40.074 207 878 W qdmemalloc: GRALLOC_USAGE_PRIVATE_MM_HEAP cannot be used as an insecure heap! trying to use IOMMU instead !!
10-03 22:07:40.077 207 6659 W qdmemalloc: GRALLOC_USAGE_PRIVATE_MM_HEAP cannot be used as an insecure heap! trying to use IOMMU instead !!
10-03 22:07:40.085 207 321 W qdmemalloc: GRALLOC_USAGE_PRIVATE_MM_HEAP cannot be used as an insecure heap! trying to use IOMMU instead !!
10-03 22:07:40.089 207 1333 W qdmemalloc: GRALLOC_USAGE_PRIVATE_MM_HEAP cannot be used as an insecure heap! trying to use IOMMU instead !!
10-03 22:07:40.091 207 878 W qdmemalloc: GRALLOC_USAGE_PRIVATE_MM_HEAP cannot be used as an insecure heap! trying to use IOMMU instead !!
10-03 22:07:40.094 207 6659 W qdmemalloc: GRALLOC_USAGE_PRIVATE_MM_HEAP cannot be used as an insecure heap! trying to use IOMMU instead !!
10-03 22:07:40.096 207 321 W qdmemalloc: GRALLOC_USAGE_PRIVATE_MM_HEAP cannot be used as an insecure heap! trying to use IOMMU instead !!
10-03 22:07:40.102 224 773 I QCameraHWI_Parm: uint32_t android::QCameraHardwareInterface::getVideoRotation() : Video rotation is 0
10-03 22:07:40.102 224 773 I MotISP_VNR: setup:preview dimensions: 1280x720
10-03 22:07:40.108 224 6692 E MotISP_VNR: morphoOnThreadCreate:preview [-1440106192] sched_setscheduler failed for priority 1: 1
10-03 22:07:40.108 224 6691 E MotISP_VNR: morphoOnThreadCreate:preview [-1439061712] sched_setscheduler failed for priority 1: 1
10-03 22:07:40.111 212 6592 I mm-camera: Check chromatix cache...
10-03 22:07:40.111 212 6592 I mm-camera: Loaded chromatix data from cache
10-03 22:07:40.111 212 6592 E mm-camera: vfe_reload_modules:
10-03 22:07:40.114 212 6592 E mm-camera: vfe_reload_modules: Exit
10-03 22:07:40.114 212 6592 W ais-adapter: aec_set_params: Hit default case from unknown param 14, ignoring!
10-03 22:07:40.114 212 6592 E mm-camera: camif_client_set_params: camif has associated with obj mask 0x1
10-03 22:07:40.114 212 6592 E mm-camera: config_v2_CAMERA_START_common CAMIF_PARAMS_ADD_OBJ_ID failed -1
10-03 22:07:40.114 212 6592 I mm-camera: vfe_process: op_mode : 5
10-03 22:07:40.114 212 6592 I mm-camera: vfe_config_mode: ZSL config 17f783ff
10-03 22:07:40.114 212 6592 E mm-camera: vfe_tintless_wrapper_config: cfg: camif 1920 x 1088, elem 30 x 30
10-03 22:07:40.114 212 6592 E mm-camera: dmlroc_init cfg: camif 1088x1920, elem 22x30, thres 0.001600
10-03 22:07:40.114 212 6592 E mm-camera: dmlroc_init cfg: FullCnt 990, offsetH 0, offsetV 16
10-03 22:07:40.114 212 6592 E mm-camera: vfe_tintless_stat_config: wrapper returned config err=0
10-03 22:07:40.114 212 6592 E mm-camera: vfe_tintless_wrapper_config: same cfg as current
10-03 22:07:40.114 212 6592 E mm-camera: vfe_tintless_update_chromatix_params: wrapper returned config err=0
10-03 22:07:40.115 212 6592 I mm-camera: vfe_operation_config: format 2
10-03 22:07:40.115 212 6592 I mm-camera: vfe_operation_config:vfe_op_mode=5
10-03 22:07:40.115 212 6592 W ais-adapter: awb_set_params: Hit default case from unknown param 3, ignoring!
10-03 22:07:40.115 212 6592 I mm-camera: vfe_set_bestshot: Bestshot mode not changed
10-03 22:07:40.115 212 6592 I mm-camera: axi_update_UB_data Total UB size available for image masters 815
10-03 22:07:40.115 212 6592 I mm-camera: axi_update_UB_data: rem_size:351, minUbSize: 16
10-03 22:07:40.115 212 6592 I mm-camera: axi_update_UB_data Image master 0 UB Offset 0 UB Size 486
10-03 22:07:40.115 212 6592 I mm-camera: axi_update_UB_data Image master 1 UB Offset 487 UB Size 135
10-03 22:07:40.115 212 6592 I mm-camera: axi_update_UB_data Image master 2 UB Offset 0 UB Size 0
10-03 22:07:40.115 212 6592 I mm-camera: axi_update_UB_data Image master 3 UB Offset 0 UB Size 0
10-03 22:07:40.115 212 6592 I mm-camera: axi_update_UB_data Image master 4 UB Offset 623 UB Size 95
10-03 22:07:40.115 212 6592 I mm-camera: axi_update_UB_data Image master 5 UB Offset 719 UB Size 95
10-03 22:07:40.115 212 6592 I mm-camera: axi_update_UB_data Image master 6 UB Offset 0 UB Size 0
10-03 22:07:40.174 212 6592 E mm-camera: mctl_proc_v4l2_request: pending command type:0
10-03 22:07:40.174 212 6592 E mm-camera: mctl_proc_v4l2_request: pendingCtrlCmd 0xb586a208
10-03 22:07:40.192 224 773 E mm-camera-intf: mm_stream_fsm_active_stream_on: Invalid evt=2, stream_state=6
10-03 22:07:40.193 224 773 E QualcommCamera: Qint android::start_preview(camera_device*): X
10-03 22:07:40.193 224 773 I CameraHalWatchdog: Stopped Watchdog Thread...
10-03 22:07:40.195 224 1061 E QualcommCamera: Qvoid android::disable_msg_type(camera_device*, int32_t): E
10-03 22:07:40.195 224 1061 E QualcommCamera: Qint android::send_command(camera_device*, int32_t, int32_t, int32_t): E
10-03 22:07:40.198 224 773 E QualcommCamera: Qint android::set_parameters(camera_device*, const char*): E
10-03 22:07:40.198 224 773 I CameraHalWatchdog: Starting Watchdog Thread...
10-03 22:07:40.198 224 773 E QCameraHWI_Parm: RDI Mode = 0
10-03 22:07:40.200 224 773 E QCameraHWI_Parm: setPreviewFpsRange: No change in FpsRange
10-03 22:07:40.200 224 773 E QCameraHWI_Parm: setFlash:LED FLASH not supported
10-03 22:07:40.201 224 773 E QCameraHWI_Parm: Parameter Video HDR is not supported for this sensor
10-03 22:07:40.202 212 6592 I mm-camera: config_proc_CAMERA_SET_FLIP_HINT rc = 1, status = 1,
10-03 22:07:40.202 224 773 I CameraHalWatchdog: Stopped Watchdog Thread...
10-03 22:07:40.204 2185 2185 I CAM_PhotoModule: Using preview width = 1280& height = 720
10-03 22:07:40.204 2185 2185 D CAM_UI : setAspectRatio() ratio[1.7777778] mAspectRatio[1.3333334]
10-03 22:07:40.206 2185 2185 V CAM_UI : setTransformMatrix: scaledTextureWidth = 720.0, scaledTextureHeight = 1280.0
10-03 22:07:40.206 2185 2185 D CAM_UI : mSurfaceTextureUncroppedWidth=720.0mSurfaceTextureUncroppedHeight=1280.0
10-03 22:07:40.206 2185 2185 I CAM_PhotoModule: Using preview width = 1280& height = 720
10-03 22:07:40.206 2185 2185 D CAM_UI : setAspectRatio() ratio[1.7777778] mAspectRatio[1.7777778]
10-03 22:07:40.209 2185 2185 V CAM_UI : setTransformMatrix: scaledTextureWidth = 720.0, scaledTextureHeight = 1280.0
10-03 22:07:40.211 224 1055 E QualcommCamera: Qint android::send_command(camera_device*, int32_t, int32_t, int32_t): E
10-03 22:07:40.213 212 6592 D SensorListener: void android::SensorListener::enableSensor(android::SensorListener::sensor_type_t): SensorEventQueue enableSensor(TYPE_DISPLAY_ROTATE)
10-03 22:07:40.215 212 6708 D SensorListener: int android::sensor_events_listener(int, int, void*): SensorEventQueue TYPE_DISPLAY_ROTATE read(vector.x=0), orient=90
10-03 22:07:40.231 212 6698 E mm-camera: drscene_detect_thread cameraID=1, hdr_sensitivity=0, ghost_sensitivity=2, luminance_stability=0
10-03 22:07:40.247 224 6693 E QualcommCamera: Qvoid android::disable_msg_type(camera_device*, int32_t): E
10-03 22:07:40.269 207 326 E BufferQueueProducer: [SurfaceView] dequeueBuffer: min undequeued buffer count (1) exceeded (dequeued=7 undequeued=0)
10-03 22:07:40.270 2185 2185 V CAM_UI : surfaceChanged: width =720, height = 1280
10-03 22:07:40.271 224 6693 E QCameraHWI_Preview: processPreviewFrameWithDisplay: error in dequeue_buffer, enqueue_buffer idx = 0, no free buffer now
10-03 22:07:40.272 2185 2185 V CAM_UI : setTransformMatrix: scaledTextureWidth = 720.0, scaledTextureHeight = 1280.0
10-03 22:07:42.419 224 771 D ALSADevice: standby: handle 0xb5f8f7e0 h 0x0
10-03 22:07:42.492 224 771 D alsa_ucm: snd_use_case_set(): uc_mgr 0xb3198540 identifier _verb value Inactive
10-03 22:07:42.492 224 771 D alsa_ucm: Set mixer controls for HiFi LowlatencySpeaker enable 0
10-03 22:07:42.492 224 771 D alsa_ucm: Setting mixer control: MI2S_RX Audio Mixer MultiMedia5, value: 0
10-03 22:07:42.492 224 771 D alsa_ucm: snd_use_case_set(): uc_mgr 0xb3198540 identifier _disdev value Speaker
10-03 22:07:42.492 224 771 D alsa_ucm: Set mixer controls for Speaker enable 0
10-03 22:07:53.165 730 833 D WifiConfigStore: Retrieve network priorities after PNO.
10-03 22:07:54.433 222 377 I MDMCTBK : NetlinkHandler, power_supply subsys
10-03 22:07:54.433 222 377 I MDMCTBK : NetlinkHandler, usbChargerStateChanged
10-03 22:07:54.433 222 377 I MDMCTBK : checkDefaultInst, current pid is = 222
10-03 22:07:54.433 222 377 I MDMCTBK : checkDefaultInst, pid match
10-03 22:07:54.433 222 377 I MDMCTBK : MdmCutbackHndler,readFromFile = /sys/class/power_supply/usb/online
10-03 22:07:54.433 222 377 I MDMCTBK : MdmCutbackHndler,readFromFile = /sys/class/power_supply/pm8921-dc/online
10-03 22:08:08.174 730 833 D WifiConfigStore: Retrieve network priorities after PNO.
10-03 22:08:23.184 730 833 D WifiConfigStore: Retrieve network priorities after PNO.
10-03 22:08:38.194 730 833 D WifiConfigStore: Retrieve network priorities after PNO.
10-03 22:08:53.205 730 833 D WifiConfigStore: Retrieve network priorities after PNO.
10-03 22:08:54.613 222 377 I MDMCTBK : NetlinkHandler, power_supply subsys
10-03 22:08:54.613 222 377 I MDMCTBK : NetlinkHandler, usbChargerStateChanged
10-03 22:08:54.613 222 377 I MDMCTBK : checkDefaultInst, current pid is = 222
10-03 22:08:54.613 222 377 I MDMCTBK : checkDefaultInst, pid match
10-03 22:08:54.613 222 377 I MDMCTBK : MdmCutbackHndler,readFromFile = /sys/class/power_supply/usb/online
10-03 22:08:54.613 222 377 I MDMCTBK : MdmCutbackHndler,readFromFile = /sys/class/power_supply/pm8921-dc/online

```