[OnePlus 3 Questions & Answers] warking:
I have been using Oreo with OOS since OB26 with my OP3, and I have this camera issue trouble me.

The problem is that the rear camera is missing(I think it's a system configuration issue, not hardware related)

Yesterday, I clean flashed OOS 5.0 on my OP3 and the rear camera got back just after the first boot(that's why I guess it's NOT a hardware related issue). This morning, the rear camera is missing again after I used the phone for a while. I can't find any suspicious apps for now.

Here is the logcat snippet when I tried to switch the cameras in the stock camera app:

11-22 09:08:35.724 5004 5004 V OPCameraActivity: dispatchTouchEvent() - Action=0, x=844.0, y=1756.0

11-22 09:08:35.739 5004 5004 V OPCameraActivity: dispatchTouchEvent() - Action=1, x=844.0, y=1756.0

11-22 09:08:35.740 5004 5004 E OPCameraActivity: switchCamera() - No camera to switch

11-22 09:08:35.740 5004 5004 E CaptureBar: onSwitchCameraButtonClicked() - Fail to switch camera

And here is the logcat snippet when I tried to test the rear camera(I clicked front camera menu item) in the Engineer mode(*#808#):

11-22 09:10:25.925 1300 2751 E ActivityTrigger: activityResumeTrigger: not whiteListedcom.android.engineeringmode/com.android.engineeringmode.autotest.FrontCameraTest/26

11-22 09:10:25.939 16000 16000 E AutoTestItemActivity: AutoTestItemActivity--onCreate

11-22 09:10:25.939 16000 16000 I AutoTestItemActivity: mSoundEffectOn=0

11-22 09:10:25.946 16000 16000 I AutoTestItemActivity: onResume

11-22 09:10:25.948 16000 16000 W System.err: java.lang.RuntimeException: Unknown camera ID

11-22 09:10:25.948 16000 16000 W System.err: at android.hardware.Camera.<init>(Camera.java:722)

11-22 09:10:25.948 16000 16000 W System.err: at android.hardware.Camera.open(Camera.java:523)

11-22 09:10:25.948 16000 16000 W System.err: at com.android.engineeringmode.autotest.CameraPreview.openCamera(CameraPreview.java:69)

11-22 09:10:25.948 16000 16000 W System.err: at com.android.engineeringmode.autotest.CameraPreview.open(CameraPreview.java:188)

11-22 09:10:25.948 16000 16000 W System.err: at com.android.engineeringmode.autotest.FrontCameraTest.onResume(FrontCameraTest.java:56)

11-22 09:10:25.948 16000 16000 W System.err: at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1456)

11-22 09:10:25.948 16000 16000 W System.err: at android.app.Activity.performResume(Activity.java:7102)

11-22 09:10:25.948 16000 16000 W System.err: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3785)

11-22 09:10:25.948 16000 16000 W System.err: at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3857)

11-22 09:10:25.948 16000 16000 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3052)

11-22 09:10:25.948 16000 16000 W System.err: at android.app.ActivityThread.-wrap11(Unknown Source:0)

11-22 09:10:25.948 16000 16000 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1688)

11-22 09:10:25.948 16000 16000 W System.err: at android.os.Handler.dispatchMessage(Handler.java:105)

11-22 09:10:25.948 16000 16000 W System.err: at android.os.Looper.loop(Looper.java:164)

11-22 09:10:25.948 16000 16000 W System.err: at android.app.ActivityThread.main(ActivityThread.java:6809)

11-22 09:10:25.948 16000 16000 W System.err: at java.lang.reflect.Method.invoke(Native Method)

11-22 09:10:25.948 16000 16000 W System.err: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)

11-22 09:10:25.948 16000 16000 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

11-22 09:10:25.951 16000 16000 D AppTracker: App Event: start

11-22 09:10:25.977 16000 16000 I zygote64: Deoptimizing void android.view.ViewRootImpl$SendWindowContentChangedAccessibilityEvent.run() due to JIT inline cache

11-22 09:10:26.023 1300 1675 D DebugKeepScreenOn: Acquiring screen wakelock due to Window{1ca747a u0 com.android.engineeringmode/com.android.engineeringmode.autotest.FrontCameraTest}

11-22 09:10:26.028 1300 1350 I ActivityManager: Displayed com.android.engineeringmode/.autotest.FrontCameraTest: +95ms

11-22 09:10:26.030 579 657 E ANDR-PERF-OPTSHANDLER: perf_lock_rel: updated /sys/class/scsi_host/host0/../../../clkscale_enable with 1

11-22 09:10:26.030 579 657 E ANDR-PERF-OPTSHANDLER: return value 2

11-22 09:10:26.041 1920 2572 D SystemServicesProxy: getRecentTasks: com.android.engineeringmode, 125, false, 0

according to the logcat I guess that something on the camera system configuration is messed up, looks like that there should have been IDs for both front camera and rear camera. but my system can only enumerate one camera(front camera) and there is no ID for the rear camera. Normally I guess that first camera should be the rear camera and the second should be the front camera

How do I need to do to continue the troubleshooting?