Why can't I find any shared preferences?
If an app has no shared preferences, or none with anything interesting in them, it keeps its data another way. Most often that’s an SQLite database, in newer apps sometimes DataStore. Nobody makes a developer use shared preferences.
What shared preferences are
The simplest way for an Android app to save small values: numbers, text, true or false, each under a name. Apps keep things like the time you last opened them there, and games, if you’re lucky, your coins or your highscore. They’re plain XML files in the app’s shared_prefs folder. Now and then an app even stores a username and password in one, unencrypted.
Where else to look
- Databases. SQLite is for many records of the same kind. A chat app keeps one row per message; a game might keep one row per level or per item you own. CheatDroid opens every table, and you can change cells, add rows and delete them.
- DataStore. Google’s newer replacement for shared preferences. Same idea, a binary file instead of XML, and CheatDroid has an editor for it too.
- Files. Some games write their own save format. If it’s text, open it as text; otherwise the hex editor shows it byte by byte.
CheatDroid sorts an app’s files under those headings, so it’s quick to see what an app uses. The full map, folder by folder and engine by engine, is in where Android games keep their save data. If the number you want isn’t in any of them, it may only exist in memory or on a server; the guide covers both.
For developers: protecting your app
Want to keep tools like CheatDroid out of your app’s data? Encrypt what matters, and check anything worth money on your server. You can keep shared preferences and encrypt the values, with the javax.crypto classes or a library such as secure-preferences, which, fittingly, names this app as the reason it exists.