Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 4.4 cannot write to external microSD Cards #39

Closed
ppareit opened this issue Feb 16, 2014 · 13 comments · Fixed by #122
Closed

Android 4.4 cannot write to external microSD Cards #39

ppareit opened this issue Feb 16, 2014 · 13 comments · Fixed by #122
Labels

Comments

@ppareit
Copy link
Owner

ppareit commented Feb 16, 2014

Under Android 4.4 cannot write to external microSD Cards as they could under 4.3 / 4.2. This is due to a change in the API / Permissions in Android 4.4.2.

See http://developer.android.com/about/versions/android-4.4.html and http://developer.android.com/about/versions/android-4.4.html#UserContent

@ppareit
Copy link
Owner Author

ppareit commented Mar 8, 2014

It seems that the permissions are correct for this to work. At the moment I cannot test. I do have 2 kitkat devices to test, but none that have an external microSD card

@ppareit ppareit added the BUG label Mar 8, 2014
@rolfep
Copy link

rolfep commented Jul 10, 2014

Hi, it's been several weeks or a month since GF got an update to her Sprint Samsung Note2 SPH-L900. Currently, it's on 4.4.2. Up until then, we were enjoying transferring .mkv files that I got using HandBrakeCLI on .m2t OTA recordings on my Linux computer, using SwiFTP over the fish:// protocol in konqueror. Then, although I could connect and view the filesystem, I could no longer write to the card:
Storage > extSDcard > Video directory that I had created for this purpose. Did not have the correct permissions.

Eventually, I went to the SwiFTP site to look for a solution, and found the development had been resumed here. So, I installed FTP Server free to test but the problem remains. I thought I read something more about a workaround, short of rooting, a few weeks ago and an idea that a bugfix might be forthcoming. Can this issue be addressed? If it would help, I could mail you a microsdcard.
Thanks,
Rolf

@ppareit
Copy link
Owner Author

ppareit commented Jul 12, 2014

Hello Rolf,
I've now installed a 4.4 ROM on my asus transformer and that device has an sd slot. I've got enough sd cards. So I should be able to look into this.
I've read that since the 4.4 update a lot of programs break on this issue, reading/writing to external sd cards. I'll see what I can do for FTP Server.
Regards,
Pieter

@rolfep
Copy link

rolfep commented Jul 12, 2014

Thanks a lot, Pieter.
Rolf

On 07/12/2014 03:42 AM, Pieter Pareit wrote:

Hello Rolf,
I've now installed a 4.4 ROM on my asus transformer and that device
has an sd slot. I've got enough sd cards. So I should be able to look
into this.
I've read that since the 4.4 update a lot of programs break on this
issue, reading/writing to external sd cards. I'll see what I can do
for FTP Server.
Regards,
Pieter


Reply to this email directly or view it on GitHub
#39 (comment).

@mork2020
Copy link

To get write access with android >4.4.x to e.g. an external hard disk for all apps (especial those how do not request root access) a change in the file "/system/etc/permissions/platform.xml" can be done with adding the tag <group gid="media_rw" /> to the android.permission.WRITE_EXTERNAL_STORAGE definitions.
So platform.xml should look something like this:

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

Or just use the app Nextapp SDfix from NextApp Inc. to modify this file.
Root access is needed for the app or for modifying the file.

@ppareit
Copy link
Owner Author

ppareit commented Jul 17, 2014

Yes, that was the situation before android 4.4. Making a change to that
file requires root. I think in android L the android team will revert or
they will introduce finer permissions.

mork2020 schreef op wo 16-07-2014 om 08:18 [-0700]:

To get write access to e.g. an external hard disk for all apps
(especial those how do not request root access) a change in the file
"/system/etc/permissions/platform.xml" can be done with adding the tag
"" to the "android.permission.WRITE_EXTERNAL_STORAGE" definitions.
So "platform.xml" should look something like this:

Or just use the app Nextapp SDfix from NextApp Inc. to modify this
file.
Root access is needed.


Reply to this email directly or view it on GitHub.

@rolfep
Copy link

rolfep commented Sep 12, 2014

Is there any new info about this issue?
Thanks.

@ka223
Copy link

ka223 commented Sep 18, 2015

I can confirm this issue with a motorola g2 and Android 4.4.

@Overlord23
Copy link

This problem affects Android 5.0.1 also

@kfcviptel
Copy link

I got this problem with swiftp on android 5.1.1 too. But the File Commander - File Manager from MobiSystems can write and delete.
I guess that it has somethig to do with some new permissions that an App must have.

@ppareit
Copy link
Owner Author

ppareit commented Jun 11, 2016

Work around for android 6.x is adoptable storage, see
https://source.android.com/devices/storage/adoptable.html

In the settings you can format your sd card. Keep in mind that this destroys all data on your sd card. You will lose all files on that sd card. So a back up is needed.

Personally, I only advice this to do this with a dedicated sd card that you leave always in your phone, also take a fast sd card, and keep in mind that all data will be erased from that sd card when you do this.

After configuring for adoptable storage, you can use your sdcard as internal storage. In fact, you won't know the difference. You will only have more space on your device.

@ka223
Copy link

ka223 commented Jan 19, 2017

The problem is still at CM13 (Android 6), is it not possible to grant write permission for external storage?

@le-mon
Copy link

le-mon commented May 30, 2017

Android 4.4.4 on Galaxy J100 here, no write permission on extSdCard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants