Editing Slay the Spire Unlocks on Android (No Root)
How to get around locked save folders on newer Android versions using Shizuku.
preferences folder is locked to the game itself. File managers
show it as empty, and even a Shizuku shell gets "Permission denied." You can't read or edit the existing files
without root. You can replace the folder with one you own, but your current stats and ascension progress
don't carry over.
What you need
- Shizuku, installed and running
- aShell (or any terminal app that runs through Shizuku), with Shizuku permission granted
aShell only takes one line at a time, so every command here is a single line. Copy it, paste it and press Enter.
1 Check whether your folder is locked
Save data lives in Android/data/com.humble.SlayTheSpire/files/. The saves folder only
holds a run that's in progress, so it's normally empty. Unlocks and stats are in preferences.
ls -ld /sdcard/Android/data/com.humble.SlayTheSpire/files/preferences
If the output starts with drwx--S--- (or drwx------), only the game can open the
folder. Shizuku's shell user is shut out, which is why file managers show it as empty.
2 Swap in a folder you own
This moves the old folder aside, without deleting it, and creates a new one that you can read and write.
am force-stop com.humble.SlayTheSpire; cd /sdcard/Android/data/com.humble.SlayTheSpire/files && mv
preferences preferences.bak && mkdir preferences && chmod 777 preferences && echo '{"The
Silent":"2","GUARDIAN":"2","Defect":"2","Watcher":"2"}' > preferences/STSUnlocks
The STSUnlocks line unlocks all four characters.
3 Launch the game
Open Slay the Spire. All four characters should be available. The game creates its other preference files in the
new folder, but those files are locked to the game too. Only STSUnlocks, the file you created
yourself, can be read or copied out.
4 Make the game's files readable
You own the new folder, so you can move the game's locked files out of the way and put empty files you own in
their place. If the game writes into an existing file instead of replacing it, the file stays yours and you can
read it. This all-in-one line force-stops the game, moves the locked files into prefs-game-copies,
creates the empty replacements, and lists the result:
am force-stop com.humble.SlayTheSpire; cd /sdcard/Android/data/com.humble.SlayTheSpire/files/preferences
&& mkdir -p ../prefs-game-copies && for f in *; do [ "$f" = STSUnlocks ] && continue; mv
"$f" "../prefs-game-copies/$f"; echo '{}' > "$f"; chmod 666 "$f"; done; ls -la
Before you launch the game, the list should show every file owned by shell, with
-rw-rw-rw- permissions and a size of 3 bytes (just the {} placeholder):
-rw-rw-rw- 1 shell shell 3 ... STSAchievements
-rw-rw-rw- 1 shell shell 3 ... STSDataVagabond
-rw-rw-rw- 1 shell shell 3 ... STSPlayer
-rw-rw-rw- 1 shell shell 3 ... STSUnlockProgress
...
-rw-rw---- 1 shell shell 61 ... STSUnlocks
Open the game, play a floor or change a setting, then close it. Check the folder again:
ls -la /sdcard/Android/data/com.humble.SlayTheSpire/files/preferences
The files the game saved to have grown past 3 bytes but are still owned by shell and readable:
-rw-rw-rw- 1 shell shell 326 ... STSGameplaySettings
-rw-rw-rw- 1 shell shell 43 ... STSPlayer
-rw-rw-rw- 1 shell shell 83 ... STSSaveSlots
-rw-rw-rw- 1 shell shell 80 ... STSSeenRelics
-rw-rw-rw- 1 shell shell 42 ... STSSound
If the owner ever goes back to u0_a…, that copy of the game is recreating its files. Run this step
again, or overwrite the file with your own version.
To read a file:
cat /sdcard/Android/data/com.humble.SlayTheSpire/files/preferences/STSUnlockProgress
prefs-game-copies:
am force-stop com.humble.SlayTheSpire; cd /sdcard/Android/data/com.humble.SlayTheSpire/files/preferences
&& for f in ../prefs-game-copies/*; do mv -f "$f" .; done; ls -la
Always force-stop the game before editing anything, so it doesn't overwrite your changes.
preferences.bak, which you still
can't open. They can't be copied, moved or merged into the new folder without root. The new folder starts a fresh
profile, plus whatever you unlock by editing.
5 Undo (go back to your old save)
am force-stop com.humble.SlayTheSpire; cd /sdcard/Android/data/com.humble.SlayTheSpire/files && mv
preferences preferences.test && mv preferences.bak preferences
preferences.bak from the shell either, because removing the files inside it needs
the same access. It's small, so just leave it. Don't use "Clear storage" in Android's app settings or uninstall
the game. Either one deletes both folders.
If it doesn't work
mvsays "Permission denied": your Android version doesn't let the shell rename the folder. Without root, this method won't work.- The game ignores or resets the new folder: run the undo steps to get your old save back.
- You have root: just copy the folder out with
su -c cp -r /data/media/0/Android/data/com.humble.SlayTheSpire/files /sdcard/Download/