Tutorial on how to configure the AVD in Android Studio.
- Make sure you are within the
mobile_worldrepo directory and runsudo mobile-world env run --image mobile_world:v1.1 --devwill launch a dev container with the existing AVD image. This dev container will have your localsrcmounted to/app/service/src. - Run
sudo mobile-world env exec mobile_world_env_0_devto enter the dev container. - Run
adb emu avd snapshot load init_stateto load the initial snapshot of the AVD. - Go to the VNC page (you will see the address to this page at step 1) to see the interactive Android Emulator.
- Manually configure the environment (e.g., install apps, push new files, etc.).
- Once you are done:
- first run
adb shell su root date 101612002025.00to set the date to our fixed date (2025-10-16 12:00:00). - run
adb emu avd snapshot save init_stateto overwrite the initial snapshot. This snapshot will be loaded for tasks by default. - run
adb emu killto kill the emulator.
- first run
- Exit the dev container and copy the AVD folder to the
docker/folder viasudo docker cp mobile_world_env_0_dev:/root/.android/avd/Pixel_8_API_34_x86_64.avd docker/. - Compile a new image with the new AVD folder via
sudo docker buildx build -t mobile_world:v1.2 -f docker/Dockerfile ..