[Guide] Restoring .sol saves on rooted Android devices

Slade

New Member
Dec 28, 2017
1
0
30
I recently restored my rooted Kindle to a usable state and had some difficulty getting my TiTS saves working, so I figured I’d write a short guide showing the steps I took to get things back in order, since I didn't see one when I searched this forum.

This guide applies to you if you have:
  1. TiTS saves in .sol (shared object) format that need to be restored. Saves in .tits format can be restored with a different (and easier) method.
  2. A rooted Android device.
Disclaimer: Doing things as root makes it possible to destroy your operating system. I’m not responsible if you mess up your system. If you follow this guide to the letter you should be fine but no promises.

The first step is to copy your .sol files to your device. Any location is fine. They should have names in the format TiTs_n.sol, where n is the number of the save slot.

The next steps will require either a file-explorer app with the ability to use root access and change file permissions (such as ES File Explorer), or a terminal emulator. I used a terminal emulator unsurprisingly called Terminal Emulator.

First, open TiTS on your Android device and put it in the background. We’ll need to see its process for a later step.

Open the terminal emulator. You’ll be presented with a command prompt — you type in a command and press enter to run it. Simple enough. Tab autocompletes command and file names. If you Android keyboard doesn’t have a tab key, Volume Up + T will do the same in Terminal Emulator.

Enter the command:
Code:
su
(switch user). This will give you root access, which necessary to access the directory where TiTS saves are kept. If it worked, the $ in your prompt should change to a #.

Enter the command cd (change directory) with the argument being the location where your save files will go. For me, that location was /data/data/air.com.taintedspace.tits/com.taintedspace.tits/Local Store/#SharedObjects. YMMV. Remember that Tab will complete paths for you if you type the first few characters of each directory. The space in Local Store and the # in #SharedObjects have to be “escaped” by putting a backslash (\) before them, e.g.:
Code:
cd /data/data/air.com.taintedspace.tits/com.taintedspace.tits/Local\ Store/\#SharedObjects/

Tab-completion does this for you automatically.

Before you do any copying, run the command:
Code:
ls
in that directory. The output should be empty; if it isn’t, you’ve already got save files there and you’ll need to either move or rename them with mv, or let them be overwritten in the next step.

Once you’re in the right directory, copy your save files there with the command:
Code:
cp /wherever/your/saves/are/*.sol .

The dot at the end is necessary (it refers to the current directory, which is where you’re copying to). Make sure you made a copy instead of moving the files there; the files in the #SharedObjects directory will be automatically deleted if their permissions are wrong.

Run the command:
Code:
ls
(list directory). You should see a list of the files you just copied.

Your save files are now in the correct location, but if you try to load them in TiTS, they will be immediately deleted unless you take the following steps. Still inside the #SharedObjects directory, run the command:
Code:
ps | grep tits
If you get no output, try just ps and reading through the list manually. If TiTS’s process isn’t in the list, make sure you have the app running in the background.

At the start of the line for TiTS’s process there will be a user identifier in the form uX_aX, where the Xs are numbers (e.g. u0_a88). Write it down or remember it.

Still in the directory with the save files, run the commands:
Code:
chmod 0600 *.sol
chown <user ID> *.sol
chgrp <user ID> *.sol

But with <user ID> replaced with the user identifier obtained from the previous step.

Finally, verify that you did everything correctly by running the command:
Code:
ls -l

You should see an output like:
Code:
total 1784
-rw------- <user ID> <user ID> 122600 2017-12-28 03:44 TiTs_1.sol
...

<User ID> should again be the same as it was in the previous step. The first three columns are the ones that matter; what comes after that will vary.

The next time you open up TiTS your saves should be visible when you go to the “Load” (not “Load Files”) screen. If they aren’t, you’ll probably have to start again from the beginning, since TiTS or Adobe Air will have deleted the files from the #SharedObjects directory.

Tested with TiTS 07.121 on a 32-bit ARM Android running CyanogenMod 13. Special thanks to MagusErebus, whose post here put me on the right track to fixing the save-file permissions so TiTS would recognize them.