Skip to content

Recover saves with recovery binary #58

Open

Description

@BlueDrink9

I mentioned in a comment on another issue that I had lost a save, however it seems all of the BlueDrink9.0 files still exist. Is there a way to recover these using the official nethack recovery binaries?

Activity

  1. BlueDrink9 commented on Jul 27, 2020

    @BlueDrink9
    Author

    I made some progress by copying all the game data directory files to an OS X computer, compiling unnethack on there, binary editing BlueDrink9.0 to remove the save/ before the <uid><playername> at the start of the file, then running the recovery binary I had compiled. However, copying the resultant file back to unnethack's saves directory does nothing; the file is not recognised at startup.
    Renaming the file to use the uid that new saves were generating with did not fix this, but deletes the file that was renamed.

  2. Vahlin commented on Jul 28, 2020

    @Vahlin

    Experiencing a similar issue. Went to boot up my game today, and it had some error messages that I wish I had written down, and had the new character creation screen over top of my game in the background.

    I force closed the app hoping it was just a glitch and would recover. Now when I type my characters name in, I get:

    Checkpointing was not in effect for 1Ansem.0 -- Recovery impossible.

    And the new character creation screen comes up with a black background.

    Super distraught, was by far the furthest I've ever gotten in this game. Many hours lost. Hoping someone knows a way to recover it.

  3. BlueDrink9 commented on Jul 28, 2020

    @BlueDrink9
    Author

    That sounds like it might be a different issue. In my case I don't think the backup files were corrupted at all. But an answer on whether checkpointing is used by gurrhack ports would be nice.

  4. BlueDrink9 commented on Jul 28, 2020

    @BlueDrink9
    Author

    AH! Fixed! It seems that, in my case, renaming the save files to use the new user ID that UnNetHack is using has restored my files.

    Getting this issue answered would probably still be useful from a documentation standpoint, at least, and for similar/future cases, or cases where root access is unavailable.

  5. gurrhack commented on Jul 28, 2020

    @gurrhack
    Owner

    @BlueDrink9 Checkpointing is on by default. You can turn it off with the checkpoint option in defaults.unh. The Android port has the recover utility built-in so you shouldn't have to run it manually like that. What error did you get?

    @Vahlin The "Checkpointing was not in effect" error only happens if the file is corrupt and I doubt it's possible to recover from that. I think it can happen if the nethack process is killed by Android while the game is trying to save its state.

  6. BlueDrink9 commented on Jul 28, 2020

    @BlueDrink9
    Author

    I see. I think that's consistent with what I experienced. How is the user id (prefixed to save files) generated? I think my issue was that it had changed, meaning the checkpoint files weren't recognized by the automatic recovery. After looking at new saves to find the new uid, renaming my checkpoints let recovery recognise and restore them.

  7. gurrhack commented on Jul 28, 2020

    @gurrhack
    Owner

    Newer versions of the nethack port is hard coded to user id 1. The unnethack port uses the real uid as reported by the OS which makes it a bit trickier to copy unnethack saves between phones. I guess it's possible for Android to change the uid between OS updates as well but I haven't experienced that.

  8. Vahlin commented on Jul 28, 2020

    @Vahlin

    @gurrhack thanks for the reply! Sour... Is there anything I can do to avoid that happening in the future?

    Also, unrelated question... I switched to the unnethack port following the save file for NetHack becoming corrupted, but it seems outdated in comparison (mostly small things like for example blessed/uncursed/cursed aren't highlighted in green/yellow/red, etc and I get a notification that the app was designed for an older version of Android and may not work properly). Are there plans to bring the unnethack port up to date?

  9. BlueDrink9 commented on Jul 28, 2020

    @BlueDrink9
    Author

    Newer versions of the nethack port is hard coded to user id 1. The unnethack port uses the real uid as reported by the OS which makes it a bit trickier to copy unnethack saves between phones. I guess it's possible for Android to change the uid between OS updates as well but I haven't experienced that.

    That's bizare, my uid changes every time I install a different unnethack. Is the android containerisation system creating a new user for each app? (Actually yeah, isn't that how they get unique permissions for app folders?)

  10. BlueDrink9 commented on Jul 28, 2020

    @BlueDrink9
    Author

    @Vahlin settings might not be configured right. The play store version had menucolors working for me.

    The app has been updated but not put on the store. The apk is available from the github releases

  11. Vahlin commented on Jul 28, 2020

    @Vahlin

    Oh that's great. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions