[Android] How to check the secret of the application and protect it ?
Prerequisites:
Good to have a rooted device to save much effort and go deeper
How to list the data in SharedReferences ?
- Open Terminal / DOS prompt
- Type “adb shell”
- Type “cd /data/data/<your app package>” // e.g.: com.app.abc
- You can see any or all of the directories:
app_textures, cache, databases, no_backup, app_webview, code_cache, files, shared_prefs - Type “cd shared_prefs”
- You can open any XML file to see what’s the content
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<string name="key">value</string>
</map>
All of the key / value you store via API https://developer.android.com/reference/android/content/SharedPreferences.Editor will be in the file.
How to protect you SharedReferences data ?
- Store key and name which is not understandable, e.g.: <string name=”yke”>evlua</string>