gurrhack / NetHack-Android

Android port of NetHack
128 stars 23 forks source link

A way to backup highscores when changing device etc.. #22

Open joeljpa opened 8 years ago

joeljpa commented 8 years ago

It would be nice if there was a way to do this when switching devices, formating SD card etc. Possibly by being able to "export-import" one's score,

gurrhack commented 8 years ago

You can make a copy of the files manually. They are located under: Android/data/com.tbd.NetHack/ But I agree it could be made easier, so I'll leave this open.

joeljpa commented 4 years ago

Update: I just tried adb backup, and found it doesn't work. I suspected it wouldn't when the generated file was < 1 mb.

adb backup -f ~/adb_app_backups/com.tbd.NetHack com.tbd.NetHack adb restore ~/adb_app_backups/com.tbd.NetHack

This has been a handy dandy method of saving not just my highscores but the entire app data including customisations for the DCSS port and the newer Angband port. I've been able to restore my highscores, settings numerous times when I switched devices or flashed roms over the years.

Will it be that enabling adb to work might be way easier than manually backup/restore feature?

Enabling it would also help this issue since the app settings get backed up and I was hoping for that too while trying adb. #56

joeljpa commented 4 years ago

Okay I've just tried doing the old vanilla way of backing up the app folder via adb and restoring that. It works, my highscores are back as well as my game/keyboard settings, relevant for issue #56 .

So I did (note as per your device the directory might differ a little, so check that up first), adb pull /storage/self/primary/Android/data/com.tbd.NetHack/ Some/Directory/At/Your/Computer/com.tbd.NetHack/ Installed fresh on my other device then adb to it: adb push Some/Directory/At/Your/Computer/com.tbd.NetHack/* /sdcard/Android/data/com.tbd.NetHack/

BlueDrink9 commented 4 years ago

Thanks for this comment. I wish I'd done this before changing to a github release apk. I've lost a big save.

Also, currently no data gets saved when transferring to a new device. It really would be great to get saves and settings included in google's backup.

y2kate commented 1 year ago

For those on 3.6.6-2 switching from the Google Play version. I had to push my save from the base com.tbd.NetHack directory into the new files/save directory. Though I don't think that saves are compatible since I got a version mismatch error. Lost my most promising game yet :/

joeljpa commented 6 months ago

In case this is of help to anyone.

At the time I used this app, it stored the save file, nethackrc and highscore file in a folder in your SD card. I merely had to copy that onto my computer as a backup. On a new phone, put that back folder and you're good to go.

Recently I even resumed playing the latest version of the game on my computer. All I had to do was copy the nethackrc and highscore file. My highscore list is thus preserved since 2016 :).