sd card fix - it can't be that easy - General Questions and Answers

Got a new s7 international so it's unlocked and now rooted. I was looking around for a way to avoid all those requests for permission to write to the external SD card (I don't want to format the card for use only in the phone). I found a page that recommends this:
edit platform.xml
Find <permission name=”android.permission.WRITE_EXTERNAL_STORAGE” > and add one new line:
<group gid=”media_rw” />
I'm finding it hard to believe this will work and I've never heard it before. Can anyone tell me if this would do anything, good bad or indifferent?

If you give me a link to the source I may be able to determine if this is reliable information.
Using CM12.1 on my SGH-T999

Related

[Q] EOS Android 4.2 real sdcard - permission denied

I would post this in the appropriate developer forum and thread, but I'm not allowed since I'm apparently too new so hopefully someone who has an answer is watching this space...
Anyway first I let goo manager update me to 156, not realizing that was android 4.2. Everything looked and worked great except that I had to be root to write to the actual sdcard. Then, in order to start from a fresh slate so to speak I did a TWRP install then factory reset then EOS 4.2 nightly 156 again then the gbapps xoom only. Same problem. I did a TWRP external storage wipe. Same problem. Basically when running as the default android user I'm unable to write (possibly read too, not sure) to the real sd card (/storage/sdcard1). When I su to root, it all works fine, but that's not a solution for accessing the sd card from apps.
Help! Thanks.
In case anyone cares, I was able to find the solution here: http://www.thriveforums.org/forum/t...te-access-android-3-2-if-youre-rooted-12.html .
Basically, you edit /system/etc/permissions/platform.xml and add the following:
<permission name=”android.permission.WRITE_EXTERNAL_STORAGE” >
<group gid=”sdcard_rw” />
<group gid=”media_rw” />
</permission>
eos nightly on xoom wifi
What is your opinion of 4.2 on tablet? Trying to decide to go ROM, or wait until partition issue resolved to run ota. 4.2.1 on gnex has some nice features, like swipe typing, but wonder if it is worth all the work for my Xoom wifi. Thanks.
Basically, you edit /system/etc/permissions/platform.xml and add the following:
<permission name=”android.permission.WRITE_EXTERNAL_STORAGE” >
<group gid=”sdcard_rw” />
<group gid=”media_rw” />
</permission>[/QUOTE]
I'm going to try that
virtuallypete said:
What is your opinion of 4.2 on tablet? Trying to decide to go ROM, or wait until partition issue resolved to run ota. 4.2.1 on gnex has some nice features, like swipe typing, but wonder if it is worth all the work for my Xoom wifi. Thanks.
Click to expand...
Click to collapse
I would wait. 4.2 is pretty slow on my Xoom and I saw some other guys with the same issue.
Sent from my SAMSUNG-SGH-I747 using xda premium

Platform.xml fix for KitKat SD Card woes not working anymore?

Guys, please help me. I'm really, really pissed now for this Samsung BS!
I upgraded my Note 3 to NB4 (France) and of course, I could not able to access my external SD Card. There was a fix for the platform.xml, I followed the instruction to the T (note that I was successful in doing the same when I first upgraded to KitKat) but it still could not be detected, nor read.
Please if anyone knows the solution to this, please let me know.
Thanks.
It actually works using solid explorer to edit the platform.xml. And yeah. You have to be rooted to do so.
gidzdlcrz said:
It actually works using solid explorer to edit the platform.xml. And yeah. You have to be rooted to do so.
Click to expand...
Click to collapse
Still didn't work. I used Solid Explorer and am rooted.
After adding this:
<group gid="media_rw" /> to the WRITE_EXTERNAL_STORAGE,
like so:
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
Do I have to set the platform.xml's permission to rw-r-r? I did that but still not working.
You may need to reflash a new one.
gidzdlcrz said:
You may need to reflash a new one.
Click to expand...
Click to collapse
Reflash a new what? Platform.xml? I backed up the original file for safekeeping.
I mean. Flash a new clean firmware. It happened to me before. That solves my prob.
I lost count of how many times I've flashed this French firmware just because of this issue, and still no luck.
Sent from my SM-N9005 using Tapatalk
Try Root Explorer and grant root access for it.
After edidting the platform file reboot your phone.
BN3
Sent from my SM-N9005 using Tapatalk
mdfpido said:
Guys, please help me. I'm really, really pissed now for this Samsung BS!
Thanks.
Click to expand...
Click to collapse
Just a little blame correction, it's not Samsung, it's Google.
Give a credit where credit is due.
I read somewhere Samsung fixed this google mess in NB5.
Dahdoul said:
Try Root Explorer and grant root access for it.
After edidting the platform file reboot your phone.
BN3
Sent from my SM-N9005 using Tapatalk
Click to expand...
Click to collapse
Try this....
http://forum.xda-developers.com/showthread.php?p=50837230
Sent via Hondata F.PRO + N3 NOS

[FIX] SD Card Write Restriction ALL Firmwares and Models

Hi!
This is my first thread and I just wanted to share this information about SD card write restriction on Samsung devices with you.
I found a solution when I was having a problem of my own.
Description of problem:
I have a Galaxy Tab 4 10.1 SM-T535 running Lollipop 5.0.2 but this problem also happened while on KitKat 4.4.2. So, my navigation app downloads maps from its server, it's normal, right? And it gives me choice whether I want to download it to the internal or external storage, that's normal too. But just as it finished downloading it'd say that it can't load the map from external memory 'cause... "f*** you"...? THAT is NOT cool. And after some research I found this solution.
Solution:
Fixing this problem can be easily done if you have root access. Here’s how you can do it (Please be aware that you’re performing these changes on your own risk!):
1. Make sure that you have root access
2. Perform a NANDROID backup to be completely safe
3. Use a root-enabled file manager (like the paid version of Root Explorer, you can get it from... many sources ) and navigate to /system/etc/permissions
4. Edit platform.xml and find “WRITE_EXTERNAL_STORAGE“
5. Add an additional group definition for this permission: <group gid=”media_rw” />
6. Save the changes and restart your device
You are now able to write on your external SD card again!!!
I hope I helped someone with this thread.
GOOD LUCK!
Source: trendblock.net - How To Fix KitKat SD Card Write Restriction

App can't access SD card on CM13

I'm using Voice Recorder when I'm on stock to record song ideas and I keep them on my SD card so I don't lose them through my ROM experiments.
But when I'm on CM I can't access the SD card. I get this error "No access - Please choose another folder".
I gave it all the permissions I could but I still get the error.
How can I get this to work?
Thanks!
Prosis said:
I'm using Voice Recorder when I'm on stock to record song ideas and I keep them on my SD card so I don't lose them through my ROM experiments.
But when I'm on CM I can't access the SD card. I get this error "No access - Please choose another folder".
I gave it all the permissions I could but I still get the error.
How can I get this to work?
Thanks!
Click to expand...
Click to collapse
You might need the "SD card fix for Kit Kat"
Sent from my SCH-I535 using Tapatalk
Droidriven said:
You might need the "SD card fix for Kit Kat"
Sent from my SCH-I535 using Tapatalk
Click to expand...
Click to collapse
Before can you check you permission file ?
If a line of code is missing SDcard fix for KK can solve you problem, but don't forget to do a backup of your file :silly:
(same if SDcard do it too)
Often this line of code seem like
<group gid="media_rw" />
in
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
bricex308 said:
Before can you check you permission file ?
If a line of code is missing SDcard fix for KK can solve you problem, but don't forget to do a backup of your file :silly:
(same if SDcard do it too)
Often this line of code seem like
<group gid="media_rw" />
in
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
Click to expand...
Click to collapse
Where do I find this permission file?
Prosis said:
Where do I find this permission file?
Click to expand...
Click to collapse
You aren't understanding. To simplify this for you, do a google search for:
"SD card fix for KitKat"
That was the whole point of putting it in quotation marks the first time I mentioned it.
That should give you many different links to go through with various methods. Find the various methods of fixing this for KitKat and find one that works for you.
Sent from my SCH-I535 using Tapatalk
Droidriven said:
You aren't understanding. To simplify this for you, do a google search for:
"SD card fix for KitKat"
That was the whole point of putting it in quotation marks the first time I mentioned it.
That should give you many different links to go through with various methods. Find the various methods of fixing this for KitKat and find one that works for you.
Sent from my SCH-I535 using Tapatalk
Click to expand...
Click to collapse
Oh I know, I was actually answering bricex308
Prosis said:
Where do I find this permission file?
Click to expand...
Click to collapse
In my mind i think it's better to wait someone with Best knowledge than me on Cm, longtime i'm not on.
Maybe can you send the list of folder of root directory....
Or try reboot on your cwm, twrp...if you have something like
Advanced option > fix permission...
But i prefer said you, if you aren't sure what you are doing, don't try or expect someone more competent than me.
Prosis said:
Where do I find this permission file?
Click to expand...
Click to collapse
What I meant was finding that permission file is pointless, just do the search for the SD card fix for KitKat and give it a try.
Sent from my SCH-I535 using Tapatalk
Tried all of that but with no luck... :/
Prosis said:
Tried all of that but with no luck... :/
Click to expand...
Click to collapse
Try XternalSD or Marshmallow SD fix. They're both xposed modules so you'll need to install the xposed framework first.

[Completed] GT-I9060L stuck in bootloop after setting up "Android Device Manager"

Ok, so I think I was prepared for something like this, but it seems that this is too much for me:
(I don't want to bother any of you, so you can skip the story and go to the summary down there)
I have a very normal Samsung Galaxy Grand Neo, GT-I9060L (the "L" stands for latin, as I'm chilean). Since with an older phone (Galaxy Y) I had some... issues, this time I wanted to play safe and decided to not root it. Ok, so no problem since 2014... until now. This morning I went to the Google's Android Device Manager website, and noticed that, where the buttons "Lock" and "Erase" should have been, there was something like "Setup Lock & Erase". I didn't do that before? So I clicked it, and it sent a notification to my phone, requiring the activation of "Android Device Manager" as a "Device Administrator". Ok, I read and accepted. The problem then began. I mean, the phone rebooted immediately, and it got stuck in the "SAMSUNG" splash screen, with a little vibration every few seconds (usually it's once, and then it shows the lock screen). Damn! As I had enabled USB Debugging, I thought that I could do something to at least backup the data there. Well, executing `adb devices`, and trying different states of the phone (I can get it to recovery mode, and ODIN mode, but not to safe boot), the only things that I could get to were "offline" (Linux) or "unauthorized" (OS X) under Recovery Mode (there wasn't anything to do, as any command lead me to an "error: device offline."), and "sideload" under Recovery Mode > apply update from ADB, which I think is one of the two only ways to try a firmware update (I don't know if that would solve anything), but I don't know if it would delete any data. Going to the main boot loop and trying `adb wait-for-device` didn't work (it just goes offline), so there isn't a way to get the phone to a normal state of "device" in adb (in other words: i cannot start the daemon on the phone, I suppose). Another thing I could do is to install Kies and try that "Firmware Upgrade and Initialization" thing, but I'm afraid that it could also mean to wipe the data there. I don't want to do so.
I'm sorry, I always write that long (in every language...), but at least there are more details with all of it.
So, summary:
– Grand Neo stuck at the SAMSUNG boot screen, right after setting Android Device Manager as a Device Administrator.
– USB Debugging is enabled, the phone is not rooted, and the firmware is the official, I mean, never touched.
– Some time ago I dumped the ".pit" file and also got the firmware (I9060LUBUANG1) from samsung-updates, just in case.
– I can get the phone to Recovery and ODIN modes, and so I just could do `adb sideload <file>` with some <file> (zip?).
– Can't even wipe the cache partition. I think it's game over with that one.
– I could try reinstalling the firmware with Kies, but don't know (as it doesn't recognize the phone) if I could do a backup.
– I don't want to wipe, erase, nor delete any data in the phone. It's the last resource for me.
Could I get some help with this? What should I do? ADB sideload? Kies? Something about Heimdall? I use OS X, but I've got a Pi, so there shouldn't be any problems with software (also, I've got a super-slow-netbook with Win XP hidden somewhere... I wish I could install Win 10 in Boot Camp inside this MBP Mid 2009). Thank you if you get to read this, and try to understand and help me with this.
Also, I'm sorry if this doesn't belong here (or anywhere...), but I couldn't post this on the Grand Neo forum (and it confuses me: is that forum for I9060i Grand Neo Plus as it states or for every I9060?).
Hi !
Please refer to this forum
https://forum.xda-developers.com/t/galaxy-grand-neo
Good luck !
Thaanks i solved it!!
xanthrax said:
Hi !
Please refer to this forum
https://forum.xda-developers.com/t/galaxy-grand-neo
Good luck !
Click to expand...
Click to collapse
Oh, simply thank you! Thanks to you I solved it! I owe you my phone's warranty!! (now voided, but whatever!)
[((Solution: DELETE THAT FILE `/data/system/device_policies.xml` through any recovery that lets you delete such file))]
You know something? I looked there before, but after your post I decided to go further (on my own!) into that forums, did some research about some things... and decided to flash a recovery. And I researched that it wouldn't do anything to the partitions I didn't want to lose, because the recovery has its own partition. Well, looking into the Grand Neo forum, I chose the TWRP recovery over the CWM one, because the latter was way older. And as I don't have Win, I used Heimdall with my Pi (Raspbian), but when I started I had some problems with the connection to the device. I discovered that the problem that I had with this version of the Heimdall package (1.4.0) had been already solved with the commit #329 on GitHub, so I tried compiling from source, and it successfully worked.
Then, I got amazed because, on recovery, I could get root access to every file, and also the device was detected over ADB as "recovery", and could do everything. Gladfully, I copied every file in the internal storage and the external SD Card to my Mac, then formatted the SD, then made backups of the Data and System partitions. Later, I discovered the difference between the Data, System, Internal Storage, Micro SD Card, Cache, Dalvik Cache, and Recovery partitions.
So if anyone out there wants a bit of info (at least about my phone), the System partition works like the Mac's System folder, containing things that almost never get modified by the end user, unless you flash some image to that partition (a custom or stock ROM, ideally), or delete accidentally causing broken things. The Data partition is mounted in /data, and contains (almost) everything that gets modified over the time. It also contains mount points for the Internal Storage, at /data/media/0 (there are several mount points for this over all the drive, and it's quite confusing), and I don't know exactly, but I think for Dalvik Cache and the Cache. The Micro SD Card partition is almost independent from everything else, but it also has several mount points along the Internal Storage one. the Cache is, well... the cache, and is mounted at /cache. The recovery partition is what I touched, and I think it explains itself a lot if you've used a Mac (pressing command+R at startup). The Dalvik Cache is quite interesting. I think it's mounted at /data/dalvik-cache, but I'm not sure. Well, it apparently has "optimized" versions of your apks stored in /data/app.
When I thought that wiping the Dalvik Cache would solve something, I discovered that the phone almost booted properly, but came back to the boot loop after the process of "optimizing" all of my 157 apps, with the difference that the device got recognized this time (only when booting after wiping the Dalvik!) by the ADB as a "device". Well played, at least. I went back to TWRP and made a backup of the Data, so now I can come back to that error whenever I want.
As I could get back in time, I decided to look for that little thing that was preventing my phone from booting. First, I dumped over 15 MB of logs, by ADB, the Recovery and the Shell. Now I can see that everything relates to some "policies" (more on that later). Then, I wiped the /data partition, as I had a backup. And I saw the phone booting to that "Welcome to your new Android!" thing. Thanks, the problem wasn't on the system! It was the Data! And, to confirm myself, I went to the settings, and activated that Google Device Administrator Thing again. Boom! Bootloop. It got wiped again by me, just to go there and do some "testing". I was going to see exactly what changed with that option, so went to that menu, and just before "pressing the button" (!), I went to recovery, and got every regular folder and regular file (because any symlink and stuff just made the copy fail) copied from /data to my computer. Then, I booted the phone, changed the setting, powered it off, and copied the /data again. In bash I made a `diff -r`, and also listed (from the original /data that I wanted to recover) every file there (this time of any kind) and on my computer sorted them all by date, to see the last files touched. Well, the diff resulted on various things, like a new line on the file /data/data/com.android.settings/shared_prefs/com.android.settings_preferences.xml:
Code:
<boolean name="pref_device_provision" value="true" />
It wasn't so important, as I deleted it and rebooted and nope, the bootloop continued. Backup restored again.
Then, something more interesting on the file /data/data/com.google.android.gsf/shared_prefs/update.xml: some name "provisioned" changed its value from zero to a UNIX timestamp in milliseconds. I didn't do anything on that because it wasn't so important, a timestamp. There was a ton of files with such timestamps, and also some new files from certain background apps, and the diff also showed up several xml files differing because the sorting. Dismissed all that and kept looking, and...
THERE IT WAS:
Code:
Only in /Users/Benja/Desktop/pos/data/system: device_policies.xml
(for the record: there was a "pre" and a "pos" folder, one for each /data)
I HATE IT. Out of rage, I looked at the file:
Code:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<policies>
<admin name="com.google.android.gms/com.google.android.gms.mdm.receivers.MdmDeviceAdminReceiver">
<policies flags="28" />
<allow-storage-card value="true" />
<simplepassword-enabled value="true" />
<allow-wifi value="true" />
<allow-text-messaging value="true" />
<allow-popimap-email value="true" />
<allow-browser value="true" />
<allow-internet-sharing value="true" />
<allow-bluetooth-mode value="2" />
<allow-Desktop-Sync value="true" />
<allow-IrDA value="true" />
<require-StorageCard-Encryption value="false" />
<allow-list-thirdparty value="" />
<block-list-InRom value="" />
<allow-unsignedapp value="true" />
<allow-unsignedinstallationpkg value="true" />
</admin>
</policies>
THAT FILE WAS CAUSING ALL OF THIS. There was also a backup of that file, that had nothing else than the xml header and an empty `<policies />`. But well, that file appeared also in the list of the most recently touched files (it took a while to do that list, because I couldn't figure out a better way than listing /data recursively and with full dates with the `-re` options (looked up for those at the help there, because the options were different and `find` didn't have printf) and parsing it with awk (stackoverflow #1767384), then on my Mac did the rest of the date parsing and sorting with date and cut and date again).
I DELETED THAT FILE `/data/system/device_policies.xml` (and obviously made a backup, even though I'll never want to bootloop it again, lol). Then rebooted and... finally I was able to see again my Little Prince lock background: Il tomba doucement comme tombe un arbre.
Now I'm restoring the files that I got from the Internal and External Storages. Then everything will continue as usual. Thank you so much for referring me to that forum again.
Also, after all of this, I googled the file and magically found this russian website (to prevent spamming, I cannot post a href): http://juick.com/PoZitron/2801749
That site (through the Google Translator (irony)) had just the info that I'd want to have read before (in russian, lol).
Well, as the site points, всегда делайте бэкапы!
Thanks again, and good luck to everyone else with problems out there.
Hi !
I`m glad you solved it , thanks for letting us know
Cheers !
thread closed

Categories

Resources