inguin / moneybalance

Android-based calculator for tracking and balancing expenses
Other
33 stars 15 forks source link

retrieve moneybalance data from broken phone #11

Closed Jakoburg closed 8 years ago

Jakoburg commented 8 years ago

Hi.

We used this app which I really like a lot for our last trip. Since shortly after, my phone shows a software problem, which prevents me from opening the app to check our final balance. Also I did not export to .cvs before my phone broke. I managed to download the data from the phone's internal storage and from the sd card though. On the latter I could not find anything related to the app, on the internal storage, there was a folder with exported cvs files from older trips, but I did not find anything else. My question is, if there is any possibility to get the data back from some database files or so?

Thanks a lot, for the great app aswell as for any advice regarding my problem! Jakoburg

inguin commented 8 years ago

Hi,

the data is kept in an SQLite3 database in the app's private directory at /data/data/ivl.android.moneybalance/databases/moneybalance.db. Unless your phone is rooted the system will only allow the app to read that data.

So, how broken is your phone anyway? Can you still boot the system? Can you enable USB debugging? In that case you could use the "adb backup" feature to download the app's data. Then you could either extract the backup to get the database file, or you could simply restore the backup on a working phone to access your data normally in the app.

The command line for backing up the app is:

adb backup -f moneybalance.ab ivl.android.moneybalance

The backup will be written to a file called moneybalance.ab. You can restore it to another phone with "adb restore moneybalance.ab".

Regards, Ingo

Jakoburg commented 8 years ago

Hi,

thank you a lot for your advice. The way my old phone is broken is, that after booting up, I can give my password, but after that I can not do much, because essential processes are constantly crashing, showing a corresponding message. For the most part, I am confronted with the message "Trebuchet" wurde beendet. (T. has been cancelled). If I try to open an app or try to open the settings, another message is shown and I am back at the start screen. This way, I can not enter debugging mode :/ I managed somehow to download most of the files from the phone that I get access to when connecting the phone normally to my computer. But in there, I do not find anything like /data or so.

Do you have another suggestion to try? Thanks a lot. Regards, Jakob

inguin commented 8 years ago

Gee, that sounds bad! With regular USB access you won't be able to access the device's internal file system, so you can't download the data that way. And without the settings app I don't think there's any way to enable USB debugging or backup your application data to Google servers.

Is your bootloader unlocked? In that case you could try to download the data with a recovery image like ClockworkMod or TeamWin Recovery.

aryoda commented 2 years ago

To directly download the sqlite3 database file you can use adb with root rights (I cannot describe to set this up - just g**gle for it please):

adb root
adb pull /data/data/ivl.android.moneybalance/databases/moneybalance.db

No you have the DB file itself and use a DB browser to look at the raw data (or push it back onto a new device via adb push

Verified with MoneyBalance V1.4 (from June 2021) on LineageOS.

PS: You can use the sqlitebrowser tool to look into the DB tables...