budtmo / docker-android

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

[🚀 Feature Request ]: Document how to persist user data #410

Closed fsackur closed 5 months ago

fsackur commented 7 months ago

Idea

Document how to persist user data across restarts, OR, add volumes to the Dockerfile so this is the default behaviour

Probelm to solve

I spent a long time trying to understand how to make my installed app persist across restarts. Each time I got a brand new virtual android device.

When I mounted /home/androidusr/emulator, the device got stuck on BOOTING and there was no display in VNC. avdmanager list avd showed no AVDs.

It is necessary to mount /home/androidusr/emulator and also /home/.android/avd. Then everything works as expected.

I would like to add a section to the README, like:

to persist user data, mount these volumes:

docker run -v emulator:/home/androidusr/emulator -v avd:/home/.android/avd docker-android

I'll also include some detail about UID 1300.

Alternatively, we could add VOLUME declarations to the Dockerfile. But that would change the default behaviour. I think that persistence is the expected behaviour, though?

Additional Note

No response

bernatvadell commented 6 months ago

take a look: https://github.com/budtmo/docker-android/issues/395#issuecomment-2040219000

fsackur commented 5 months ago

I offer a small PR, if you think it might help?

Not sure how I didn't find #395 - I did search the issues before creating one, honest!

Either way, I suggest we close this in favour of 395.