简体   繁体   中英

Writing to external storage

I am automating an apk, whose source code is not accessible to me (actually I am not authorized to change it). Now when I run the test and write logs on the sdcard, it gives me permission denied. Giving WRITE_EXTERNAL_STORAGE permission in the manifest of my test application doesn't have any effect. But if I put permission in the app under test then I get write permission to write on the sdcard. My question, is it necessary to have permission in the app under test (not the test application). If possible, do I need to do something special to give permission through my test application without modifying the manifest of application under test?

as for now it is not possible because robotium drives the actual apk so any permission required is supposed to be provided to the application under test. i am also trying to create bridge through which we can get logs without needing to edit the app under test.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM