2

I recently updated to Marshmallow (Cyanogmod CM13) and, due to the new permissions regime, a lot of my apps no longer work.

Note that these apps are not on the Play Store and are for my own personal use. So security is not much of a problem - I'll let my apps access whatever I want them to access.

The problem is how to achieve that.

I've tried doing a "su -c chmod" to modify the permissions but that does not work.

Other apps (eg Jota+) can browse to and write to a file. How do they do that? (Yes, I've tried searching but have not hit on the right search terms - if the answer is "out there".)

EDIT: The sdcard has been "adopted" and all relevant files transferred to it.

Floern
  • 33,559
  • 24
  • 104
  • 119
Kevin Gilbert
  • 671
  • 10
  • 18

1 Answers1

2

Edit platform.xml at /system/etc/permissions/platform.xml.

Find these lines

<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
    <group gid="sdcard_r" />
    <group gid="sdcard_rw" />
</permission>

Change to

<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
    <group gid="sdcard_r" />
    <group gid="sdcard_rw" />
    <group gid="media_rw" />
</permission>

Now you'll be able to write to sdcard like in earlier Android versions.

You can also learn about the regular way to access external storage on lollipop and above How to use the new SD card access API presented for Android 5.0 (Lollipop)?

Community
  • 1
  • 1
David Heisnam
  • 2,463
  • 1
  • 21
  • 32
  • 3
    I had already tried that hack but it no longer works under Marshmallow.In fact, that whole section of the file is missing. Adding it and rebooting does nothing. Please note the edit to the question: The sdcard has been "adopted" and all relavent files transferred to it. – Kevin Gilbert Jan 24 '16 at 23:13
  • 2
    I can verify that the `WRITE_EXTERNAL_STORAGE` section does not exist on Android 6.0.1 Marshmallow, and adding it, doing `chmod 644` and rebooting *does not grant access*. – David Refoua Nov 12 '16 at 18:29