budtmo / docker-android

Android in docker solution with noVNC supported and video recording
Other
8.91k stars 1.21k forks source link

Installing app on the emulator and restarting the container makes the emulator crashes #311

Open jay0129 opened 2 years ago

jay0129 commented 2 years ago

🐛 Bug Report

Operating System:

CentOS 7

Docker Image: budtmo/docker-android-x86-12.0

Docker Version:
Docker version 19.03.3, build a872fc2f86

Docker Command to start docker-android:
docker run --privileged -d -p 8055:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S10" --name emulator-container-monkey-5555 budtmo/docker-android-x86-12.0

What I did:

  1. docker stop emulator-container-monkey-5555
  2. Install app on the emulator
  3. docker start emulator-container-monkey-5555

Expected Behavior

Emulator should show up with app installed

Actual Behavior

Emulator is missing at noVNC viewer. Possibly the emulator is crashed. image

Additional Note

If I don't install app and just web browse via chrome, after restarting the container, the emulator shows up and the browser history remains still.

My Question here is do I need to attach volume? If so, could anyone tell me which directory I should mount?

leninweblb commented 2 years ago

I don't know if it's an issue, but sometimes when you restart the container, some lock files are not deleted and on the next boot it fails to start the emulator. Run this inside the container: rm /root/android_emulator/hardware-qemu.ini.lock /root/android_emulator/multiinstance.lock After this restart the container, you'll see the container will be healtlhy again.