I was unable to update/install any apps earlier today, using either Play Store, F-Droid, or Play Store in my work partition, even though I had over 500MB free on my phone (Pixel XL running Android 9.0).
I have 2 theories about why this happened, and I would like to find out more low-level information to try to figure out definitively why it happened. I think it's happened before, as well.
Theory 1 is that the flash memory on the device is being wear-leveled, and some of it has become unusable because it has been written to too many times and is "dead", but for some reason Android, or maybe the underlying Linux kernel, is still reporting the unusable blocks as "free space". So while it looked like I had 500MB free, I really had less.
Theory 2 is that Play Store in my work partition is somehow silently causing installs on my personal partition to fail until it "gets its way" and manages to install the updates it wants to install. (This seems very unlikely to be intentional, if so - there was no warning about this in any of the terms and conditions I signed up to when I created a work partition, to my recollection. Also, it doesn't explain why even 500MB free is not sufficient to install a relatively small update.)
When I freed up even more space (by uninstalling 2 apps in my work partition) Play Store in my work partition was able to update all 5 apps that were due to be updated, when I manually hit update on them. Then F-Droid was able to update apps again. So it looks like I'm good, for the time being... oh wait, I spoke too soon, it's happening again.
The two work apps that were uninstalled then automatically got pushed to my device and reinstalled, which to me casts doubt on the theory that it was about lack of space / unusable space (theory 1).
I uninstalled them again, and now I'm able to install apps again... for now.
Can I get some additional information on what was going on using adb or something like that?
I've already tried
df in termux and it's not showing me anything useful - only one partition's free space is changing. I've read through the wall of text of previous solutions but they either don't seem to be relevant or are not making a lot of sense to me.