Even after cleaning out the app_webview/BrowserMetrics’ folder in my K-9 E-mail client (see: Tracking down Android storage space hogs), I found that the free space on my phone once again dropped precipitously to about 300 MB. Consequently, I decided to dig a little deeper into just what BrowserMetrics was all about.
In the previous post, I had noted that a bug report had been launched on GitHub specific to K-9.
Subsequent comments on this posting suggested that the problem was related to the implementation of WebView and that this might be solved by switching to Bromite. In starting to research Bromite, I then cam across a bug report on GitLab that indicated that the problem was not restricted to K-9 but, in fact, many other apps that used WebView were also eating up disk space.
Checking my phone using the DiskMap function in X-Plore File Manager showed this to be the case, where several of the installed apps had BrowserMetric folders with sizes of several hundred megabytes. Deleting the contents of these folders once again produced lots of free space on my phone but, clearly, a more permanent solution was required.
A comment to the post on GitLab’s forum noted that “This will be resolved by any builds dated 20201227 or later…” where this was referring to builds of the LineageOS custom ROM which is the basis for the currently-installed Android Pie OS on my phone.
For more than a year I have been using a custom-ROM developed by MSe1969 on the XDA Developers’ forum. For simplicity, I opted to use MSe1969’s standard build rather than the security- hardened microG build. The basis for the custom-ROM has been switched from Android 7 (Nougat) to, most recently, Android 9 (Pie), and now a further change is to occur where, with the implementation of Android 10, the standard build will be dropped and development continued only on the microG build.
The reason for this is that LineageOS, which dropped development of builds for the Moto G3 some time ago, has now re-established this as a supported platform with effect from the release of LineageOS 17.1. So, rather than duplicate the efforts of the LineageOS team, for now at least, MSe1969 has opted to have them develop the standard build of Android 10.
However, he was good enough to provide a transitional build to allow users to switch from LineageOS 16.0 to LineageOS 17.1, at which point one of the nightly builds of 17.1 could be installed to create a (hopefully) stable platform.
I have now gone through this process and installed lineage-17.1-20210101-nightly-osprey-signed.zip, the build for January 1, 2021. Since this release accommodates the “…20201227 or later…” timeline noted above for fixing the WebView issue, I’m hoping that this will indeed be the case.
References:
Webview’s BrowserMetrics should be regularly cleaned by K-9 #5061
https://github.com/k9mail/k-9/issues/5061
WebView produces a lot of garbage in cache
https://gitlab.com/LineageOS/issues/android/-/issues/2820
“This will be resolved by any builds dated 20201227 or later by…” https://review.lineageos.org/c/LineageOS/android_external_chromium-webview/+/298862
A Stable Custom ROM for the Moto G3
https://linuxnorth.wordpress.com/2019/08/27/a-stable-custom-rom-for-the-moto-g3/
[ROM][Unofficial][9.0.0][signed]LineageOS 16.0 for Osprey
https://forum.xda-developers.com/t/rom-unofficial-9-0-0-signed-lineageos-16-0-for-osprey.4095453/
LineageOS Android Distribution
https://lineageos.org