Use an online tool like the PvZ2 Gardendless Save Editor or a desktop application like PopStudio to modify the values.
Restore years of progress if a device failure occurs and no official backup was available. How to Use a PvZ 2 Save Editor
Keep in mind that using a save editor may violate the game's terms of service or user agreement. Proceed with caution and at your own risk.
– Load the file, tweak values (e.g., set gems=999999 ), save.
Popular examples: , PP.DAT Editor , Zelda’s PVZ2 Save Editor .