Skip to content

tools: immediately trigger a camera HAL crash on container stop

On some devices with certain chipset (in particular QCOM), the camera HAL cannot cope with Waydroid container getting stopped. The HAL process will crash as soon as something tries to use the camera, and the connect will fail.

The good thing is after it crash, Android init (in Halium container) will restart it back up. So we preemptively connect to camera on stop to trigger a crash (and restart), so that the next (real) user of camera doesn't encounter this. That said, the HAL restart does take some time, so if the next user starts up right after this happen, it might still encounter failure.

Bug: ubports/porting/reference-device-ports/android11/fairphone-4/fairphone-fp4#67

Merge request reports