1

I'm working on an app which stores sensitive data with encrypted shared preferences. I came across some questions regarding that if it is possible to be accessed from another app. Some of the answers stated that to prevent SharedPreferences from being accessed from another app it needs to be in MODE_PRIVATE (which is the default one) and the app overall to not contain the same signing credentials from another app. Unfortunately I couldn't find in the official documentation official statement regarding these cases.

So I wanna ask, is encrypted shared preferences enough secure in order to prevent from being accessed from another app moreover via rooted device? If not what are the possible solution?

1 Answers1

0

I had the same question few years back, so, I tried it and saved the shared preferences in one app and tried to open them in another app, but even after a lots of different tries I was not able to open them. So yes Encrypted Shared Preferences are secure enough not to be opened by any other app. Until and unless I used the MODE_WORLD_READABLE or MODE_WORLD_WRITEABLE

EDIT


My device is rooted as well for some reasons.
Junaid Khalid
  • 811
  • 2
  • 11
  • 26