emulator: ERROR: A snapshot operation for 'Nexus_4_API_27' is pending and timeout has expired. Exiting

Open a terminal and execute:

sudo rm ~/.android/avd/your-device/*.lock

This command will remove files like:

  • ~/.android/avd/your-device/hardware-qemu.ini.lock
  • ~/.android/avd/your-device/multiinstance.lock
  • ~/.android/avd/your-device/snapshot.lock.lock

It is caused be the lock file generated by the boot which reside in the folder = .android/avd/{yourDeviceName}.

we can delete by using sudo rm snapshot.lock.lock command.

enter image description here

Then cold booting the device again ,solves the issue.


If you have android studio installed (Obviously) just open the AVD Manager, select the device and choose 'Stop' by using the right click. Then the device will be released.