mirror of
https://github.com/budtmo/docker-android.git
synced 2026-04-25 20:25:57 +03:00
[GH-ISSUE #170] Saving emulator state only works when device is a Samsung #122
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/docker-android#122
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rbaron on GitHub (Jul 8, 2019).
Original GitHub issue: https://github.com/budtmo/docker-android/issues/170
🐛 Bug Report
Operating System:
Linux - (Ubuntu 18.04.2 LTS @ digitalocean)
Docker Image:
budtmo/docker-android-x86-8.0(but should affect all)Docker Version:
18.09.6, build 481bc77Docker-compose version (Only if you use it):
N/A.
Docker Command to start docker-android:
docker run -v $(pwd)/android_emulator_local_backup/.android:/root/.android -v $(pwd)/android_emulator_local_backup/android_emulator:/root/android_emulator -d --rm --privileged -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Nexus 5" -e EMULATOR_ARGS="-camera-back webcam0 -camera-front emulated" --name android-container budtmo/docker-android-x86-8.0Expected Behavior
When running the docker container a second time (with quick boot enable and with volumes for
/root/.android,/root/android_emulator), I expected that the previous emulator state (snapshot) would be used, so that the emulator would boot up faster.Actual Behavior
The emulator seems to be destroyed and rebuilt every time. This causes the state to be lost and the boot process to take a longer time.
Preliminary investigation
It seems like the origin of this bug is this line, which explicitly check if the device name has
samsungin it, and conditionally symlinks the config to/root/.android/devices.xml.Then, whenever the container boots, there is a check for the existence of this symlink:
This condition is then used to either boot an existing device or wipe any data and boot up a new one (source).
If I didn't miss any reason for this special treatment and removing the check for
samsungsounds like a good fix, I'm happy to submit a pull request.@trinhpham commented on GitHub (Jul 11, 2019):
Agreed, @rbaron .
The code should check the created avd instead of that customized file.
You have my vote for a PR already :)
@trinhpham commented on GitHub (Jul 11, 2019):
I still wonder if we can pre-initialize the emulator in the docker image to have a faster boot time.
Please share if you have an idea