Reinstalling app on Samsung phone corrupts localstorage

I’m not sure what’s going on, but when I reinstall my app on my OnePlus 5T, everything works as expected.

However, reinstalling it on a Samsung M30s seems to mess up the localstorage somehow. Even if go in to Settings > Apps and delete the app’s cache and storage before I uninstall the app, it does not recreate a fresh database when I reinstall the app.
Instead, it loads some very old data from somewhere (I don’t know from where since I delete both the cache + storage), leaving the data completely broken. I have even tried rebooting the phone between uninstall in install, to no avail.

After a lot of searching I’ve found that the only way to force the Samsung phone to do a fresh install is to modify AndroidManifest.xml, with the following lines:


However, I do want a backup in general, so this is a not a solution (I think).

Before each apk-build I also update the version string in package.json, and versionCode and versionName in build.gradle, but it makes no difference.

It seems some phones behave differently regarding localstorage.
So what’s going on here??

I think I found an explanation here.

I assumed the two properties refer to local backups, but someone in that post mentions Google Drive, which would explain where the old data comes from. I check my G. Drive but couldn’t find anything.

Several people in the thread ask where the data comes from and how to delete it, but there are no answers.

Anyone knows?

EDIT: found the full explanation here.
I won’t delete this thread, in case it’s useful for someone else in the future (unless the mods want to delete it, of course).