google/android-emulator-container-scripts

Emulator time syncs to the time of the host

m-gawinecki opened this issue · 0 comments

We're observing strange behavior of an emulator. I am not sure if this is a limitation of Android emulator itself or the docker image. We haven't seen such behavior on a real phone.

It looks like the date of the emulator syncs after some time to the time of the host

# adb shell date
Thu Nov 17 14:06:10 UTC 2022
# adb shell "date 060815102022.47"
Wed Jun  8 15:10:47 UTC 2022
# adb shell date
Thu Nov 17 14:10:03 UTC 2022

Why does it happens and how can we work around it?

The way we setup the container:

DOCKER_IMAGE=us-docker.pkg.dev/android-emulator-268719/images/r-google-x64:30.0.23
docker run -d -e "ADBKEY=$(cat ~/.android/adbkey)" --device /dev/kvm -p $ADB_HOST_PORT:5555/tcp $DOCKER_IMAGE