cannot save platform.xml (tried root explorer & total commander) - One (M8) Q&A, Help & Troubleshooting

I am trying to change the permissions under platform.xml so I can access the sd card with TitaniumBackup.
I installed the SDFix app and it seemed to have worked, I can delete files and stuff from the SD Card, however TitaniumBackup still couldn't backup directly into the SD Card.
I found that under the platform.xml I only had <group gid="sdcard_r" /> and <group gid="sdcard_rw" /> but not <group gid="media_rw" /> so I tried to add the media part into the file.
I am rooted and I do successfully change the file (tried with Root Explorer and Total Commander), but every time after I reboot the file changes back to the original.
I tried searching online for this but couldn't seem to find any information on this.
Thanks in advance!

Related

[Q] System protection and RW SD Card

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

Is modifying write permisions for extSD in KitKat a good idea?

I'm on rooted stock ND8. As I expected there are a few apps that don't want to write to the ext card because of the new permissions required by KitKat. One deveoper (rerware...MyBackup Pro) suggests that if I want to use the ext card for backups I edit the permissions for the ext card. They were even kind enough to send me instructions, which I've posted below.
Their argument was that because of the sandboxed nature of the data on the ext card, if they allowed ext card storage using the standard KitKat permissions it would be to easy for the system to delete the data if the app is uninstalled or an upgrade fails. I see their point.
My question is...Is this a good idea? Am I opening up the ext card to easy hacking? Is this just setting the permissions to where they were in Jellybean?
Thanks
Instructions:
1- Using a root-enabled file manager, navigate to /system/etc/permissions
2- Edit platform.xml
3- <permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
< group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
4- save and restart​
Here's a good read on it: http://m.androidcentral.com/kitkat-sdcard-changes
I will personally be doing it as I don't keep any sensitive information anywhere near my phone to begin with.
This is absolutely the best info on this issue! I was getting pretty frustrated with how 4.4 handles the ext sdcard but now all is well. :thumbup::beer:
poit said:
I'm on rooted stock ND8. As I expected there are a few apps that don't want to write to the ext card because of the new permissions required by KitKat. One deveoper (rerware...MyBackup Pro) suggests that if I want to use the ext card for backups I edit the permissions for the ext card. They were even kind enough to send me instructions, which I've posted below.
Their argument was that because of the sandboxed nature of the data on the ext card, if they allowed ext card storage using the standard KitKat permissions it would be to easy for the system to delete the data if the app is uninstalled or an upgrade fails. I see their point.
My question is...Is this a good idea? Am I opening up the ext card to easy hacking? Is this just setting the permissions to where they were in Jellybean?
Thanks
Instructions:
1- Using a root-enabled file manager, navigate to /system/etc/permissions
2- Edit platform.xml
3- <permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
< group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
4- save and restart​
Click to expand...
Click to collapse
And yes, this'll just put the SD card back where it was before KitKat.
Sent from my Sprint Samsung Galaxy SIII with M.O.A.R. v9.0, dkp kernel dated 3/20/2014 and TWRP v2.7.0.0.

Move apps to external sd-card with Android 4.4.2 b510

Edit /system/etc/permissions/platform.xml file with root access rights. Find android.permission.WRITE_EXTERNAL_STORAGE and add the line <group gid="media_rw" />
find android.permission.WRITE_MEDIA_STORAGE and add the line <group gid="sdcard_rw" />
Save the platform.xml file and set the file permissions to 644.
Reboot device.
Now i can move all apps to external sd-card.
[FIN]migge said:
Edit /system/etc/permissions/platform.xml file with root access rights. Find android.permission.WRITE_EXTERNAL_STORAGE and add the line <group gid="media_rw" />
find android.permission.WRITE_MEDIA_STORAGE and add the line <group gid="sdcard_rw" />
Save the platform.xml file and set the file permissions to 644.
Reboot device.
Now i can move all apps to external sd-card.
Click to expand...
Click to collapse
Some apps are better left alone in their place, and that place is the Internal storage.
not working for me
[FIN]migge said:
Edit /system/etc/permissions/platform.xml file with root access rights. Find android.permission.WRITE_EXTERNAL_STORAGE and add the line <group gid="media_rw" />
find android.permission.WRITE_MEDIA_STORAGE and add the line <group gid="sdcard_rw" />
Save the platform.xml file and set the file permissions to 644.
Reboot device.
Now i can move all apps to external sd-card.
Click to expand...
Click to collapse
i have tried this but this isn't working for me. can you help.

How to gain normal, pre-KitKat Read & Write access to SD Card? (Android N)

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.

Sdcard writing permission

There is one problem with Oreo ROM.Write permission can't be given to SdCard.I have edited the lines in Root/System/etc/permission using Root Explorer by adding as follows
<permission name="android.permission.Write_EXTERNAL_STORAGE>
<group gid="sdcard_rw"/>
<group gid="sdcard_r/>
<group gid="sdcard_all"/>
After adding this I saved it and rebooted.But the write permission can't be given be to sdcard in various applications even now.What is a permanent solution for this?

Categories

Resources