[Note] Reverting KitKat SD card changes

Search This thread

MohammadAG

Inactive Recognized Developer
Sep 7, 2009
1,080
5,504
30
Jerusalem
mohammadag.xceleo.org
This requires root.

You'll need to disable Sony RIC if your kernel doesn't do that:
Code:
echo 0 > /sys/kernel/security/sony_ric/enable

Using a root enabled file explorer, remount /system as rw.
Edit /etc/permissions/platform.xml
Find this block:
Code:
    <permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
        <group gid="sdcard_r" />
        <group gid="sdcard_rw" />
    </permission>

Change it to
Code:
    <permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
        <group gid="media_rw" />
        <group gid="sdcard_r" />
        <group gid="sdcard_rw" />
    </permission>

Reboot

This probably applies to all 4.4 devices, except the Sony specific RIC part.
 
Last edited:
L

LeParkour012

Guest
What are the SD card changes and is it important to revert?
 

MohammadAG

Inactive Recognized Developer
Sep 7, 2009
1,080
5,504
30
Jerusalem
mohammadag.xceleo.org
What are the SD card changes and is it important to revert?

If you haven't noticed them, chances are you don't need this.

KitKat prevents app from writing freely to the SD card, although I agree with this for the internal SD card, it makes no sense for the external one since that's a place most users download songs/videos/movies to, and chances are that stuff isn't sensitive data.

This allows you to revert that change, and all apps with WRITE_EXTERNAL_STORAGE can write to the SD card again.

Apparently this fix is already packaged into an app, not sure if it works, if it doesn't, chances are you need to manually disable RIC first as per above.
https://play.google.com/store/apps/details?id=nextapp.sdfix
 

Tonian1878

Senior Member
Nov 12, 2013
145
19
What are the SD card changes and is it important to revert?

not easy to explain but ill try

Apps cannot write to the sd card unless they have a specific folder on the sd card which only that app can write to.

Apps like File commander are now useless when it comes to moving stuff round the SD Card as file commander is restricted to read access only on the sd card.

hope that makes sense
 
L

LeParkour012

Guest
Okay I understand. Thanks for clarifying that for me.
 

Bobeobi

Senior Member
Oct 7, 2012
80
13
Dnipro
not easy to explain but ill try

Apps cannot write to the sd card unless they have a specific folder on the sd card which only that app can write to.

Apps like File commander are now useless when it comes to moving stuff round the SD Card as file commander is restricted to read access only on the sd card.

hope that makes sense

I didn't get it, is it still possible to copy music, video and other stuff from PC to SD card? That's all I need
 

MohammadAG

Inactive Recognized Developer
Sep 7, 2009
1,080
5,504
30
Jerusalem
mohammadag.xceleo.org
I disabled ric with custom kernel and double checked file,
but I got many "Permission denied" from apps writes to SD card.
Default one works fine, so maybe my installed apps don't need this tweak...

Then RIC wasn't disabled and the changes didn't persist. It works fine with OI File Manager for me.

I didn't get it, is it still possible to copy music, video and other stuff from PC to SD card? That's all I need

Yes, but you can't change files on-device.
 

GR00VY GH0ULIE

Senior Member
Mar 11, 2014
127
37
53
Coquitlam
When starting folder mount last night it gave an error about SD card permission and offered to patch it, it patched and everything works like it did pre 4.4

Sent from my C6903 using XDA Premium 4 mobile app
 
Last edited:

Gnubaver

Senior Member
Apr 19, 2011
130
17
not easy to explain but ill try

Apps cannot write to the sd card unless they have a specific folder on the sd card which only that app can write to.

Apps like File commander are now useless when it comes to moving stuff round the SD Card as file commander is restricted to read access only on the sd card.

hope that makes sense

A BIG NO TO THIS!

File Commander is put on Kitkat BECAUSE it has 100% rights to the SD Card.

I can move stuff around, create folders etc etc.

DON'T teach people the wrong stuff.
 
  • Like
Reactions: tomthedancingbug

HarpingOn

Senior Member
Oct 20, 2010
350
71
A BIG NO TO THIS!

File Commander is put on Kitkat BECAUSE it has 100% rights to the SD Card.

I can move stuff around, create folders etc etc.

DON'T teach people the wrong stuff.

File commander isn't good enough. It won't take files from my nas using ftp or webdav. For that I have to use ES, but ES can't store the files on my external sd any more. It's rubbish. How is this any kind of improvement, it's like ios

Sent from my C6903 using Tapatalk
 

Gnubaver

Senior Member
Apr 19, 2011
130
17
File commander isn't good enough. It won't take files from my nas using ftp or webdav. For that I have to use ES, but ES can't store the files on my external sd any more. It's rubbish. How is this any kind of improvement, it's like ios

Sent from my C6903 using Tapatalk

Don't be stupid.... it's nothing like ios, if you ever tried ios you would know that there is no file manager at ALL.
 

HarpingOn

Senior Member
Oct 20, 2010
350
71
If I can't use webdav to get files on to the external sd, that's a deal breaker. And not stupid.

Sent from my C6903 using Tapatalk
 
Last edited:

negrobembon

Senior Member
Jul 17, 2011
3,297
452
34
panamá
File commander works because its a System app, only system apps have full control of the Sd card

Sent from my C6906 using Tapatalk
 

Chad_Petree

Senior Member
Apr 2, 2009
3,315
486
So now it's impossible to save the pictures taken with the camera automatically on the SD card?

Gesendet von meinem Nexus 5 mit Tapatalk
 

MohammadAG

Inactive Recognized Developer
Sep 7, 2009
1,080
5,504
30
Jerusalem
mohammadag.xceleo.org
Stock apps aren't affected by this, there's a permission that allows full access but I think it's limited to system apps.

I updated the first post, the sdcard_rw and sdcard_r gids should not be removed, that breaks the camera, instead, media_rw should be added.
 
  • Like
Reactions: guddu2011

brapicoco

Senior Member
May 29, 2011
575
17
So does this mean that only file commander is allowed to transfer media files (photos, videos) from internal to SD and vice versa?
 

negrobembon

Senior Member
Jul 17, 2011
3,297
452
34
panamá
So does this mean that only file commander is allowed to transfer media files (photos, videos) from internal to SD and vice versa?

Yup, only the stock file manager that comes with each device(file commander on our case) works with the sd card

Too bad that file commander can't see my hidden folders otherwise it would be great

Sent from my C6906 using Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    This requires root.

    You'll need to disable Sony RIC if your kernel doesn't do that:
    Code:
    echo 0 > /sys/kernel/security/sony_ric/enable

    Using a root enabled file explorer, remount /system as rw.
    Edit /etc/permissions/platform.xml
    Find this block:
    Code:
        <permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
            <group gid="sdcard_r" />
            <group gid="sdcard_rw" />
        </permission>

    Change it to
    Code:
        <permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
            <group gid="media_rw" />
            <group gid="sdcard_r" />
            <group gid="sdcard_rw" />
        </permission>

    Reboot

    This probably applies to all 4.4 devices, except the Sony specific RIC part.
    5
    What are the SD card changes and is it important to revert?

    If you haven't noticed them, chances are you don't need this.

    KitKat prevents app from writing freely to the SD card, although I agree with this for the internal SD card, it makes no sense for the external one since that's a place most users download songs/videos/movies to, and chances are that stuff isn't sensitive data.

    This allows you to revert that change, and all apps with WRITE_EXTERNAL_STORAGE can write to the SD card again.

    Apparently this fix is already packaged into an app, not sure if it works, if it doesn't, chances are you need to manually disable RIC first as per above.
    https://play.google.com/store/apps/details?id=nextapp.sdfix
    4
    Another Explanation

    So many users confused here. So I'll explain more detail.

    Basically, Android KitKat has a simple feature yet annoying. I don't know why "WRITING SOMETHING TO EXTERNAL SDCARD" is as not easy as JB. What do I mean not easy is, "WRITING SOMETHING TO EXTERNAL SDCARD" is required special permission.

    Example:
    1. Open terminal emulator
    2. Type this
    Code:
    $ cd sdcard1

    NOTE:
    $ is a sign that we execute this as NON-ROOT user. YOU DON'T HAVE TO INCLUDE THIS TO YOUR INPUT COMMAND.
    # is a sign that we execute this as ROOT user. YOU DON'T HAVE TO INCLUDE THIS TO YOUR INPUT COMMAND.

    You're on /sdcard1 folder now. Then type
    Code:
    /sdcard $ mkdir something

    Aaand....
    attachment.php


    As NON-ROOT user, you CAN'T WRITE anything to this folder (/sdcard1 -> external sdcard). :crying::crying::crying:


    So how if we do as ROOT user?

    Code:
    /sdcard1 $ su
    /sdcard1 # mkdir something

    attachment.php


    WE DID IT!!! :fingers-crossed::fingers-crossed::fingers-crossed:

    So if you follow OP instructions, you'll get this.
    After reboot, open your terminal emulator, and follow this command.

    Code:
    $ cd /sdcard1
    /sdcard1 $ mkdir new_folder

    attachment.php


    After apply the change, and reboot. Now we have write access to external sdcard! :victory::victory::victory:

    Another way to do this is. I'm LINUX geek, so I love to do anything in terminal emulator, you can do this, this is perfectly safe.

    System requirements:
    1. ROOTED
    2. BUSYBOXED
    3. Android Terminal Emulator

    Code:
    $ su
    # mount -o remount,rw /system
    # cd /etc/permissions
    /etc/permissions # cp platform.xml platform.xml.orig
    /etc/permissions # sed -i "$(expr $(grep -n 'WRITE_EXTERNAL_STORAGE' platform.xml | awk -F ':' '{print $1}') + 1)i         <group gid=\"media_rw\" />" platform.xml
    /etc/permissions # reboot
    1
    not easy to explain but ill try

    Apps cannot write to the sd card unless they have a specific folder on the sd card which only that app can write to.

    Apps like File commander are now useless when it comes to moving stuff round the SD Card as file commander is restricted to read access only on the sd card.

    hope that makes sense

    A BIG NO TO THIS!

    File Commander is put on Kitkat BECAUSE it has 100% rights to the SD Card.

    I can move stuff around, create folders etc etc.

    DON'T teach people the wrong stuff.
    1
    Stock apps aren't affected by this, there's a permission that allows full access but I think it's limited to system apps.

    I updated the first post, the sdcard_rw and sdcard_r gids should not be removed, that breaks the camera, instead, media_rw should be added.