Redmi Note 4X (Snapdragon) can't write to microSD-card - Xiaomi Redmi Note 4 Questions & Answers

With my Redmi Note 4X (Snapdragon) and SlimRoms 7.1.2.build.1.15 I can't write to the microSD-card when configured as mobile storage (didn't try unified-storage option and don't want to use it). Permissions for /storage/XXXX-XXXX are set like this drwxr-xr-x, which means only root has write permission.
I found a guide which suggest to add following lines to /system/etc/permissions/platform.xml :
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
Click to expand...
Click to collapse
Tried it, but after a reboot the devices gets stuck in a infinite bootloop. In platform.xml is a comment which foreshadows this behavior:
<!-- 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" />
Click to expand...
Click to collapse
Can anyone help?

I think you need to tell us more about this microSD card and how it is formatted. You do not need to edit any xml files.

Okay. I tried different cards. One is factory fresh, 32GB sdhc fat32,the other is a year old 64GB sdxc exfat. Both work fine in a different android phone and on Linux PC.
When I insert the card in my RN4X it asks what to do with it, if necessary it will format the card. In my case it didn't, because fat and exfat are supported formats.
I now tried to use the card as a unified-storage and that works fine. Unfortunately I wanted to have the option to use dual-sim now and then. So this is not a good solution for me.

Well, I am not using my microSD card as unified storage, and I haven't encountered any problem (2 different phones, 3 different cards). Have your apps that wish to write to the microSD card been given permissions to access it? Sometimes this is needed.

I suppose it is a problem with SlimRoms for RN4X. Is this also your setup?
Yes, permissions for the Apps are granted. I think this goes deeper. Like I said, I checked permissions of the storage folder, everyone else than root has read-only access. I conclude that it is not correctly mounted, so other users than root can write to it.
I can't believe I'm the only one having this problem.

Related

Logicom E500 platform.xml

I made a huge mistake. I edited the platform.xml cause i read that after i could use apps on sd card, but i made a mistake and now i cant reach my internal and external card neither, i cant reach google play. I tried to factory reset it, but not helped, just my root gone. After i succeed to root it again, but i cant edit again with ES file explorer cause its need SuperSU pro(before not needed) so i cant restore it. Please help me
Now i finally can change the file, but i havent got the original settings
Anyone can link yours platform.xml file? My settings was a similar kitkat file, but now its looks like this:
name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
</permission>
<permission name="android.permission.WRITE_MEDIA_STORAGE" >
<group gid="media_rw" />
</permission>
The group gid was different there, but i dont know what was them

[Q] How do I get media_rw folder to be read write accessible?

I have a rooted Galaxy S3 running 4.4.2 kitkat and been trying to do what I thought be simple thing and get the media_rw folder to be read write accessible.
I can do it using Root Browser as my file manager and change the permissions and it work until phone is rebooted the the permissions revert back to what they were.
I read too many threads on cures and a lot have to do with editing the platform.xml file which has been done and checked with one of the apps use to check it. I tried writing a bootup script to set permission on every boot using ROM Manager but that did not work either.
So I figure I would ask here to find out from the informed people here as to why this has this been such a pain to get working or what I am hoping is someone set me straight and tells me how to fix the problem.
Any comments on making permissions stick using android work or even why it wont work would help. I am not familiar with linux based systems just windows.
Just giving this thread a bump as per the rules to get it unburied here.
https://play.google.com/store/apps/details?id=nextapp.sdfix
https://play.google.com/store/apps/details?id=jrummy.sdfix
http://forum.xda-developers.com/xposed/modules/app-handleexternalstorage-t2693521
es0tericcha0s said:
https://play.google.com/store/apps/details?id=nextapp.sdfix
https://play.google.com/store/apps/details?id=jrummy.sdfix
http://forum.xda-developers.com/xposed/modules/app-handleexternalstorage-t2693521
Click to expand...
Click to collapse
I had tried 2 of the fixes before just tried the xposed one and still have the same problem.
The only problem I been having is to use Titanium Backup "Protect This Backup" option as I am getting operation failed when I use it.
The workaround for me was to change media_rw folder to 777 permissions which I did by using Root Browser.
The problem with that was once I rebooted the phone the permission are reset and cant access folder anymore.
I needed use this path to make Protect This Backup work /mnt/media_rw/extSDCard/TitaniumBackup
If there another path I can use that be fine too.
Make Titanium a /system/app and reboot. That should allow you to do that, I think...
es0tericcha0s said:
Make Titanium a /system/app and reboot. That should allow you to do that, I think...
Click to expand...
Click to collapse
I did that I made TB a system app and rebooted.
I could not access media_rw folder and tried protect the bacckup with /storage/extSdCard/TitaniumBackup path same result operation failed when I tried it.
Grab you system/etc/permissions/ platform.xml edit with notepad ++ or any text editor. Make sure your permissions looks like this for the sdcard:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
<permission name="android.permission.READ_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
Should fix your problem
lacoursiere18 said:
Grab you system/etc/permissions/ platform.xml edit with notepad ++ or any text editor. Make sure your permissions looks like this for the sdcard:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
<permission name="android.permission.READ_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
Should fix your problem
Click to expand...
Click to collapse
I been working backwards on this thread just trying to get rw permissions for media_rw folder I have read and tried a lot of things unsuccessfully to work and here is my edited platform.xml file to examine and you can tell me if my edits were wrong but I think there are good.
lacoursiere18 said:
Grab you system/etc/permissions/ platform.xml edit with notepad ++ or any text editor. Make sure your permissions looks like this for the sdcard:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
<permission name="android.permission.READ_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
Should fix your problem
Click to expand...
Click to collapse
I am kinda new to android and linux permission so how does adding <group gid="media_rw" /> to the platform.xml file change things?
Does it change the media_rw/ folder to make it R/W?
techmanc said:
I am kinda new to android and linux permission so how does adding <group gid="media_rw" /> to the platform.xml file change things?
Does it change the media_rw/ folder to make it R/W?
Click to expand...
Click to collapse
Correct. You have to reboot your phone after you apply these changes as well..
EDIT:
https://www.dropbox.com/s/n9lcyu7b2vnym3q/platform.zip
You forgot to add READ_MEDIA_STORAGE
lacoursiere18 said:
Correct. You have to reboot your phone after you apply these changes as well..
EDIT:
https://www.dropbox.com/s/n9lcyu7b2vnym3q/platform.zip
You forgot to add READ_MEDIA_STORAGE
Click to expand...
Click to collapse
I installed your platform.xml file you uploaded it had like 10 more lines than my file hoping it would work but I am getting a lot programs crashing now. I can replace file with the one I was using no problem but any idea why this platform.xml file not working?
It looks like its not seeing my SD card now just internal card
I just reinstalled my backup as the platform.xml was not working and was getting a lot apps to crash. I was able to restore my original platform.xml but still was having same problems with apps popping error messages. The 3 apps I used showed my phone should be working right but I cant access the media_rw folder using Titanium Backup to path it to /mnt/media_rw/extSDCard/TitaniumBackup which was only way I could get Protect This Backup feature to work. I am assuming that Titanium Backup is the problem but still cant get it to work.
Maybe someone has a Galaxy S3 4.4.2 than can post there platform.xml if there's is working with this problem.
So where nothing has worked its hard to see how the changes were supposed to work. Would it allow me to access the media_rw folder by changing its permissions or how does it work. I can do anything else with my phone and apps so not sure if its the problem or TB. Any insight would be helpful as I still learning how android OS works. Also have nandroid of phone so I can revert back it needed.
https://play.google.com/store/apps/d...=nextapp.sdfix
https://play.google.com/store/apps/d...d=jrummy.sdfix
http://forum.xda-developers.com/xpos...orage-t2693521
techmanc said:
I just reinstalled my backup as the platform.xml was not working and was getting a lot apps to crash. I was able to restore my original platform.xml but still was having same problems with apps popping error messages. The 3 apps I used showed my phone should be working right but I cant access the media_rw folder using Titanium Backup to path it to /mnt/media_rw/extSDCard/TitaniumBackup which was only way I could get Protect This Backup feature to work. I am assuming that Titanium Backup is the problem but still cant get it to work.
Maybe someone has a Galaxy S3 4.4.2 than can post there platform.xml if there's is working with this problem.
So where nothing has worked its hard to see how the changes were supposed to work. Would it allow me to access the media_rw folder by changing its permissions or how does it work. I can do anything else with my phone and apps so not sure if its the problem or TB. Any insight would be helpful as I still learning how android OS works. Also have nandroid of phone so I can revert back it needed.
https://play.google.com/store/apps/d...=nextapp.sdfix
https://play.google.com/store/apps/d...d=jrummy.sdfix
http://forum.xda-developers.com/xpos...orage-t2693521
Click to expand...
Click to collapse
Have you tried an app called FolderMount? You might want to give that one a go. It requires a reboot after the changes are detected and changed..
lacoursiere18 said:
Have you tried an app called FolderMount? You might want to give that one a go. It requires a reboot after the changes are detected and changed..
Click to expand...
Click to collapse
I tried it said it had to patch to fix something which seemed to work but when I tried to path it to use it you need to start from path /storage/emulated/0 so could not even get to media_rw folder to add to path to so I assuming with this app you cant go to the root folder to setup a folder to move. I hope I explained this right.
Anyone out there thats using Titanium Backup which was only way I could get Protect This Backup feature to work running 4.4.2 kitkat os and how did they get it to work?
techmanc said:
I tried it said it had to patch to fix something which seemed to work but when I tried to path it to use it you need to start from path /storage/emulated/0 so could not even get to media_rw folder to add to path to so I assuming with this app you cant go to the root folder to setup a folder to move. I hope I explained this right.
Anyone out there thats using Titanium Backup which was only way I could get Protect This Backup feature to work running 4.4.2 kitkat os and how did they get it to work?
Click to expand...
Click to collapse
Did reboot after it patched? If not do so then try the TB feature
lacoursiere18 said:
Did reboot after it patched? If not do so then try the TB feature
Click to expand...
Click to collapse
Did not work.
The path I am using with TB as my Backup folder location is when I cant access media_rw folder due to permissions is
/storage/extSdCard/TitaniumBackup and everything in TB is working except Protect This Backup.
Now I just gave RW permissions to media_rw folder and use this path in TB folder location to
/mnt/media_rw/extSdCard/TitaniumBackup
and I can protect and unprotect files with TB but I have to manually set the permissons to media_rw folder none of the tweaks have done that.
One of the thread I was looking at suggested to use a script to add permissions on bootup but did not work for me either.
I know I am being thick headed about making this work just irks me when I cant find the solution....
Here is the other threads link.......
Titanium Backup "Protect This Backup" fails
http://forum.xda-developers.com/showthread.php?p=54701863
added couple screenshots of using TB
Any way to add a script to add RW permissions to the media_rw folder when booting the phone so folder can be accessed?

[Q] write on sd card permissions Android 5.0.2 Lollipop

Hello guys,
as we all know with the newest Android update( version 5) the write to sd card permissions have been changed allowing developers and regular users to grant write to sd card permissions for specific apps and folders.
I managed to do that installing new file explorers , and when I tried to create a new file / folder on the sd card with the newly installed file manager (the native one already suported write to sd even in 4.4.4) whoala the option poped out:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
choosing the sd card option I was able to create and modify files on the sd.
However I still don`t know how to enter in this menu and grant write to sd permissions for a specific app without having to ``trigger`` this menu with the specific app, I want to know this because I cant ``trigger`` this with the app I most need to have it on, It is called aTorrent and as the name already suggests its for downloading torrents , if I manage to give the app write to sd card permissions I wont have to manualy cut and paste the downloaded files to my sd card.
I have already tried to ``trigger`` the pop up menu with the app trying to modify the download location and it just tells me that the app doesnt have write permissions for sd card , I tried to start downloading a torrent file located in the sd card and it showed the same message but I was able to start the download afterall this wasnt a write but a read access.
I`ve searched all over my device and couldnt find this menu, the most look alike menu is the Google Settings one , but i cant find any option to do this in that menu.
I hope there is a simple solution for this , without having to use developer console,
I look forward for your answers
Thank you in advance.
(and no my device is not rooted)
Chavalesko said:
Hello guys,
as we all know with the newest Android update( version 5) the write to sd card permissions have been changed allowing developers and regular users to grant write to sd card permissions for specific apps and folders.
I managed to do that installing new file explorers , and when I tried to create a new file / folder on the sd card with the newly installed file manager (the native one already suported write to sd even in 4.4.4) whoala the option poped out:
choosing the sd card option I was able to create and modify files on the sd.
However I still don`t know how to enter in this menu and grant write to sd permissions for a specific app without having to ``trigger`` this menu with the specific app, I want to know this because I cant ``trigger`` this with the app I most need to have it on, It is called aTorrent and as the name already suggests its for downloading torrents , if I manage to give the app write to sd card permissions I wont have to manualy cut and paste the downloaded files to my sd card.
I have already tried to ``trigger`` the pop up menu with the app trying to modify the download location and it just tells me that the app doesnt have write permissions for sd card , I tried to start downloading a torrent file located in the sd card and it showed the same message but I was able to start the download afterall this wasnt a write but a read access.
I`ve searched all over my device and couldnt find this menu, the most look alike menu is the Google Settings one , but i cant find any option to do this in that menu.
I hope there is a simple solution for this , without having to use developer console,
I look forward for your answers
Thank you in advance.
(and no my device is not rooted)
Click to expand...
Click to collapse
You need root access for this to work.
Look for platform.xml in
/system/etc/permissions/platform.xml
Open it with text editor and add the green line to this
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
</permission>
So that it looks like this
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
[COLOR="SeaGreen"]<group gid="media_rw" />[/COLOR]
</permission>
Now save it and set the file permissions to 0644 that is, rw-r–r.
Reboot and that's all.
sublinker said:
You need root access for this to work.
Look for platform.xml in
/system/etc/permissions/platform.xml
Open it with text editor and add the green line to this
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
</permission>
So that it looks like this
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
[COLOR="SeaGreen"]<group gid="media_rw" />[/COLOR]
</permission>
Now save it and set the file permissions to 0644 that is, rw-r–r.
Reboot and that's all.
Click to expand...
Click to collapse
Thank you for answering sublinker, could you clear a bit more the `` set the file permissions to 0644 that is, rw-r–r`` part in case i decide to root ?Thank you.
Chavalesko said:
Thank you for answering sublinker, could you clear a bit more the `` set the file permissions to 0644 that is, rw-r–r`` part in case i decide to root ?Thank you.
Click to expand...
Click to collapse
Get root explorer and navigate to the file. Long press on it and select permission, and you will see what I'm talking about. Here are screenies.
Final settings, 0644 or rw r r should look like this picture
Thanks
Help
I think i may have messed up a bit, I wrote the line and set the permissions, but now not only can i still not access my media in doubletwist but random apps keep crashing including titanium backup. have you any idea what might have caused this?
Just use an app
You can just install an app which will take care of it.
Just enter "sd fix" in google play aka market.
One app which takes care of the sd-card writing permission problem is "SDFix: KitKat Writable MicroSD".
It worked for me (I'm using an Xperia Z3 Compact with a rooted 5.0.2 stock ROM).
Of course you need root.
Then again, changing system files in /etc/ or any other sytem folder also requires root, the app just does it for all apps because it adds the removed permission.
How-To:
1. Root your device.
2. Install a root app (for example super su) to actually grant apps root permission.
2. Download a sd-card permission fix app (for example "SDFix: KitKat Writable MicroSD")
3. Start the downloaded sd-card fix app and grant it root permission when your super user app asks for it. Apply the patch.
3. Restart your phone (obviously you need to restart for any permission setting changes to take effect).
4. Enjoy all apps having back their good old sd-card writing privileges like they had before 4.4.4.
Excellent information.
Can you supply links for the How-To
Cheers
Hello,
I have tried all methods mentioned above. None of them completely work.
I can make new folders on sd card and copy whatever into them for the first 15 minutes after restarting the device. After that, it becomes useless again. When the device is restarted again, all data on sd card is lost.
dennnic93 said:
Hello,
I have tried all methods mentioned above. None of them completely work.
I can make new folders on sd card and copy whatever into them for the first 15 minutes after restarting the device. After that, it becomes useless again. When the device is restarted again, all data on sd card is lost.
Click to expand...
Click to collapse
Make sure you have full root and also update your busybox install.
No need for this
Just download bittorrent and move it to sd card using an app that moves other apps to sd card. Then everything you download will be in your sd. Simple as that!
sublinker said:
You need root access for this to work.
Look for platform.xml in
/system/etc/permissions/platform.xml
Open it with text editor and add the green line to this
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
</permission>
So that it looks like this
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
[COLOR="SeaGreen"]<group gid="media_rw" />[/COLOR]
</permission>
Now save it and set the file permissions to 0644 that is, rw-r–r.
Reboot and that's all.
Click to expand...
Click to collapse
This worked for me after rebooting twice and setting my extSdcard as default write disk.
Using Tablet PC T960S
Mediatek octa-core 2.0ghz
Android 5.1
niltonomnunes said:
This worked for me after rebooting twice and setting my extSdcard as default write disk.
Using Tablet PC T960S
Mediatek octa-core 2.0ghz
Android 5.1
Click to expand...
Click to collapse
Good to hear that. Enjoy your day
sublinker said:
You need root access for this to work.
Look for platform.xml in
/system/etc/permissions/platform.xml
Open it with text editor and add the green line to this
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
</permission>
So that it looks like this
Code:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
[COLOR="SeaGreen"]<group gid="media_rw" />[/COLOR]
</permission>
Now save it and set the file permissions to 0644 that is, rw-r–r.
Reboot and that's all.
Click to expand...
Click to collapse
I just did this on a device with Lollipop 5.1, and I'm copying my Titanium Backup to my SDcard1 partition right now, I'll keep a look out on whether I lose access. ES Explorer lists both SDcard0 and SDcard1 as "drw" now. Previously, I would get an error when copying to this partition.
I have 4 gb card with write permission ,after change to 16 gb card i lost the write permission.
I mentioned i'm on lollipop and no root.How to enabled write permission?

SD Card permissions - Cyanogenmod 13.0

Hello,
I faced the SD card permissions access. My OfficeSuite PRO would not recorded on SD card and many other programs. I have read different metods and that's what helped me (so I guess). I added the following lines in system\etc\permissions\platform.xml
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
<permission name="android.permission.READ_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
Restart phone.
Uninstall OfficeSuite Pro and Apps2SD and install back. Аnd veil office save to SD Card ans Apps2SD managed to Folder Mount. I have not tried other applications, only those I need for now!
I do not know if it helped but I'm happy and everything is OK.
Best regards.
Wow, maybe I'll try CM13 again, thanks to you :>
How did you push this file to system? I can't do it through file manager and when I'm pushing it through ADB it doesn't show any error, but file doesn't change...
Code:
Y:\Android\ADB>adb push platform.xml system\etc\permissions\
99 KB/s (6349 bytes in 0.062s)
It does nothing...
[Edit] Ok, done. I didn't change permissions to system in ADB. I'm a noob
[Edit] Aaaand, after all it seems it does nothing xD Link2SD can't mount, Opera can't download files to SD.
After this Periscope crashing has been decreased significantly However, Photos still can't delete from the SD card.
Hello, I used Es file explorer.
Use Sd fix in to Apps2sd(end of the menu) and i install BusyBox(if matters).

meizu meilan metal phone,some apps can't write external-sdcard

It's an android 5.1 device, what I really want is to make external-sdcard as default storage.I used xinternalsd xposed plugin,and apps regarded external-sdcard as internal-sdcard,but couldn't wrote.
I had tried to edit /etc/permissions/platform.xml,added <group gid="media_rw" /> to <permission name="android.permission.WRITE_EXTERNAL_STORAGE" > block,and restart phone.but apps just still couldn't write external-sdcard.
Some apps like "es file browser" will show a message asking me to select external-sdcard directory,will be able to write, but how can I do with the apps that didn't show the message?
BT_zaz said:
It's an android 5.1 device, what I really want is to make external-sdcard as default storage.I used xinternalsd xposed plugin,and apps regarded external-sdcard as internal-sdcard,but couldn't wrote.
I had tried to edit /etc/permissions/platform.xml,added <group gid="media_rw" /> to <permission name="android.permission.WRITE_EXTERNAL_STORAGE" > block,and restart phone.but apps just still couldn't write external-sdcard.
Some apps like "es file browser" will show a message asking me to select external-sdcard directory,will be able to write, but how can I do with the apps that didn't show the message?
Click to expand...
Click to collapse
You cant if the app does t allow it to be. Many apps prevented the ability to move to sdcards due to Google removing the code for sdcard support. They only added it back in in 7.0 with adaptive storage. But then the sdcard has to stay in the device or it won't boot.

Categories

Resources