I have an app that tries to read a file in internal memory in it’s /data/data/appname folder. However, I need to inject that file within that folder before it can read it (assuming this is a rooted device).
How do I change the permissions such that only the app can read it? I tried to programmatically create a file, and then use chmod to check the permissions, and the user/group are both app_18. How do I create a file with the same parameters?
Thanks.
In android when you create a file in application’s internal storage
(/data/data/<package_name>)By default it has a MODE_PRIVATE permission. (Its private to your application)Android – InternalStorage