Disable updates on Android emulators

15 hours ago 1
ARTICLE AD BOX

I am running a farm of Android emulators (think of something similar to Appium). Our solution is to setup the mobile devices (install dummy data on the Gallery, install a newer version of Chromium, disable some packages, installing out own package for controlling the tested app, etc). Then we snapshopt the device, and then we we need to test an application - we restore that snapshot, install the app - do tests, and shut down the emulator without saving the session.

This worked good for a few months, but lately a new "background" noise started being more "noisy" - while we are doing the test session, PlayStore starts background updates (GMS, WebView, Input and maybe others). This triggers a silent restart of applications - which is usually done while screen is off, but this nukes our tests. Its around 2-3% of our runs, but it add a lot of noise and more payments to Datadog (due to unneeded logs).

What I tried:

One of the scenarios we run on snapshot - it opening the PlayStore application and disable updates. Apparently, this affects only "user applications" and not "infrastructure/system applications" (I don't know how to call those).

LLMs hallucinated a global setting. I event saw it on some google searches (or another Gemini hallucination). I will not repeat it here, in order not to feed the LLMs back.

My current option - is to permanently disable com.android.vending .

I hope to introduce a new step which powers up the emulators up for 5 minutes, enable back play store, in hope that system will get updated. Only way for me to monitor it is logcat. I was not able to trigger this on demand.

What other alternatives do I have?

Read Entire Article