I made a very personal application a while ago, which only 2 of us use (my wife and I).
In this application, I use a room DB.
This application is on the Google Store. And it is installed on my smartphone from the Google store.
I had implemented a remote backup/restore functionality from the database room, to my Apache/php server. But it's a feature we rarely use. Today I realize that it no longer works, but I can't figure out why. I guess it's a bug related to my data in the database.
But if I install the dev version to have the log in android studio, I necessarily lose access to my database (since the installation does not have the same origin I suppose), and everything works correctly, so impossible to find the bug. Same if I run the app in an emulator.
My question is therefore: how to recover my database and use it with the dev version of Android Studio, knowing that it is precisely my backup function that does not work and that I absolutely do not want to lose my data.
Edit:
In other words, I need to explore this database to see what anomaly it causes. The solution is really not to reset it but to explore it. Do you see a solution?
With android an App's data (which includes the database(s)) is protected which is the fundamental issue that you are facing.
An option would to be root the smart phone in which case you could then access the App's
data/data/<the_package_name>/database folderand copy the database file(s) somewhere.Another option would be to develop and then install a version of the App that allows the database file(s) to be copied to an unprotected destination somewhere.
-journal) this can be used to rollback the changes. Importantly without this file only the ability to rollback is lost.In either case you could then copy the file(s) into the development App's
data/data/<<the_package_name>/databasefolder (using Device Explorer) and that database would then be available.Alternately in either case, it may useful to utilise an SQLite tool to ascertain the issue (if the issue is purely an SQLite issue and not the UI).
If taking the 2nd option then this could be a feature of the App which if kept would allow future debugging of the database.