[MIUI][Tutorial][Fix] OBB folder write-protected - Android Q&A, Help & Troubleshooting

If you you're on MIUI you might have noticed that the contents of your "obb" directory might become write-protected sometimes.
I discovered that this happens because of an option called "Mock SD Card Optimization" in Developer Options.
This option is disliked by many, because it slows down your storage I/O speed, and while the name might suggest it only applies to external SD cards, it also includes the internal storage too!
If you turn off this option while already having an Android/obb directory, this directory becomes locked on next launch. Thankfully, I found a simple workaround:
1. Enable Mock SD Card Optimization temporarily. It requires restart.
2. Go to Android/obb and move (cut) all folders to another directory temporarily. This will serve as a backup.
3. Delete the obb folder.
4. Turn off Mock SD Card Optimization and reboot.
5. Again go to sdcard/Android directory and now create a new obb folder.
6. Move your backed-up obb folders back into this new obb directory.
Done! Problem Averted!

Unfortunately I can't find this feature on miui 10. My obb folder is locked and need to fix it. I only have the 2 options for mock sd

Related

[Q] Move CoPilot Live EU maps to SD card

I had RAZR XT910 IT.
I need to move CoPilot's maps to external micro SD (I had 32 GB), but I don't know how.
Can I move only maps or CoPilot app too?
Thank you for answer.
Bye.
veleno
I removed the entire application: maps took over 6 GB.
How can I install the maps on SD card? Is it possible?
veleno
Sent from my XT910 using Tapatalk
Hiya I recently faced this problem. Luckily I have a solution for you!
Solution
Modify the file "user.cfg" in "Internal storage/copilot" (in my case I've just copy the file to my sd card and modify in my desktop)
and change the value from sdcard(internal storage) to sdcard-ext (external sd card path may be different check in my files to see what path external sd is it may be external_sd or sdcard-ext)
Change wherever you see the letters "EU"
The result should look like this:
[Directories]
"AddonDir"="/mnt/sdcard-ext/copilot/EU/eu/addon/"
"AudioDir"="/mnt/sdcard/copilot/audio/"
"CitiesDir"="/mnt/sdcard-ext/copilot/EU/eu/cities/"
"GlobalAddonDir"="/mnt/sdcard/copilot/addon"
"GPSDemoDir"="/mnt/sdcard/copilot/gpstracks/demo"
"LRGeoDir"="/mnt/sdcard-ext/copilot/EU/eu/places/"
"LRGlobalSaveDir"="/mnt/sdcard/copilot/save"
"LRGPSSaveDir"="/mnt/sdcard/copilot/gpstracks"
"LRGridDir"="/mnt/sdcard-ext/copilot/EU/eu/data/"
"LRInfoDir"="/mnt/sdcard/copilot/info"
"LRSaveDir"="/mnt/sdcard-ext/copilot/EU/eu/save/"
"PolyDir"="/mnt/sdcard-ext/copilot/EU/eu/polygons/"
"RazorCacheDir"="/mnt/sdcard/copilot/save/razor_cache"
"RegionDir"="EU"
"RootDir"="/mnt/sdcard/copilot/"
"SkinDir"="/mnt/sdcard/copilot/skin/"
"SpeechDir"="/mnt/sdcard/copilot/speech"
"UIConfigDir"="/mnt/sdcard/copilot/uiconfig/"
(veleno) said:
I removed the entire application: maps took over 6 GB.
How can I install the maps on SD card? Is it possible?
veleno
Sent from my XT910 using Tapatalk
Click to expand...
Click to collapse
This is one ****ed up problem Motorola has not dealt with yet...you cant remove apps to external SD card
Yes the app will stay on the internal memory. What we are doing is changing the configuration file paths to look for the maps on the external sd card. I have just managed to get this to work. You simply copy the maps to the external sd and change the paths in the cfg file to point to the maps on the external sd wherever you you see EU in the path on the cfg file. works 100%
dbreloaded said:
Hiya I recently faced this problem. Luckily I have a solution for you!
Solution
Modify the file "user.cfg" in "Internal storage/copilot" (in my case I've just copy the file to my sd card and modify in my desktop)
and change the value from sdcard(internal storage) to sdcard-ext (external sd card path may be different check in my files to see what path external sd is it may be external_sd or sdcard-ext)
Change wherever you see the letters "EU"
Click to expand...
Click to collapse
I've tried this on Copilot Live EU 9.3.0.173 and my phone which has "Phone storage" and "SD card"
My original user.cfg file looks like:
[Directories]
"AddonDir"="/mnt/sdcard/com.alk.copilot.eumarket.premiumeupan/EU/addon/"
"AudioDir"="/mnt/sdcard/com.alk.copilot.eumarket.premiumeupan/audio/"
"GlobalAddonDir"="/mnt/sdcard/com.alk.copilot.eumarket.premiumeupan/addon"
"GPSDemoDir"="/mnt/sdcard/com.alk.copilot.eumarket.premiumeupan/gpstracks/demo"
"LRGlobalSaveDir"="/mnt/sdcard/com.alk.copilot.eumarket.premiumeupan/save"
"LRGPSSaveDir"="/mnt/sdcard/com.alk.copilot.eumarket.premiumeupan/gpstracks"
"LRInfoDir"="/mnt/sdcard/com.alk.copilot.eumarket.premiumeupan/info"
"LRSaveDir"="/mnt/sdcard/com.alk.copilot.eumarket.premiumeupan/EU/save/"
"RegionDir"="EU"
"RootDir"="/mnt/sdcard/com.alk.copilot.eumarket.premiumeupan/"
"SkinDir"="/mnt/sdcard/com.alk.copilot.eumarket.premiumeupan/skin/"
"SpeechDir"="/mnt/sdcard/com.alk.copilot.eumarket.premiumeupan/speech"
"ThemesDir"="/mnt/sdcard/com.alk.copilot.eumarket.premiumeupan/themes/"
"UIConfigDir"="/mnt/sdcard/com.alk.copilot.eumarket.premiumeupan/uiconfig/"
"UpdateDir"="/mnt/sdcard/com.alk.copilot.eumarket.premiumeupan/save/update"
And whatewer I change, Copilot always want to download new maps to the phone storage :crying:I don't know what to do
EDIT:
I foun the solution I was a little to stupid before...
My external sdcard name is sdcard2 so I did this:
[Directories]
"AddonDir"="/mnt/sdcard2/com.alk.copilot.eumarket.premiumeupan/EU/1/"
"AudioDir"="/mnt/sdcard2/com.alk.copilot.eumarket.premiumeupan/audio/"
"GlobalAddonDir"="/mnt/sdcard2/com.alk.copilot.eumarket.premiumeupan/addon"
"GPSDemoDir"="/mnt/sdcard2/com.alk.copilot.eumarket.premiumeupan/gpstracks/demo"
"LRGlobalSaveDir"="/mnt/sdcard2/com.alk.copilot.eumarket.premiumeupan/save"
"LRGPSSaveDir"="/mnt/sdcard2/com.alk.copilot.eumarket.premiumeupan/gpstracks"
"LRInfoDir"="/mnt/sdcard2/com.alk.copilot.eumarket.premiumeupan/info"
"LRSaveDir"="/mnt/sdcard2/com.alk.copilot.eumarket.premiumeupan/EU/save/"
"RegionDir"="EU"
"RootDir"="/mnt/sdcard2/com.alk.copilot.eumarket.premiumeupan/"
"SkinDir"="/mnt/sdcard2/com.alk.copilot.eumarket.premiumeupan/skin/"
"SpeechDir"="/mnt/sdcard2/com.alk.copilot.eumarket.premiumeupan/speech"
"ThemesDir"="/mnt/sdcard2/com.alk.copilot.eumarket.premiumeupan/themes/"
"UIConfigDir"="/mnt/sdcard2/com.alk.copilot.eumarket.premiumeupan/uiconfig/"
"UpdateDir"="/mnt/sdcard2/com.alk.copilot.eumarket.premiumeupan/save/update"
I shange every sdcard to sdcard2...I don't know is that correct but it works fine on my phone...When I change this in user.cfg file on phone storage, I have deleted some directories from phone storage (audio, gpstracks, info, save, speech, themes, uiconfig) becouse I thought I don't need them if after my changes in .cfg file....
When I start copilot again he creates this directories again on my phone storage, and now I have these Directories on my phone storage: audio, gpstracks, info, log, maps, pic, save, skin, speech, tablet, themes, uiconfig. But now Copilot uses only 36,2 MB of my phone storage...and I have map of whole Europe
I copy text in previous message but I cant delete this...
Here's the easy way to do this
Move the larger folders from any app to your external SD using Directory Bind:
http://forum.xda-developers.com/showthread.php?t=1410262
This may be a dumb question but please bear with me.
I edit the file changing sdcard to external_sd and save the file then reopen the file and it seems to be saved but when I launch the app it changes the entry back to sdcard. How do I get the edit to stick?
A.J.
moving maps on sdcard
area1509 said:
This may be a dumb question but please bear with me.
I edit the file changing sdcard to external_sd and save the file then reopen the file and it seems to be saved but when I launch the app it changes the entry back to sdcard. How do I get the edit to stick?
A.J.
Click to expand...
Click to collapse
Hello area1509,
I've exactly the same problem as you...
Did you find any solution ??
Ricky
this is how i got mine to work off the ext sd card.
my phone is a galaxy s2 i have 16gb internal and a 16gb sd card
you should have installed the APK and opened it 1 time.
you might have to download maps
after you are done and you have started the app and it worked
exit the app and connect USB to PC and read your internal you should see the folder
com.alk.copilot.eumarket.premiumeupan
you will have to copy this whole folder to your ext sd card
now open your user.cfg file
i changed my user.cfg to the following
[Directories]
"AddonDir"="/storage/extSdCard/com.alk.copilot.eumarket.premiumeupan/NA/addon/"
"AudioDir"="/storage/extSdCard/com.alk.copilot.eumarket.premiumeupan/audio/"
"GlobalAddonDir"="/storage/extSdCard/com.alk.copilot.eumarket.premiumeupan/addon"
"GPSDemoDir"="/storage/extSdCard/com.alk.copilot.eumarket.premiumeupan/gpstracks/demo"
"LRGlobalSaveDir"="/storage/extSdCard/com.alk.copilot.eumarket.premiumeupan/save"
"LRGPSSaveDir"="/storage/extSdCard/com.alk.copilot.eumarket.premiumeupan/gpstracks"
"LRInfoDir"="/storage/extSdCard/com.alk.copilot.eumarket.premiumeupan/info"
"LRSaveDir"="/storage/extSdCard/com.alk.copilot.eumarket.premiumeupan/NA/save/"
"RegionDir"="NA"
"RootDir"="/storage/extSdCard/com.alk.copilot.eumarket.premiumeupan/"
"SkinDir"="/storage/extSdCard/com.alk.copilot.eumarket.premiumeupan/skin/"
"SpeechDir"="/storage/extSdCard/com.alk.copilot.eumarket.premiumeupan/speech"
"ThemesDir"="/storage/extSdCard/com.alk.copilot.eumarket.premiumeupan/themes/"
"UIConfigDir"="/storage/extSdCard/com.alk.copilot.eumarket.premiumeupan/uiconfig/"
"UpdateDir"="/storage/extSdCard/com.alk.copilot.eumarket.premiumeupan/save/update"
now save your file user.cfg and put it in the com.alk.copilot.eumarket.premiumeupan folder
you can then delete the map out of the com.alk.copilot.eumarket.premiumeupan folder on the internal sd card
after you have done that you can open the app and wait for it wait for it bam it worked
copilot maps
Finally succeeded getting copilot maps to work from the external sd card of Samsung Galaxy S Blaze. First tried to modify user.cfg as described in this thread. When attempting to download the North America map, copilot would change the user.cfg back to the original with all the original locations pointing to what is the internal sd card for the Blaze. Copilot would then deliver a 'not enough space' error message as the internal sd portion of the blaze memory is under 2 gb. Then tried directory bind. This also did not work and the same out of space error popped up when downloading the large map file.
What finally did work was to download the copilot maps on another device and then transfer the maps to the Blaze external sd card. Having previously used directory bind, the copilot folder was already copied from the internal sd to the external sd on the Galaxy Blaze. Directory bind must still be used in order for copilot to access the larger map. To determine where to put the NA map file, first download a small state map like Alaska. Look in the copilot directories for this file and put the NA maps in the same location.
I assume that if the internal sd memory were large enough to accept the NA map file, directory bind would be all that is needed. I did not try to change the user.cfg file after putting the maps on the external sd and not using directory bind.
Ricky074 said:
Hello area1509,
I've exactly the same problem as you...
Did you find any solution ??
Ricky
Click to expand...
Click to collapse
Rickey I don't remember what script it was but it switched the internal memory with the SD card so the phone believed the SD card was the internal memory so I had 32GB internal but the phone is long gone.
Hope this helps a little.
Try doing it on your computer and deleting the original file and replace. If it still reverts back to default use DirectoryBind to move the data to your external_sd
read more about directory bind here - DirectoryBind
Use DIrectoryBind to map folders on the USB Storage to the external sd card. I done it now and got many large game data files installed on the external_sd of my Note including Gameloft games.
I found this thread looking for a solution for LG Optimus F3. Still can't believe the app developers haven't provided a simple checkbox yet (like most apps these days) to specify saving large amounts of static data on the SDCARD.
Anyway Directory Bind app is a bit finnicky, it loses the binds DB sometimes, plus it depends on SU working, and runs a background service that umounts and remounts SDCARD whenever the device connects to a USB. The simple solution I've used is to just modify the file /sdcard/com.alk.copilot.mapviewer/user.cfg & change every reference to '/storage/sdcard0/' to '/storage/sdcard_SD/' and then just save the NA/ and speech/ subdirs (which take up most of the space) on the sdcard, the rest of the app & data reside on the internal memory like default.
For those who cannot activate the "save maps to external SD Card" in CoPilot, here is a method to install CoPilot data including maps to external SD card.
Install the app CoPilot (fi. 9.6.x.x)
Start it, login to check license, but do not download maps
Exit app and force close app to be sure app is closed
Give CoPilot access to the external SD Card (needed on Kitkat and above!)
Either using rooted explorer or if phone is not rooted using file manager of TWRP (this can manage files as root):
Edit /system/etc/permissions/platform.xml (fi. using notepad++ on windows, be sure to keep unix file format (for LF))
Find android.permission.WRITE_EXTERNAL_STORAGE and android.permission.WRITE_MEDIA_STORAGE lines. These are XML sections. You need to make them look exactly like the strings below:
Code:
<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>
Save the platform.xml file.
It’s necessary to set the file permissions to 644 (rw-/r–/r–)
Reboot phone!
Copy folder com.alk.copilot.mapviewer to external SD card
Edit on internal SD card: com.alk.copilot.mapviewer/user.cfg and replace all references to internal SD to point to external SD:
Example (your external SD folder may have a different name!):
Code:
[Directories]
"AudioDir"="/mnt/sdcard2/com.alk.copilot.mapviewer/audio/"
"GlobalAddonDir"="/mnt/sdcard2/com.alk.copilot.mapviewer/addon"
"GPSDemoDir"="/mnt/sdcard2/com.alk.copilot.mapviewer/gpstracks/demo"
"LRGlobalSaveDir"="/mnt/sdcard2/com.alk.copilot.mapviewer/save"
"LRGPSSaveDir"="/mnt/sdcard2/com.alk.copilot.mapviewer/gpstracks"
"LRInfoDir"="/mnt/sdcard2/com.alk.copilot.mapviewer/info"
"RootDir"="/mnt/sdcard2/com.alk.copilot.mapviewer/"
"SkinDir"="/mnt/sdcard2/com.alk.copilot.mapviewer/skin/"
"SpeechDir"="/mnt/sdcard2/com.alk.copilot.mapviewer/speech"
"ThemesDir"="/mnt/sdcard2/com.alk.copilot.mapviewer/themes/"
"UIConfigDir"="/mnt/sdcard2/com.alk.copilot.mapviewer/uiconfig/"
Important: Copy this modified file (user.cfg) to external SD folder com.alk.copilot.mapviewer
Now start CoPilot and download your map.
You will see that the map will be downloaded on the external SD.
Optional: Now you can delete the internal SD folder com.alk.copilot.mapviewer
CoPilot data is now fully installed on the external SD card including your maps!

SD Card Swap and Lost Apps

I used the instructions from iJimaniac to swap my storage from internal to external (love the mass storage now!) however all my apps that I originally had moved to the SD card have suddenly disappeared and now i have to remember and re-install them. I made a copy of everything under /mnt/sdcard and moved it to my external SD card before making the switch so that everything would still be linked ok. Any ideas on what went wrong? Note: i took everything on my external SD card and put it in a separate folder on my external SD card so I wouldn't lose any of that.
Well, I used a PC to copy .android_secure folder from the real external_SD to the new "fake" external_SD. If that doesn't work, I would copy back the original vold.fstab then move all apps to internal, then use modified vold.fstab and move your apps back to sd if you want. Remember to reboot after making a change. Several reboots might even be needed for all apps to show up (might want to try that before anything). Hope this helps!
Ok well the problem is apparently that the .android_secure folder on the sd card is empty. Strangely it also has no permissions and refuses to let me change it. Whenever i try to replace it with the full .android_secure folder it gives me a black screen and i have to restart. Any idea what might be wrong?
Well, it might not actually be empty, it looks empty when viewed with an android file browser, but when you look at it on a computer (might need to disable "hide protected system files" in windows folder options) you should see stuff in it. So, you need to copy the .android_secure folder FROM your REAL microSD card TO your REAL internal memory using a pc, not an android file browser. To be clear, I have figured out that android transfers the app to your sd card when you select "move to usb storage", so that can be deceiving. Your apps were on the sd card, but now you need to transfer them to your usb storage by moving the .android_secure folder. Hope you figure it out!
Ah something decided to start working again and all my apps came back! Thanks for your help!
No problem! What was probably wrong was your player was rebuilding the dalvik-cache. It sometimes takes a while I find. Glad you got it working.

How to save to external SD card?

I have a Galaxy s3. But this pertains to any phone with a sd card.
I can access the card with root explorer just fine. I can see media on it that I placed there due to media scan.
But i cant save to it on some apps. Apps that capture pics or save stuff..in their options, it allows you to choose the directory you want to save in. But it stays in internal storage only area only.
I cant go up to main system root directory to choose the external card for a folder location...
Is there a way to do it?

[Q] Double Folder in Gallery

I have 2 of the same folders on my phone but one is /mnt/extSdCard and the other is /storage/extSdCard. Is there anyway to just have one folder instead of 2?
These two paths should point to the same directory (folder), its your external SD card, and any folders in there should only appear once in the Gallery. Are you running SD swap or anything else that may have changed your mount points?
They both point to the same directory and no I'm not running SD swap (16GB sd card) so I'm not sure why it does this but it only happens after I add photos to the folder and restart the phone.
If the double folder is only showing after a reboot, maybe the media scanner is getting confused for some reason, it might be worth trying to clear data for the Media Storage app.

[Q] LG Optimus L9 Won't Allow Access to Internal Memory Using File Manager

My carrier is MetroPCS. Since this phone only has 1.8GB of internal memory, I have a 16GB microSDHC card for external storage, but I can't move anything from sdcard0 to my external sd card in File Manager because nothing shows up on sdcard0. I want to move my pictures from sdcard0 to my external sd card, but nothing shows up under the "pictures" folder in sdcard0. I can't just make my storage option the SD card because when I do that, it's still saving on the internal memory, because apparently the phone thinks that sdcard0 is the SD card. So I need a way to change the storage option to my external card or a way to uncover these files that are hidden somehow.
I'm operating on Jellybean 4.1.2 and 3.0.31 kernel.
@pennyboard420 Welcome to XDA forums.
Your camera pictures are actually saved in the "DCIM/thumbnails" folder and not the "Pictures" (only my screen-shots are saved in the "Pictures" folder) folder and no this folder won't open with File Manager. You need a different file browser, like Root Browser that lets you see hidden files/folders. On some of them you will need root access to modify or change these files and folders.
You can't set and change your default storage location from sdcard0 to the external sdcard natively.
You would need to install an app like Link2sd or a swap script, again the device needs to be rooted.
Another Solution
xdrc45 said:
@pennyboard420 Welcome to XDA forums.
Your camera pictures are actually saved in the "DCIM/thumbnails" folder and not the "Pictures" (only my screen-shots are saved in the "Pictures" folder) folder and no this folder won't open with File Manager. You need a different file browser, like Root Browser that lets you see hidden files/folders. On some of them you will need root access to modify or change these files and folders.
You can't set and change your default storage location from sdcard0 to the external sdcard natively.
You would need to install an app like Link2sd or a swap script, again the device needs to be rooted.
Click to expand...
Click to collapse
I've tried your solution but wasn't able to get it rooted because some drivers that I needed couldn't be run on the Surface RT tablet that I have due to the tablet only allowing Microsoft developed software to run. However, I have found an alternate solution: Instead I connected my LG L9 to the tablet, opened up the DCIM/Thumbnails folder and manually copied all my pictures into the DCIM/100LGDSC folder of my external SD card.
Chances are you probably already know about this, but just putting it out there.
Thanks again.

Categories

Resources