WRITE_EXTERNAL_STORAGE: is that permission a requirement?

43 views
Skip to first unread message

John Dupuy

unread,
Apr 17, 2017, 5:42:11 PM4/17/17
to Python For Android
The AndroidManifest.xml appears to default to requesting WRITE_EXTERNAL_STORAGE permission (at least for SDL2).

Could a python-for-android APK work without it, or is that needed for basic function?

If required, that brings up a security question: is the python object code stored in external storage? What is being stored there?

Goal: I'd like my mobile app to not require any special permissions.

Thanks,

John

John Dupuy

unread,
Apr 19, 2017, 1:18:15 PM4/19/17
to Python For Android
The answer appears to be "no, it is not needed. Maybe."

I changed the AndroidManifest.tmpl.xml file to not include that permission. I removed the current 'dist' to get a clean build; and it all works; at least in USB debugging mode. Even my JSONStore file that I save via Kivy is being stored without that permission.

I then confirmed with the aapt tool that the permission is not requested in the APK.

Wildly guessing: there might still be legacy functions in Kivy that need that permission; but apparently the board game I've written is not invoking any of them.

But that is a guess; I'd really appreciate any insight from developers or anyone knowledgeable of the innards of python-for-android.

Thanks,

John

Alexander Taylor

unread,
Apr 20, 2017, 2:59:10 PM4/20/17
to Python For Android
I think this permission used to be required a long time ago, but probably isn't any more. It's still there because nobody has found the time to check it thoroughly and remove it. It's possible that Kivy does try to write files using it, and the documentation currently tells users that using this directory is okay, but removing these defaults should also be fine (barring backwards compatibilty concerns).
Reply all
Reply to author
Forward
0 new messages