Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question How to Encrypt global-metadata.dat on Android?

Discussion in 'Editor & General Support' started by Prince_of_Persia, Jun 19, 2023.

  1. Prince_of_Persia

    Prince_of_Persia

    Joined:
    Oct 20, 2012
    Posts:
    54
    Hi :)

    I am looking for help on what are the steps to encrypt global-metadata.dat on Android Target platform. IL2CPP builds contain a global-metadata.dat file that can be used by some hacking tools to aid crackers in cracking process! I have seen that some games try to encrypt global-metadata.dat file and thus making it harder for crackers but I could not find any information on how they do it.
    I am aware that this is not the ultimate soloution but for my case it may be enough to stop baby-crackers using tools to crack our game.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,762
    If you're concerned about the user 'hacking your save files,' or 'cheating in your game,' which is playing on their computer, just don't be.

    There's nothing you can do about it. Nothing is secure, it is not your computer, it is the user's computer.

    If it must be secure, store it on your own server and have the user connect to download it.

    Anything else is a waste of your time and the only person you're going to inconvenience is yourself when you're debugging the game and you have savegame errors. Work on your game instead.

    Remember, it only takes one 12-year-old in Finland to write a script to read/write your game files and everybody else can now use that script. Read about Cheat Engine to see more ways you cannot possibly control this.
     
    Ruslank100 likes this.
  3. Prince_of_Persia

    Prince_of_Persia

    Joined:
    Oct 20, 2012
    Posts:
    54
    Thanks for your reply. Yes I am well aware of the concepts and that we can not stop them when it is an offline game. But currently I am looking for ways to encrypt global-metadata.dat so that pre-made tools are unable to aid the cheater.
     
  4. Rugbug_Redfern

    Rugbug_Redfern

    Joined:
    Jun 2, 2017
    Posts:
    20
    Yes it's not going to stop everyone. But to prevent hacking, you introduce more and more obstacles in order to block people out. Someone's going to get through, but you don't want to leave the gates wide open for everyone to run in. It's much easier to deal with one hacker than hundreds.

    Games already do this! Genshin Impact obfuscates global-metadata.dat. I'm also interested in this, but I don't think we'll ever get a real response. Everyone is too quick to jump on the "why bother" train than actually being helpful.
     
  5. zrbnywkmcozxyo

    zrbnywkmcozxyo

    Joined:
    Aug 11, 2023
    Posts:
    1
    Maybe this will help
     
    Dfnutnu likes this.
  6. Dfnutnu

    Dfnutnu

    Joined:
    Oct 10, 2023
    Posts:
    3
    thanks