I have a system that runs a custom kiosk application 24/7 (as Device Owner).
There is one big problem: Every few days the Android System WebView seems to update on its own, even though there is not even a Google Account set up (so there should not be any updates happening through Play Store), even when I manually installed the desired WebView version via ADB, and even though all options I could find related to updating anything are disabled.
The problem is that this crashes my kiosk application (I can see in logcat that it gets forcefully killed because of this update), which is already bad enough, but it then leaves the system in a broken state because my app uses lock task mode, and that lock task mode does not get disabled when the app is killed, and when my app tries to enable lock task again or disable it again, things go, south the app hangs or crashes. But even worse – sometimes my app (which is also registered as launcher) restarts and kinda works but fails to launch other apps (such as the payment processor), but more often it just hangs the entire system then, so badly that I can’t even open the power menu to reboot the system. It appears that this happens when the app crashes due to the update and there is no other app open “below” it and the lock task is still enabled. This happens on different devices and even different Android versions so I don’t think it’s a problem with a specific device model.
Of course this is pretty bad, as customers are left with a broken device then, and I can’t have users restart the devices every week because of that… it doesn’t look professional.
Since I don’t want this to happen and in fact I don’t even want the WebView to update at all except when I say so because it could also affect the code running in the application (after all, it suddenly runs under a new, not-yet-tested version of the rendering engine!), I am looking for a way to disable this automatic update, but I was unable to find any solution so far. I was thinking of installing another, third-party WebView of some kind, which hopefully won’t automagically get updates then, but it seems most of the alternatives are no longer maintained or simply don’t work (I’m getting an error trying to install the APK).
Note that I can’t do anything that would require root access because the payment processor app would then no longer work (they require a “secure” environment with no root, with SafetyNet OK and developer mode disabled).
Any ideas?