So based on what I have read so far, KitKat has protections for apps writing to the external microSD card. An example of how you might "fix" this:
http://forum.xda-developers.com/showthread.php?t=2617921
However, the M8 also protects the system directory, so we cannot write to it. Kind of a catch-22, no?
So, my questions are:
1) Do we think we will be able to remove the system protection?
2) Will that then allow us to let apps write to the microSD card?
gjlowe said:
So based on what I have read so far, KitKat has protections for apps writing to the external microSD card. An example of how you might "fix" this:
http://forum.xda-developers.com/showthread.php?t=2617921
However, the M8 also protects the system directory, so we cannot write to it. Kind of a catch-22, no?
So, my questions are:
1) Do we think we will be able to remove the system protection?
2) Will that then allow us to let apps write to the microSD card?
Click to expand...
Click to collapse
You will have to root and edit the system permissions file as shown in that link. I did it with my GS4, and it worked perfectly! It allows any app to write to external SD.
SolarTrans said:
You will have to root and edit the system permissions file as shown in that link. I did it with my GS4, and it worked perfectly! It allows any app to write to external SD.
Click to expand...
Click to collapse
I have used ES File Explorer with root enabled, but it won't let me write to system due to the other issue I mentioned.
I used it too. You have to enable root access for the app (within its settings), then for the specific permissions folder itself (also within the app). You've gotta make sure it has permission to write in both of those settings as well.
Sent from my iPad using Tapatalk
I am not following...I did set root Explorer for the app, but I cannot modify anything, including permissions for the folder because I cannot modify the contents of /system
Sent from my HTC One_M8 using Tapatalk
U can bypass system write protection by using adb from within custom recovery (TWRP) and issue this command
adb shell
mount /system/
djkinetic said:
U can bypass system write protection by using adb from within custom recovery (TWRP) and issue this command
adb shell
mount /system/
Click to expand...
Click to collapse
Perfect! Thank you sir! So to continue this thought, if it can be done in recovery, are we just waiting for a method to do this live in a fully booted system?
gjlowe said:
Perfect! Thank you sir! So to continue this thought, if it can be done in recovery, are we just waiting for a method to do this live in a fully booted system?
Click to expand...
Click to collapse
basically we need an insecure kernel/module/boot.img as far as i know there is one out but only for dev/testing purposes, i think in order to get a proper one we first need kernel source to drop, i'm no dev so I could be wrong.
gjlowe said:
So based on what I have read so far, KitKat has protections for apps writing to the external microSD card. An example of how you might "fix" this:
http://forum.xda-developers.com/showthread.php?t=2617921
However, the M8 also protects the system directory, so we cannot write to it. Kind of a catch-22, no?
So, my questions are:
1) Do we think we will be able to remove the system protection?
2) Will that then allow us to let apps write to the microSD card?
Click to expand...
Click to collapse
I applied this fix on my LG GPad GPe which had 4.4 stock and didn't support RW to the external sdcard. Yes it does require root in order to access and edit that file to change permissions, but its ridiculous how editing one line of code will fix this problem, now I can read/write and even write data directly to my extsd card and save TWRP backups to ext memory no problem.
I plan to do the same once I get and root my GPe M8
Sent from my LG-V510 using Tapatalk
gjlowe said:
I am not following...I did set root Explorer for the app, but I cannot modify anything, including permissions for the folder because I cannot modify the contents of /system
Sent from my HTC One_M8 using Tapatalk
Click to expand...
Click to collapse
I may be able to help further once I get my M8 this Friday, but as of now I don't have an Android device to use and guide you through with. It took me a lot of messing around, and there was some menu in the app past the general root access one that changed permissions of a few folders (/system and a couple others). It looks like the ADB method above helped though so hope you're up and going!
Sent from my iPhone 5s using Tapatalk
Here's how i managed to apply the "fix" to platform.xml, this will require root at the very least.
I navigated to /system/etc/permissions/ and copied platform.xml from there to the internal SD, then i opened it with solid explorer's built in text editor, though i think any editor will do, and changed it like this:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
<permission name="android.permission.WRITE_MEDIA_STORAGE" >
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
Saved the file, and rebooted in to TWRP.
Once in TWRP i mounted the system partition, then used the file manager under advanced. Navigated to /system/etc/permissions/ again and renamed permissions.xml to permissions.xml.bak so that i'd have a backup right there in the same directory. Next I used the file manager and copied the permissions.xml that i modified and saved earlier to the internal SD back in to /system/etc/permissions/. Finally i used the chmod functionality in the file manager and did a chmod 644 to it. Booted in to android and tried to copy a file from the internal SD to the external SD and everything seems to have worked fine.
While i was in there i moved some of the bloatware off the priv-app folder in /system so it wouldn't keep trying to reinstall lumen and it's bushel of crap every time i reboot. I think its also possible to get rid of or change the boot sound via TWRP file manager but i haven't tried yet.
Sorry if all that was a jumble and hard to understand, i can reword it if necessary.
lacrossev said:
Here's how i managed to apply the "fix" to platform.xml, this will require root at the very least.
I navigated to /system/etc/permissions/ and copied platform.xml from there to the internal SD, then i opened it with solid explorer's built in text editor, though i think any editor will do, and changed it like this:
Saved the file, and rebooted in to TWRP.
Once in TWRP i mounted the system partition, then used the file manager under advanced. Navigated to /system/etc/permissions/ again and renamed permissions.xml to permissions.xml.bak so that i'd have a backup right there in the same directory. Next I used the file manager and copied the permissions.xml that i modified and saved earlier to the internal SD back in to /system/etc/permissions/. Finally i used the chmod functionality in the file manager and did a chmod 644 to it. Booted in to android and tried to copy a file from the internal SD to the external SD and everything seems to have worked fine.
While i was in there i moved some of the bloatware off the priv-app folder in /system so it wouldn't keep trying to reinstall lumen and it's bushel of crap every time i reboot. I think its also possible to get rid of or change the boot sound via TWRP file manager but i haven't tried yet.
Sorry if all that was a jumble and hard to understand, i can reword it if necessary.
Click to expand...
Click to collapse
You can, I removed the boot up sound by using the file manager in recovery mode. It's found here: system/customize/resource/HTC_Sense5_Boot.mp3
Edit:
I followed your steps and now I am able to write to my SD card with no problem. Thanks!
Hello.
Thank you lacrossev for the steps you have provided, but unfortunately they don't seem to work for me.
I have the international, carrier-free One M8. Perm-rooted it today and installed TWRP, but I am still on the stock ROM. The problem seems to be that the platform.xml file is restored to the original version on every reboot. I even tried to chmod 0444 it, so that nobody can overwrite it, but it didn't do the trick. I cannot figure out where the file is being restore from.
Any clues? Thanks in advance to anybody who will help.
Also thank you Bachatu, I replaced the startup sound with Windows 2000's startup sound.
I have followed them carefully, but the file keeps being reverted
I change my permison.xml file like this
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
[B]<group gid="media_rw" />[/B]
</permission>
<permission name="android.permission.WRITE_MEDIA_STORAGE" >
[B]<group gid="sdcard_rw" />[/B]
<group gid="media_rw" />
</permission>
give a permision to file 644 like in instructions but nothing. Still phone crash when I try move a file to system directory from internal_sd.
I have cid_032 and 1.54.401.10 version
I have write access to the ex sd without making modifications to the xml file. Also have apps writing to the ex sd card too.
I don't have <group gid="media_rw" /> under WRITE-EXTERNAL_STORAGE nor do I have <group gid="sdcard_rw" /> under WRITE_MEDIA_STORAGE.
ashyx said:
I have write access to the ex sd without making modifications to the xml file. Also have apps writing to the ex sd card too.
I don't have <group gid="media_rw" /> under WRITE-EXTERNAL_STORAGE nor do I have <group gid="sdcard_rw" /> under WRITE_MEDIA_STORAGE.
Click to expand...
Click to collapse
I try two version from other post with add to WRITE-EXTERNAL_STORAGE <group gid="sdcard_rw" /> and without and still nothing.
Thank you so much.
I spent a long time trying this out... and found where I was going wrong in reading the description.
To everyone else who's trying to do this...
Please note the following...
You need to COPY partition.xml from M8's internal sd to the external micro sd card then modify it there.
Then when you go into TWRP, you then rename the M8's internal sd copy of "partition.xml" to "partition.xml.bak"... only then, you copy the modified file for "partition.xml" from the external micro sd card back into M8's internal sd at /system/etc/permissions....
They key here is to note that when the author refers to internal sd..... he really means the external micro sd card.
Good luck everyone, I can get back to using quickpic.
lacrossev said:
Here's how i managed to apply the "fix" to platform.xml, this will require root at the very least.
I navigated to /system/etc/permissions/ and copied platform.xml from there to the internal SD, then i opened it with solid explorer's built in text editor, though i think any editor will do, and changed it like this:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
<permission name="android.permission.WRITE_MEDIA_STORAGE" >
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
Saved the file, and rebooted in to TWRP.
Once in TWRP i mounted the system partition, then used the file manager under advanced. Navigated to /system/etc/permissions/ again and renamed permissions.xml to permissions.xml.bak so that i'd have a backup right there in the same directory. Next I used the file manager and copied the permissions.xml that i modified and saved earlier to the internal SD back in to /system/etc/permissions/. Finally i used the chmod functionality in the file manager and did a chmod 644 to it. Booted in to android and tried to copy a file from the internal SD to the external SD and everything seems to have worked fine.
While i was in there i moved some of the bloatware off the priv-app folder in /system so it wouldn't keep trying to reinstall lumen and it's bushel of crap every time i reboot. I think its also possible to get rid of or change the boot sound via TWRP file manager but i haven't tried yet.
Sorry if all that was a jumble and hard to understand, i can reword it if necessary.
Click to expand...
Click to collapse
htc 816
hi, my phone is htc desire 816 dual sim
i change the platform.xml file but in reboot its change to original file. even i deleted platform.xml file and my phone restart at the time and when start again every thing come back!!
please help me, i want to use gl to sd and other app on my device, its so bad google! u downgrade ur OS!!!!
sina_alone said:
hi, my phone is htc desire 816 dual sim
i change the platform.xml file but in reboot its change to original file. even i deleted platform.xml file and my phone restart at the time and when start again every thing come back!!
in TWRC file manager replaced platform.xml and its work!!!!! I do it!!!!
Click to expand...
Click to collapse
I have a N7100 Galaxy Note 2 with the latest official firmware 4.4.2 stock.
I followed these two guides to root and enable screen mirroring.
Everything worked perfectly!
Later, with ES File Explorer I edit "platform.xml" to fix writing permissions on the microsd and I added "<group /> gid="media_rw" />" under "WRITE_EXTERNAL_STORAGE"
After reboot problems begin, all apps are unusable, inaccessible internal and external memory.
With ES File Explorer I restore "platform.xml" as the original file but problems persist.
Now, only sms and phone work.
Why? How can I fix this problem?
Has Knox locked my smartphone?
campotino said:
I have a N7100 Galaxy Note 2 with the latest official firmware 4.4.2 stock.
I followed these two guides to root and enable screen mirroring.
Everything worked perfectly!
Later, with ES File Explorer I edit "platform.xml" to fix writing permissions on the microsd and I added "<group /> gid="media_rw" />" under "WRITE_EXTERNAL_STORAGE"
After reboot problems begin, all apps are unusable, inaccessible internal and external memory.
With ES File Explorer I restore "platform.xml" as the original file but problems persist.
Now, only sms and phone work.
Why? How can I fix this problem?
Has Knox locked my smartphone?
Click to expand...
Click to collapse
I am not at my PC to look into my platform.xml so I can only suspect that your command is wrong and it should be: <group gid=”media_rw” />
Androidwizzard said:
I am not at my PC to look into my platform.xml so I can only suspect that your command is wrong and it should be: <group gid=”media_rw” />
Click to expand...
Click to collapse
I agree. If in fact you entered <group /> gid="media_rw" /> in system/etc/permissions/platform.xml, that is most likely your problem. All the posts I have read concur with Androidwizzard. I have also read that the permissions for that file should be 0644 or rw-r--r--. These can be set in Root Explorer.
Not that this has solved the problem with my Note II, but you at least have a clear error in your string. My platform.xml file is correct and non-rooted apps still can't access my extSdCard. TiBU and Root Explorer can access it without issue.
On a side note, this platform.xml file is found in 2 places: system/etc/permissions/platform.xml AND /etc/permissions/platform.xml. Is this just a mirroring thing that Android does? It appears that changes made to one appear in the other...
Some people in this thread are reporting success using FolderMount from the Play store. When you launch this app it will detect errors in your file system and make changes to /system/bin/sdcard. This change alone is supposedly enough to enable your apps to access the SD card. But it did not work for me.
I sure am hoping we can find a good solution!
any fix for this ?? what is the owner file of platform.xml actually ? is it root or system ?
another thing about the /system/etc/permission is it same with /etc/permission ??
never know this small 7kb file can messed up phone quite bad.
I solved problem with Wipe facrtory reset!
After this, I repeat root on android 4.4.2 and with SD fix, downloaded to playstore, i fix write permission on external sd card.
Now my Note 2 work fine
thanks for the reply. it seems factory default is the last resort. lesson learned. never messed with platform.xml. hahah.
1. Using any root explorer, navigate to
Code:
/system/etc/permissions/platform.xml
2. Find android.permission.WRITE_EXTERNAL_STORAGE and ADD
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
[COLOR="RoyalBlue"]<group gid="media_rw" />[/COLOR]
</permission>
3. Find android.permission.WRITE_MEDIA_STORAGE and ADD
Code:
<permission name="android.permission.WRITE_MEDIA_STORAGE" >
<group gid="media_rw" />
[COLOR="RoyalBlue"]<group gid="sdcard_rw" />[/COLOR]
</permission>
4. Save, if needed set permissions to 0644 [rw-r-r] and reboot.
Also, if you're a slacker and unwilling to follow ATTACK's excellent write up ... you can install the SDFix app (Works on Stock 4.4.2 and GPE ROM)
SDFix
I'm vaguely certain that it does the same thing and it is probably not going to sell your information to China.
(But who knows!!! Live dangerously!!!)
It provides a clean one click solution and you can uninstall it when finished.
However, it DOES NOT provide an easy way to UNDO the permission change should you fall on your head and decide that you no longer want Full Read/Write access to your SD card.
I am running Carbon ROM JBBL, and never specifically noticed any issues in KK, so I went and checked what my file had (which should be default values) and it appears the devs for this custom ROM have already "corrected" this setting setting for us.:good: Now I'm tempted to reverse just it to see what all the hoo-ha is about...:cyclops:
Hi everyone.
I mainly rooted my device yesterday so I can use instructions like this to have a normal access to my sd card. But after root I realized that in my platform.xml file under "android.permission.WRITE_EXTERNAL_STORAGE" permission there's no gids already mentioned (as it apparently is in the instructions).
The permission looks like below in my platform.xml, including the comment:
Code:
<!-- These are permissions that were mapped to gids but we need
to keep them here until an upgrade from L to the current
version is to be supported. These permissions are built-in
and in L were not stored in packages.xml as a result if they
are not defined here while parsing packages.xml we would
ignore these permissions being granted to apps and not
propagate the granted state. From N we are storing the
built-in permissions in packages.xml as the saved storage
is negligible (one tag with the permission) compared to
the fragility as one can remove a built-in permission which
no longer needs to be mapped to gids and break grant propagation. -->
<permission name="android.permission.READ_EXTERNAL_STORAGE" />
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" />
What should I do? can I change the whole tag so it represents this:
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
Or do you have a better solution for what I'm intending to do?
And generally I'm curious to know how Android users deal with their sd-card considering recent restrictions to sd-card write.
Thanks.
Update:
Went for rewriting platform.xml file while waiting for answers, realized I can't mount /system rw!
I used mount -o remount,rw /system, it said not user mountable in fstab
Update2:
Managed to mount /system as r/w. But the problem persists, can't grand external storage access to all apps.