I'm an Android apps developer. I'm trying to address a security concern in one of my apps.
I need to test a scenario in which someone will try to copy the shared prefs file (or files) from one Android device to another in order to have the same state that the original user has and use the app as if he is the original user (hijack his existing sessions for instance).
I tried to copy the shared prefs file from one device to another (where I had installed a fresh copy of the app with an empty shared prefs file). Copied the file from the original device using adb , copied it to the sd card of the target device and move it to the right shared prefs directory using a file management app with root privileges. This didn't work.
When I start the app on the target device - I can see that the shred prefs file get "rolled-back" to its initial form. Maybe Android has some kin of mechanism to prevent manipulation of an app's files/data.
So my question is - how can I test this scenario in other ways? any way to transfer the shares prefs from one device to another ?