I’m trying to test the behavior of my application when it cannot access some files due to missing permissions.
Is it possible to change file/folder permissions on an android emulator using FileExplorer in DDMS perspective?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To change permissions in the emulator you need to use the
adb shellcommand from your adroid-sdk platform-tools. In the android shell you can enter the commandsuto get root access. Now you can see and change the permissions with the normal unix commandschmodNote, that the system folder in Android is mounted read-only. You would have to remout it read-write after this tutorial:
http://android-tricks.blogspot.com/2009/01/mount-filesystem-read-write.html
Be careful in anyway to use only writable filesystems like
/dataorsdcardfor your application data since using restricted folders can have negative side effects in a productive environment!