My app is based on different roles. For example teacher, parent and so on. So different users will see different activites and have different permissions. And if the device is rooted the SharedPreferences object could be modified.
I save the role from the user in a SharedPreferences object when he logs in(I receive his role from a database query).
He could easily change his role to the teacher for example and have more permissions. He could delete all the data.
After a little research, I found this: How to detect if changes were made in the preferences?
My question now is: Could a hacker avoid detection when changing the values from the object even though I checked it like in the example above?