[APP][4.4][ROOT] SDFix: Modify device permissions to allow apps to write to MicroSD

Search This thread

tliebeck

Senior Member
Sep 15, 2010
1,839
4,325
113
Southern California
ROOT ACCESS IS REQUIRED.

I've written a simple app which modifies KitKat devices to allow user-installed applications to write to the MicroSD card on devices with two storage locations.

Background information on the underlying problem is available here: https://plus.google.com/+TodLiebeck/posts/gjnmuaDM8sn Please ensure you understand the problem and that your device has it before installing this app. This app is quite useless if your device doesn't suffer this issue.

[[[[ THIS IS A BETA RELEASE. WHILE I HAVE TESTED THIS ON MULTIPLE DEVICES MANY TIMES, PLEASE RESTRICT YOUR USE OF THIS APP TO DEVICES YOU HAVE THE ABILITY TO REFLASH FROM SCRATCH. I do not expect this to occur, but this is release #1 of this app, and it modifies a configuration file as root. That said, my test devices still work even when I deliberately corrupted and deleted the target file in testing. ]]]]

This app is entirely free. It doesn't have any ads, (but it does have a few Play Store links on its final screen to my other free apps).

Screenshots:

sdfix_welcome.png
sdfix_ready.png

sdfix_wait.png
sdfix_complete.png


It will be going on the Play Store pending your feedback, but I wanted to post it here first. Please let me know if you encounter any issues.

How it works: The /system/etc/permissions/platform.xml is modified to specify that all applications which have the WRITE_EXTERNAL_STORAGE permission are registered as members of the Android UNIX group "media_rw". Membership in this group is necessary to write to the MicroSD card.

In Android 4.3, most all devices granted access to the media_rw group to apps. In Android 4.4, they do not. This app simply restores the old behavior. From what I've observed this method (granting permission via platform.xml), also appears to be the preferred means of restoring SD card access on XDA and elsewhere.

This app is designed to abort if it sees absolutely anything that it does not expect. Please let me know if the app does not work for you, and what type of device/ROM/etc you're using. If the modification is unnecessary (due to media_rw access being already present) this app will make no modification.

The original platform.xml will be backed up in /system/etc/permissions as "platform.xml.original-pre-sdfix" (unless that file already exists).

Download

The installed app is named "NextApp SDFix".
 
Last edited:

erdal67

Senior Member
Nov 1, 2012
1,107
274
0
Awesome!! Will try, hope it will work


Edit:
Sorry but how can i test it?
When downloading something from dolphin and next -browser it doesnt show sdcard1


by8aheju.jpg



Have a break, Have a KitKat (powered Samsung Galaxy S²)
 
Last edited:
  • Like
Reactions: rbird2 and tliebeck

tliebeck

Senior Member
Sep 15, 2010
1,839
4,325
113
Southern California
Awesome!! Will try, hope it will work


Edit:
Sorry but how can i test it?
When downloading something from dolphin and next -browser it doesnt show sdcard1


by8aheju.jpg



Have a break, Have a KitKat (powered Samsung Galaxy S²)
Most ROMs won't have this problem, it 's generally only an issue with factory firmware on KitKat (e.g. TouchWiz updates to KitKat). What ROM are you running?

The free version of FX File Explorer (links in my signature) should show both media card and internal storage if everything works, and you should be able to create a new folder under the "media card" catalog. If MicroSD access if prevented, attempting to create a new folder under "media card" will fail.
 

hene193

Senior Member
Aug 21, 2011
128
19
0
hene193.com
On stock Note 3 KitKat rom I have a crash when the please wait text pops up. Tell me if you need some kinda logs. Just tell me where they are and I will post them.

Okey I found the cause... I had edited the file and I deleted them and all was fixed. Sorry!
 
Last edited:
  • Like
Reactions: tliebeck

jimmyjamer

New member
Feb 5, 2012
2
0
0
Since this requires root access I assume it will not work with AT&T 4.4.2 1337 NB1 builds? :crying: or did I miss a root process for that build? Thanks
 

tliebeck

Senior Member
Sep 15, 2010
1,839
4,325
113
Southern California
On stock Note 3 KitKat rom I have a crash when the please wait text pops up. Tell me if you need some kinda logs. Just tell me where they are and I will post them.

Okey I found the cause... I had edited the file and I deleted them and all was fixed. Sorry!

If you can make it crash, would greatly appreciate a logcat. Either just do "adb logcat > log.txt" and send me the output, or use a logcat app from the Play Store. Definitely don't want it to crash/force close under any circumstance, it's supposed to be friendlier than that. :)

The critical section of the logcat data should contain "nextapp.sdfix" and have a stack trace in it.

A stack trace looks like this:
Code:
java.lang.IllegalArgumentException: Invalid code point: -2147482938
at java.lang.Character.checkValidCodePoint(Character.java:1591)
at java.lang.Character.toChars(Character.java:2056)
at java.lang.String.<init>(String.java:537)
at com.android.inputmethod.latin.RichInputConnection.sendKeyEvent(RichInputConnection.java:392)
at

Thanks for the report, but don't tear your phone apart trying to reproduce it.
 
  • Like
Reactions: abdak55 and amirbd

Top Liked Posts

  • There are no posts matching your filters.
  • 198
    ROOT ACCESS IS REQUIRED.

    I've written a simple app which modifies KitKat devices to allow user-installed applications to write to the MicroSD card on devices with two storage locations.

    Background information on the underlying problem is available here: https://plus.google.com/+TodLiebeck/posts/gjnmuaDM8sn Please ensure you understand the problem and that your device has it before installing this app. This app is quite useless if your device doesn't suffer this issue.

    [[[[ THIS IS A BETA RELEASE. WHILE I HAVE TESTED THIS ON MULTIPLE DEVICES MANY TIMES, PLEASE RESTRICT YOUR USE OF THIS APP TO DEVICES YOU HAVE THE ABILITY TO REFLASH FROM SCRATCH. I do not expect this to occur, but this is release #1 of this app, and it modifies a configuration file as root. That said, my test devices still work even when I deliberately corrupted and deleted the target file in testing. ]]]]

    This app is entirely free. It doesn't have any ads, (but it does have a few Play Store links on its final screen to my other free apps).

    Screenshots:

    sdfix_welcome.png
    sdfix_ready.png

    sdfix_wait.png
    sdfix_complete.png


    It will be going on the Play Store pending your feedback, but I wanted to post it here first. Please let me know if you encounter any issues.

    How it works: The /system/etc/permissions/platform.xml is modified to specify that all applications which have the WRITE_EXTERNAL_STORAGE permission are registered as members of the Android UNIX group "media_rw". Membership in this group is necessary to write to the MicroSD card.

    In Android 4.3, most all devices granted access to the media_rw group to apps. In Android 4.4, they do not. This app simply restores the old behavior. From what I've observed this method (granting permission via platform.xml), also appears to be the preferred means of restoring SD card access on XDA and elsewhere.

    This app is designed to abort if it sees absolutely anything that it does not expect. Please let me know if the app does not work for you, and what type of device/ROM/etc you're using. If the modification is unnecessary (due to media_rw access being already present) this app will make no modification.

    The original platform.xml will be backed up in /system/etc/permissions as "platform.xml.original-pre-sdfix" (unless that file already exists).

    Download

    The installed app is named "NextApp SDFix".
    10
    Awesome!! Will try, hope it will work


    Edit:
    Sorry but how can i test it?
    When downloading something from dolphin and next -browser it doesnt show sdcard1


    by8aheju.jpg



    Have a break, Have a KitKat (powered Samsung Galaxy S²)
    Most ROMs won't have this problem, it 's generally only an issue with factory firmware on KitKat (e.g. TouchWiz updates to KitKat). What ROM are you running?

    The free version of FX File Explorer (links in my signature) should show both media card and internal storage if everything works, and you should be able to create a new folder under the "media card" catalog. If MicroSD access if prevented, attempting to create a new folder under "media card" will fail.
    3
    Got the issue on my TabPro 8.4, pending for maintenance so can't root yet, but really great thanks for saving the day.

    Sent from my SM-T320 using xda app-developers app
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone