I have an existing app on the app stores that I created forever ago with a different platform. Now, I am creating a brand new version of the app and need to be able to use the data stored in that file.
The database in Android is stored at file:///data/data/PACKAGENAME/databases/MYDB
When I use the Filesystem plugin, it tells me the file does not exist. I’ve tried tweaking the path and doing the database name with and w/o extensions.
const contents = await Filesystem.readFile({
path: 'file:///data/data/PACKAGENAME/databases/MYDB'
});
I’m certain the path is correct because the old/existing app has backup option where I simply take that file and upload it somewhere. I then use the same path to replace it on restore.
I’ve spent way too many hours trying to find this file from within Ionic. Is this even possible?
*I should note that I’m testing this on the emulator by installing the original app and making sure I have data in it, then pushing the new app to the same emulator to replace the original - as it would work if my users were upgrading the app from the store. (I would test this on my actual phone but the backup service is no longer working and I can’t risk losing my data)