Apps Still Have A Loophole For Writing To The SD Card. - Xperia Z1 General

The secret to modifying files on the SD card is in theMediaStore*class. It's a*Content Provider*with access to the database built by the Media Scanner. This is mostly useful to apps like the gallery and music players, but anything that wants to see locally stored images, audio, or video will probably use it.
We’re really interested in a child class calledMediaStore.Files. Its job is to give links (URIs) to apps so they can query the database for files on a specific storage device. Through this mechanism, developers can get a specially crafted link that can be used to open a file with write access.
It seems that this method works because the links actually call on the Media Store to open and edit files. Since the Media Store runs with system privileges, it is free to make changes on external storage devices. In essence, apps are able to masquerade as a system service for the purpose of writing to the SD card.
Total Commander*appears to be the first*to have discovered*and implemented this workaround. There are still a few known bugs and some devices, like the HTC One M8 with its /sdcard2 mount point, aren’t supported yet, but it’s almost completely working on the Note 3. While the code has been in Total Commander for quite some time, a*recently posted beta*cleaned up several bugs and makes it the best implementation we've seen.
Source: http://www.androidpolice.com/2014/0...ng-to-the-sd-card-on-kitkat-but-for-how-long/
Check out "Total Commander - file manager" - https://play.google.com/store/apps/details?id=com.ghisler.android.TotalCommander

I expect this will be too quickly fixed to get excited about.
What it needs is for Google to add a permission, even with loads of warnings and confirmations, to allow us to make our own choices - and allow the use of file managers and other apps that need access to the whole memory card.
I'm willing to take the risk Google!

But, this is Sony, so even if Mr. Google fixes it, it'll be sometime in 2015 before that appears on a Z1, if ever.
Sent from my SGP512 using Tapatalk

Related

Official MicroSD card support, what Google has said

So, apparently, it is still not supported and Google has no solution yet.
http://www.pcworld.com/article/2275..._details_emerge_the_little_things_add_up.html
This detail, which came out in conversations I had with Google engineers today, explains why the Android file system organization is, well, a mess, and why I’ve had such inconsistent experiences with Android and removable storage across the various Honeycomb tablets I’ve tried (and I’ve tried all of them that are available so far).
“We don’t want to expose the user to file locations,” explained Hiroshi Lockheimer, director of engineering at Google. “How do you manage that as a user? The not-good answer is with the file browser.” Lockheimer says that many of the experiences I’ve seen so far are what individual hardware manufacturers have enabled, as opposed to what Google has provided natively. The good thing is that Lockheimer says Google is looking at ways to do this; but the problem hasn’t been solved yet.
Click to expand...
Click to collapse
Is it me or does that say nothing still?
Google says they don't want to give you a file browser / file explorer / file manager.
Fine - there's plenty of third party apps to that on the market - but why not fix the SD card slot support?
Although I agree that some of the structure stuff is a bit of a mess - there's lots of random folders created on the SD card, like .android_secure, .bookmark_thumb etc. that you probably don't want end users seeing.
At least now it's clear that it's Google who has to fix the SD Card issue and not Motorola.
poisike said:
At least now it's clear that it's Google who has to fix the SD Card issue and not Motorola.
Click to expand...
Click to collapse
I honestly didn't read that at all...?
I read that google were working on some sort of file manager, not SD card? am I misreading it? as far as I can see file manager, and SD card are separate issues?
also the transformer, and custom kernels have the sd card slot working, so not sure who is at fault for the xoom
Why is there a difference between the tablet and the phones?
I have access to the SD Card and file system there.
Not like every Windows user on the planet has never seen "My Computer". Organizing files is not some obscure concept that is to high level for users.
From what I can understand:
USB file system means the OS access the usb disk in block level which the app (file browser) will have access to the full path of the file.
The one that is supported by Honeycomb right now is MTP. This is totally different compared to USB. The actual file system is implemented by the device, not by the computer's operating system.
http://en.wikipedia.org/wiki/Media_Transfer_Protocol
My prediction, this USB thing will be solved by the upcoming ICE CREAM SANDWICH.
Because by then, phone and tablet are merged ... everything which is supported by phone (like SD card) must be supported by tablet.
So, yeah, we must wait till end of this year or early next year (worse case).
Still, it is too long for Motorola with their "promise", no?
@Kcarpenter
Very true - but I think the problem may lie with the Xoom using the MTP instead?
or is that a load of rubbish?
Eitherway, I guess from the Google point of view - they want it simple and try and hide the stuff they don't want n00bs messing with (a bit like Apple hide everything too so all their iOS are n00b proof!)
Also Phones open up to mass storage straight to the card - you don't get access to the internal memory at all. Whereas with the Xoom you would want access to that because there's loads of space there
gogol said:
My prediction, this USB thing will be solved by the upcoming ICE CREAM SANDWICH.
Because by then, phone and tablet are merged ... everything which is supported by phone (like SD card) must be supported by tablet.
So, yeah, we must wait till end of this year or early next year (worse case).
Still, it is too long for Motorola with their "promise", no?
Click to expand...
Click to collapse
What about just fixing the kernel like timat's - that'd do the same job for now
Still don't understand why they would slack on getting the SD card implemented. They have so much riding on honeycomb success. And the LTE radio needs to get installed too. Time to ramp it up.
I agree they should be able to enable it considering one of our own has already done so with a custom a kernel, I still love my xoom though!
Sent from my Xoom using Tapatalk
mwaychoff said:
I agree they should be able to enable it considering one of our own has already done so with a custom a kernel, I still love my xoom though!
Sent from my Xoom using Tapatalk
Click to expand...
Click to collapse
agree completely.
and the LTE thing is running on awhile now - didnt someone say that the samsung tab 10.1 might beat Xoom to be the first LTE HC tab if Moto don't buck up?
Who needs google when you have bigrushdog?
Just did the 3.1 update and SD card slot still doesn't work. I thought it would've fixed this.
Yea, I read that article yesterday. It has NOTHING to do with the sdcard support.
Google was explaining why android in general has a fairly chaotic/unintuitive filesystem structure... NOT why they haven't biuld in support for SD.
it was well known this update was not addressing the sd slot. No wjere not one single ppace has google or moto saidnthe sd lotbwil not be active by the deadline they stated. They could give us slot access right now but the issue is as has been aluded to they would either have to give full file sys access or no file access like the phones. For those that will say it doesn't matter give us access. It matters to them as they will be creating huge issues with tech support by the much larger majority of users that would delete things that would kill or hamper the device. I mean even on here you have tons of people that can't follow clear simple directons to flash an update without screwing it up some how. Can you imagine Suzzy home maker or joe the guy who can not figure out how to do a windows update would do with full access. My guess is they will be doing a update with a file manager and permision set so nothing past the sdcard parent folder can be accessed and programs installed will have premissions set to prevent accidental delete without going into the file manger settings to change them to allow change of permisions.
This will solve both the issues and allow both sd card and internal storage access without opening up the core files to tinkering by BDUs

My experience setting up Atrix file and folder security

I was considering storing financial and personal information on my phone in the form of files and realized that though the fingerprint scanner is ok to prevent the casual browser from logging into the phone when it is left unaccompanied, a real hacker could easily see whats on there with very little effort.
The Atrix on the face of it looks like a secure phone with the fingerprint reader; however XDA users would know that nothing prevents a thief from entering fastboot and mounting the files and folders to see whats on there. No security app can prevent that.
Using the android built-in option and encrypting the entire sdcard is NOT an option for me at this time. I think its going to slow down the phone operation if the OS files are encrypted and each time it needs to decrypt each and every file and folder. Also it may present issues when testing new ROMs. (And I am dual booting - so my extSD also has a ROM which I would not want to slow down anymore than it already is)
So I searched for methods and apps to encrypt individual files or folders on the Atrix. There are quiet a few in the market and a few are free as well with good reviews. However most -even the ones with the best reviews seem to be just changing the file name and location and not doing real encryption. Also most of these use proprietary algorithms or methods to hide information. A really good app would be one that uses an open source algorithm to encrypt the files and folders - so that the algorithm would be tested and verified as being strong by the world.
Also another requirement was for the ability to frequently sync and update the files on the phone with the PC. The app should have a PC equivalent - that is the file can change on my PC and then I should be able to sync the changed file with the phone in some automated way.
Yet another requirement would be the ability to quickly encrypt and decrypt huge audio or video files. A few good apps could encrypt small audio and video files but not files of size 1GB or more. The apps would either freeze after some time or not encrypt them at all.
Finally I was looking for an option by which the files if I unencrypt them to be available across all apps for the duration of that session - not just in the app that encrypts and decrypts them. So in other words, once I enter the password, the folder should be mounted and available in any app that can browse the phone - until I decide to end or unmount the encrypted store.
I found only Cryptonite doing all of this. Unfortunately Cryptonite does not support Truecrypt containers on Motorola phones. There is some info here on the truecrypt port to android here:
http://forum.xda-developers.com/showthread.php?t=872297&page=7
However I could not get it working with the Atrix. Has anyone had success getting Kryptonite and Truecrypt to work on the Atrix?
Cryptonite also supports Dropbox, but I am not a big fan of storing sensitive info in the cloud - however well known the company is.
Cryptonite does support encFS and I was able to successfully create encFS encrypted folder on my Atrix. I would have liked to have TrueCrypt than encFS, just because I have been reading that Truecrypt has better overall support.
The method I use now for storing and synching encrypted information is:
for the first time only: create the encfs folder on the PC, then mount Atrix as a USB drive and copy the encrypted folder to Atrix.
To sync the encrypted files with the PC, I have to connect the Atrix as USB drive, open EncFS on the PC and select the folder on the Atrix to mount as a drive volume. Also mount the PC encFS folder as another drive. Now sync with the PC using any sync tool like MS SyncToy.
I went through a lot of searching and came to this which I think is good enough at the moment. I would like to hear if anyone else has a better app or method to secure and sync secured files on the Atrix - especially if you have got Truecrypt to somehow work on the Atrix. And I post this so that is anyone else needs this information, it is here.
shenoyh said:
Yet another requirement would be the ability to quickly encrypt and decrypt huge audio or video files. A few good apps could encrypt small audio and video files but not files of size 1GB or more. The apps would either freeze after some time or not encrypt them at all.
Click to expand...
Click to collapse
I don't know about the rest of it, I never used any strong security on my phone nor do I intend to, but I think you shouldn't ever expect to be able to "quickly encrypt and decrypt huge files". You're pretty much asking for impossible here. It's like asking to build a full-featured house, furnished and all, in 30 minutes or less. A lot of data will always require a lot of time to process. Heck, even, say, straight plain copying such a file to a computer would take quite a while.
No.
Your not going to get business class security on your atrix, or any current phone most likely.
LUKS manager is the closest thing to legitimate encryption (not gimicky BS) i have seen, but it has some fatal flaws.
Passwords and such are safe and easy to store with KeePass, which is also on windows/linux for syncing and has years of reputation (also free/open source). It isnt for files though.
-------------------------------------------------
Atrix 4G
Rom: Cyanogenmod 7.2 [20120805]
Recov: Romracer 5.0.2.7-atrix5
Radio: N_01.97.00R
Kernel: Faux 1.00ghz-026b1
UV: -0/-25/-50/-100/-150/-225/-300

Suggestions and thoughts about external sd card issues

After updating my n900 to 4.4.2 KitKat and facing the horrible problem of failed external sd card write, i read alot about that situation, i found alot of complains of users all over the world, i imagined a bad future to my beloved android system, i imagined that i will someday be forced to abandon the plateform and go to windows phone or jolla or tizen phone (no apple phone forever !!!), i managed to solve the problem by the workaround posted for rooted phones, but then i thought that every phone and tablet of the billion activated android phones on earth should be rooted to solve the problem and their users should be technically good to be able to root their phones and be ready to lose warranty which i thought was impossible, ability to have a file system that we could do whatever we want just as our Pcs was one of the major advantages of android operating system to the extent that some of us do not need a pc anymore or at least use it less than the past, they are killing the media editing and creation abilities of the system (just like Pc) and moving the Applish way towards only media consumption, they are removing a function that we paid for , i thought about lawsuits for this, i thought also about suggestions as making five folders by default in external sd card pictures, sounds, videos , documents and others as public folders so for example two third party apps can share the same media on pictures folder etc (not a complete sandboxing) also if app is uninstalled the media on public folders not removed with the main app, i think this solution is better than that posted by google so we prevent media generated or edited by apps to be removed when app itself is uninstalled and also prevent mirroring the same media in two different app private folders of similar purposes also no clutter as apps are allowed to write only to this public folders and their private folders, i think it is a solution in between Google wishes and users wishes and avoid most problems caused by external sd card fail write by third party apps brought unexpectedly by the KitKat update, Also a tick box in setting for allowing write access of third party apps to external sd card just as unknown sources will be more than welcomed !!!

[Q] KitKat SD card simple questions...

Okay, looking at KitKat for both my Note 10.1 and my Note 2.
I want all the updates and potential performance benefits, the only thing I'm concerned about are the SD card permission changes. I've read through various threads but still can't quite get it settled in my head. I'm not rooted on either and know that is an option but, in the meantime...
I like having my sd cards organised as I want, managed via ES explorer, directories for music, books, videos, documents etc.
I use Moon reader for my books, Poweramp for my music, Beyondpod for my podcasts.
ES file explorer to copy files between card and dropbox etc.
I like to be able to open and edit text documents from a number of apps.
I sometimes copy ebooks from my dropbox to the books folder on either device. Same thing with music and text documents if I want a local copy.
My Note 10.1 is 16GB so I use the move to sd card option for lots of apps.
What am I going to lose...?
Thanks.
If you have Root, install this app and you should be able to write to your SD card
https://play.google.com/store/apps/...utm_source=42matters.com&utm_medium=WidgetWeb
kempas said:
Okay, looking at KitKat for both my Note 10.1 and my Note 2.
I want all the updates and potential performance benefits, the only thing I'm concerned about are the SD card permission changes. I've read through various threads but still can't quite get it settled in my head. I'm not rooted on either and know that is an option but, in the meantime...
I like having my sd cards organised as I want, managed via ES explorer, directories for music, books, videos, documents etc.
I use Moon reader for my books, Poweramp for my music, Beyondpod for my podcasts.
ES file explorer to copy files between card and dropbox etc.
I like to be able to open and edit text documents from a number of apps.
I sometimes copy ebooks from my dropbox to the books folder on either device. Same thing with music and text documents if I want a local copy.
My Note 10.1 is 16GB so I use the move to sd card option for lots of apps.
What am I going to lose...?
Thanks.
Click to expand...
Click to collapse
ESFileExplorer for one. You'll have to use Samsung's My Files instead because it has universal permissions. You'll be able to open files stored by specific apps in other apps (EG: open a document created and stored on external SD by Hancom in Polaris) but you'll have to save it somewhere else because the second app won't have write permissions for a file/folder created by another app. Apps still have access to the external SD but now it's on a 1:1 basis. For example, if you have an SD folder called "Documents" that you centralized all your documents in (no matter where they were created) every app can see it and open files in it. But they can't save to it because they don't have write permissions. So Hancom can only save external SD files in a folder it created.
Google's always hated external SD and now they've made using it so cumbersome people won't want to. They say it's for security but if any app can open and read SD files and still copy or save them elsewhere what makes that more secure? Maybe I'm missing something.
Sent from my SM-G900T using Tapatalk
toyanucci said:
[YouTube Video Here]
Click to expand...
Click to collapse
Great video tutorial for those who've rooted. There's really two external SD card conversations, one for those willing to root and another for those who can't or won't. Sadly, the latter group is stuck with discussing new ways to do things involving external storage that used to work on 4.3.
BarryH_GEG said:
Great video tutorial for those who've rooted. There's really two external SD card conversations, one for those willing to root and another for those who can't or won't. Sadly, the latter group is stuck with discussing new ways to do things involving external storage that used to work on 4.3.
Click to expand...
Click to collapse
I think because of the SD Card issues I might be tempted to root although I will have to first see how it affects me whenever I do get 4.4.
Sent from Galaxy Note 10.1 2014 Edition via Tapatalk.
Geordie Affy said:
I think because of the SD Card issues I might be tempted to root although I will have to first see how it affects me whenever I do get 4.4.
Click to expand...
Click to collapse
You'll lose KNOX, screw up DRM-protected content to varying degrees, and give up access to Samsung Hub content and AllShare Cast. You can install Xposed which can trick some apps in to thinking a rooted device isn't but installing it and configuring it is a project unto itself. Not trying to sell you for or against but it's not as pain free as some folks make it out to be. Before SELinux enforcing and KNOX you could root, tweak, run TriangleAway, and unroot and you'd be as good as stock. Life's not that simple anymore. Also, If you resell your tablet it can also affect its resale value and not disclosing its altered status qualifies it for a return under eBay's buyer protection program should the buyer file a claim. I use KNOX so rooting's not an option for me.
All root breaks is Samsungs gimmicky crap no one uses anyway. There are better things out there that all work with root just fine.
GldRush98 said:
All root breaks is Samsungs gimmicky crap no one uses anyway. There are better things out there that all work with root just fine.
Click to expand...
Click to collapse
Speak for yourself. Comments like yours leave neophytes with a false sense of security and then they post "why can't I _____ after rooting?" I'm not saying root is good, bad, or indifferent. But there are people that use that "gimmicky crap" and they should know before hand that they'll potentially lose it if they root. Even if you think the alternatives are better.
I have never used Samsung Hub nor Allsharcast and I dont intend on re-selling anyways and also never use knox.
I think I'm going to start researching how to root and the rest of the stuff and might do it regardless as I'm sick of certain restrictions (main reason I left apple years ago). But at the min don't have time to spend on researching so will have to wait. I purchased extra warrenty from the store I bought it from so woste ccase I will get them to fix it if after i trip knkx I need something fixed.
Sent from Galaxy Note 10.1 2014 Edition via Tapatalk.
Thanks all, may well have to root then. Although just got a Samsung dvr/bluray combo today and that allows remote connections via allsharecast so if that works as I hope them may have to stick on JB...
I assume app move to sd card is still possible?

'Storage Access Framework' woes..

TLDR at bottom!
I am needing to finally update a specialized app to support newer frameworks. I haven't had to touch this app about 8 years or so, because it was running fine, and it did its job. Sadly, because of some of the new library requirements by Google Play, it's gotta be updated. One of these changes is handling the new Storage Access Framework / writing to storage on the device. I've read the docs that searching has pointed me, and even looked at some of the examples. Sadly, the examples seem rather limited in nature, and my app doesn't seem to fit any of the 'given' examples.
The ultimate end goal is to have the users select an output directory once. And then IN that directory, the app creates folders based on the user's project. (like, 'FrontLine', 'RearLine', 'Cement', etc..). In each of these sub-directories, then, pictures and txt files are stored. (Either downloaded via http client, or taken/generated by the user.)
I was able to implement an intent calling 'ACTION_OPEN_DOCUMENT_TREE', and I get a content URI back. However, hooking that to a Camera library (for example, the androidx.camera library) needs a File or an output stream. Trying to create an output stream then gives me an error stating that access needs to be granted using the external storage permission.
I feel liek I'm missing something 'big' and obvious to connect my user's chosen output direcory into a File or some converting that will let me mkdirs, and write out files.
TLDR; Needing user to select a base output directory, in which my app creates Project directories in it, and then allows storage of pictures or text into these directories. Tried Storage Access Framework, and despite having the user select a directory, am still getting a permission denied error when trying to create output stream.
Any pointers are more then welcome, as googling I have reached dead ends, sadly. Kinda peeved at this new 'framework' and the limited scope it seems to have. (At least, in examples..)
Thanks guys!

Categories

Resources