While researching the great N7000/Galaxy-S2 sdcard FUSE deadlock bug, I've come across lots of posts that complain in the strongest possible language about how KitKat has changed the rules for SD cards.
The android police thread named "external-blues-google-has-brought-big-changes-to-sd-cards-in-kitkat-and-even-samsung-may-be-implementing-them" seems to sum things up less emotionally:
An app without any permissions has automatic read and write for designated private folders on the primary and secondary storage
An app with WRITE_EXTERNAL_STORAGE, also has:
Read and write for any public folder on the primary (built-in) storage
Read (not write) for any public folder on the secondary (SD card) storage
This implies, as many posts point out, that some of our most useful tools (file managers, backup apps, ...) will no longer work.
But I'm not seeing that - FX, even in non-SU mode, can still create folders and files and copy between cards, for example.
So what IS the (full) truth, and how does this affect Omni?
https://source.android.com/devices/tech/storage/config-example.html
Note: Anything here relating to use of the sdcard daemon for anything other than mapping /data/media to /sdcard on devices with unified storage is NEW for 4.4
Also relevant: https://github.com/omnirom/android_system_core/commit/dfe0cbab3f9039f34af1dc9e31faf8155737ec2d - this is the one that modified the sdcard fuse daemon to do all the new stuff, and it's somewhere in the set of changes starting here that the problem lies.
It can't simply be reverted out as all of the new KK perms management stuff depends on the new daemon to work properly.
would it be fair to say that they're killing off the ext card?
Google has never had a card slot in their phones. Originally, they wanted you to store everything on their servers.
The changes are needed to provide some level of security on the external card, a gaping hole prior to KK and not a whole lot better now. For a slew of reasons, you don't want any app to be able to arbitrarily read another apps data, even if on the card.
---
Posted from whatever phone booted today
Related
Hello, I have been trying to search/understand what the pros and cons are of froyo a2sd vs the one people used before it. Anybody care to explain it to me? I have found something else called a2sd+, what is that about? If there is a thread explaining this, I apologize and would like the link to it.
Froyo way:
Data is moved in encrypted form to FAT32 partition on SD card.
Pros:
Nothing needed to set it up.
Cons:
Applications don't work when SD card is mounted. Widgets can't be moved. Monitoring apps can't be moved.
Applications don't get mounted early enough, icons disappear in non-stock launchers.
Needs to be supported by app creator (can be forced to SD through hacks).
Apps2SD(+ or not):
Creating another EXT2/3/4 partition on SD card, mounting it, making all or selected apps go there. 2 ways - either by symlink or by hacking the framework (doesn't exist on Froyo yet, existed in Cyanogen 5.X).
Pros:
Everything works as if the apps are on the phone.
Cons:
SD card needs to be repartitioned. Windows won't read this card when out of the phone, only Linux (until partitioned back to standard).
No framework support in Froyo yet (CM6.1 is expected to deliver it), so only the symlink method works (moving ALL apps).
Hi folks,
the Android Media Scanner is deleting files stored on my ext. SDCard.
First I thought the card is broken but then I found this:
h_t_t_p:_/_/code.google.com/p/android/issues/detail?id=3692
Is anyone else having this issue and/or got a solution for it?
Thanks!
Edit: I am on CM7 n82 currenty
Probably own fault. Might be cause by mounting ExternalSD wrong way.
See updated thread andr. Dev.
Sent from my Optimus 2X using XDA Premium App
Media files being deleted from SD card
gonzalesdlx said:
Probably own fault. Might be cause by mounting ExternalSD wrong way.
See updated thread andr. Dev.
Sent from my Optimus 2X using XDA Premium App
Click to expand...
Click to collapse
Gonzales,
I updated from Android 2.3.4 to 2.3.6 this weekend, and the problem started. I came across both threads at the Android Developers forum, and found no solution.
You do mention above that it was "probably your own fault... see updated thread". Well, I did read the updated threads, and found no solution.
You hint that it has to do with the way the card is mounted/unmounted. And this weekend I did in fact mount/unmount the card various times, connecting it to the PC.
But what exactly did you do? Did you find a solution?
Thanks,
[SOLVED] Media Scanner Deleting Files from SD Card
OK, I believe I found the solution. Apparently the problem can be caused by the SD card being mounted and/or unmounted properly. In my case, I was connecting/disconnecting to/from the desktop PC, having the SD card as Mass Storage. At one point, Android wasn't detecting it anymore so I removed and inserted it a few times.
I did what I describe on the same thread at Android Developers: http://code.google.com/p/android/issues/detail?id=3692#c117
Here's what I wrote there:
So I did the following, and it seemed to solve.
1. Connected phone via USB to desktop PC, and dismounted card from phone, allowing data transfer to PC (via Mass Storage Device)
2. In Windows, as a test I created various folders with subfolders, with image files in them. On some I placed a .nomedia file in root and sub-folder, other only in root, others I renamed the sub-folder to start with a ".", etc. (NOTICE: I copied existing .nomedia files from other folders, as Windows doesn't allow files/folders starting with "." to be created)
3. In Windows, I ejected the USB drive politely (i.e.: I didn't just pull the cable out)
4. On phone, opened Settings/Applications/All and found Media Storage
5. Deleted data from Media Storage
6. On phone, I disabled the external access (file storage)
7. Waited patiently until SD card was detected and mounted (previously, I tried forcing that to happen by opening applications that would query the SD card)
The phone performed the Media Scan a couple of times, and ALL MEDIA FILES REMAINED THERE, where they would originally have been deleted from.
In all test folders I created from within Windows, no files were deleted. And in folders that originally had media files (which I didn't touch through Windows), the files no longer were deleted.
Anyway, this seems to have fixed it for me.
My system:
Samsung Galaxy Ace, Android 2.3.6, rooted.
An extra hint: if you feel you card access is slow, get an app like SD Booster and increase the cache size. On my device, it was as low as < 100Kb but increasing it to 1024Kb made a huge difference.
And if you don't want the media scanner to run on boot (increase boot speed), use Rescan Media Root.
Both need root access, by the way.
Click to expand...
Click to collapse
And I've had no problems at all ever since, and even mounted/unmounted a couple of times.
I encrypted my xperia v with standard android encryption menu and noticed that only /data got encrypted; internal and external memory that contains all the user file including pictures and videos remain unencrypted. sony stock roms unlike samsung galaxy devices lack the ability to encrypt the user files on internal and external SD memories.
So I'm searching for the best way to get my xperia completely encrypted. please let me know if you know a way or want to achieve the same thing.
After hours of research...
one way is to find/compile fuse.ko and use Cryptonite to create encrypted EncFS or Truecrypt volumes.
ref: http://forum.xda-developers.com/showthread.php?t=1768222
can we fuse.ko found in cyanogenmod???
Sony fixed the problem with internal SD by putting it under /data for 2013 devices, see note 1 page 19 on this white paper: http://www-support-downloads.sonymobile.com/c6602/whitepaper_EN_c6602_xperia_z.pdf
I think the same thing can be done for 2012 devices by modifying custom firmwares.
At the risk of sounding like a complete n00b, I come to you all with an issue I'm experiencing. I know it's an operator error, so bear with me;
I just recently flashed Milaq's KK build. I increased the /system partition using the new CWM w/ data/media to 512 mbs. Everything is running well, but all the apps I install are installed to the internal memory, which maxes out around 1.4 gbs. My question is, how do I make the default install location the virtual ext SD card?
I hope this makes a bit of sense to you all - because I'm about to pull my hair out here.
Thanks for any/all input on my current situation.
I understood the partition/directory structure in my previous CM7/CM9 installs.
But with the new datamedia storage configuration I'm confused to all the various labels for the memory storage areas.
I've read the document at http://teamw.in/DataMedia
but the situation is still not very transparent.
• Under Android settings I see "Internal Storage" and "SD Card" and "USB Storage".
• In ES File Explorer I observe:
/sdcard ->
/external_sd -> /storage/sdcard1
/usbdisk -> /storage/usbdisk
/storage/emulated
/storage/sdcard0 ->
/storage/sdcard1
/storage/usbdisk
• In X-plore I also observe:
/storage/0
/storage/legacy
• CM File Manager app top level directory is labeled as "0":
It appears there is various crossover in directory mappings. Is there a definitive guide as to the partitions, directory structures/mappings and symlinks that apply to the above memory areas. There is already enough contradictory posts in various development threads on this so not asking for assumptions/presumptions. Hoping to hear from an expert/developer who knows this stuff on back of their thumb.
And what controls/manages where new apps are installed?
Good Question I also would like to know
While looking around the internet, I found this as a potential option;
In terminal;
su
pm set-install-location 2
I attempted it, but haven't noticed any difference.
/bangshead/
Stryeguy said:
While looking around the internet, I found this as a potential option;
In terminal;
su
pm set-install-location 2
I attempted it, but haven't noticed any difference.
/bangshead/
Click to expand...
Click to collapse
I think you are looking at this wrong. Instead of making Android use the external storage by default, you just need to make the data partition bigger and use that as your default storage. Milaq himself suggested this partition layout:
system - 600mb
cache - 200mb
media - 400mb
data - [remaining space] (i.e. ~11.5gb for 16gb TouchPads)
If you are going to go with Milaqs builds, The best way to do it is to move all your stuff from your sd card to your computer, wipe your sd card, use tailor in webOS to repartition to match what Milaq suggested and move all your stuff back onto your device in, I think, the sdcard0 folder (which should now have the majority of the space).
jsgraphicart said:
I think you are looking at this wrong. Instead of making Android use the external storage by default, you just need to make the data partition bigger and use that as your default storage. Milaq himself suggested this partition layout:
system - 600mb
cache - 200mb
media - 400mb
data - [remaining space] (i.e. ~11.5gb for 16gb TouchPads)
If you are going to go with Milaqs builds, The best way to do it is to move all your stuff from your sd card to your computer, wipe your sd card, use tailor in webOS to repartition to match what Milaq suggested and move all your stuff back onto your device in, I think, the sdcard0 folder (which should now have the majority of the space).
Click to expand...
Click to collapse
Thank you for your response - it was exactly what I was looking for. I knew I was overlooking a step.
I'll get around to doing that tonight.
Again, thanks so much.
:cheers:
I had the same question. But I just used tailor to resize the partitions. If it says file system error, let it fix it. As long as there are free space, all your files will stay.
Just posting a follow up;
Installed Tailor and repartitioned as per Milaq's instructions, and everything is working as it should be.
Thanks for the help, guys. Glad to know it was just my reading skills that were lacking.
Hi,
Just got a new LG L90 and wanted to back it up. On my old phone, I used TB and it worked ok most of the time.
But this newer version only backs up to the internal memory which is a no-no. After I discovered that it was defaulting to internal memory, I moved the directory to the sd card, went into prefs and changed it to the sd card. I figured something was wrong when TB claimed there were no backup files in the directory when clearly there were.
But I did a backup anyway, pointing to the SD card, yet it went right back into internal memory.
No error messages, just doesn't work.
Fixable, or get something more modern?
Thanks.
fletchb1 said:
Hi,
Just got a new LG L90 and wanted to back it up. On my old phone, I used TB and it worked ok most of the time.
But this newer version only backs up to the internal memory which is a no-no. After I discovered that it was defaulting to internal memory, I moved the directory to the sd card, went into prefs and changed it to the sd card. I figured something was wrong when TB claimed there were no backup files in the directory when clearly there were.
But I did a backup anyway, pointing to the SD card, yet it went right back into internal memory.
No error messages, just doesn't work.
Fixable, or get something more modern?
Thanks.
Click to expand...
Click to collapse
I tried uninstalling and reinstalling, same thing. I looked closer and found out what is going wrong. It is defaulting to /mnt/sd but that is pointing to internal memory. I am not sure if this is a LG or Android problem but anyway, I found the real location but it won't let me select it for some reason. Did kitkat move away from /mnt locations? I am going to keep digging .. I don't know android that well but know general linux and /mnt was used for years.
fletchb1 said:
I tried uninstalling and reinstalling, same thing. I looked closer and found out what is going wrong. It is defaulting to /mnt/sd but that is pointing to internal memory. I am not sure if this is a LG or Android problem but anyway, I found the real location but it won't let me select it for some reason. Did kitkat move away from /mnt locations? I am going to keep digging .. I don't know android that well but know general linux and /mnt was used for years.
Click to expand...
Click to collapse
Google introduced new security features in KitKat. Apps are no longer allowed external sdcard access without some kind of patch. I use, with CM11 and also LG Stock, Xposed framework with 3 other modules. They are "HandleExternalStorage", "KitKat SD Card Full Access", and "XInternalSD". I also use Link2SD to help conserve user data space.
shinobisoft said:
Google introduced new security features in KitKat. Apps are no longer allowed external sdcard access without some kind of patch. I use, with CM11 and also LG Stock, Xposed framework with 3 other modules. They are "HandleExternalStorage", "KitKat SD Card Full Access", and "XInternalSD". I also use Link2SD to help conserve user data space.
Click to expand...
Click to collapse
Thanks..I did some reading and stumbled apon this info. Surprised TB is not away of the issue though. I found something in the playstore that changes permissions and now it is working.
I guess I need to relearn the newer androids as I am coming from 2.3
Thanks again.