dzieciou
dzieciou

Reputation: 4514

Emulator time syncs to the time of the host

We're observing strange behavior of an emulator. I am not sure if this is a problem of emulator itself or container setup.

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

We haven't seen such behavior on a real phone.

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

Upvotes: 0

Views: 194

Answers (1)

Kdaydin
Kdaydin

Reputation: 455

Try to disable "set time automatically" and "set timezone automatically" from the date time settings.

Upvotes: 1

Related Questions