I have the 64 GB model Pure and a 128 GB SD. I don't like the functionality of formatting my SD as internal nor do I really need the space. I just like to keep my media and some personal files on the SD for easy access on other machines. I need to have my SD encrypted as I do have some sensitive information on there and I tried to use the formatting as internal but it makes switching between the two storage volumes a real pain. Is there any way to encrypt my SD without having to format as internal?
I had the same issue a while ago, as far as I know, encrypting the external SD natively is not possible. I believe that only Samsung implemented external SD encryption on some of their ROMs.
As for third-party implementations, you could try something like either:
* EDS (https://play.google.com/store/apps/details?id=com.sovworks.edslite) - Mount/create an encrypted Veracrypt/Truecrypt volume which is stored on the SD, to a mount point elsewhere. There may or may not be an auto-mount option, I can't remember. Downside is you have to pre-allocate the space to the encrypted volume. There is also a full version which I believe has more features.
* EncDroid (https://play.google.com/store/apps/details?id=org.mrpdaemon.android.encdroid) - Filesystem level EncFS encryption on a per-file basis. Same thing, mount point elsewhere, except encrypted files are done on a per-file basis, so no need to pre-allocate everything in one shot.
Both of these use well-known encryption algorithms and produce files which can be opened on desktop PCs with the right tools.
However, in the end I found both options to be rather troublesome, and I now store sensitive data on the internal encrypted storage, or access it remotely.
Related
Clear your doubts guys!!!
Ok, so here's the deal, in a very longwinded way that should hopefully explain everything and answer ALL questions.
You have an SD card in your phone and, a bit like normal PC Hard Drives, you can "partition" them (split them into two or more sections of different filesystems). Normally, your SD card is just one big FAT32 partition, which is fine for storing your pics, messages, emails, etc.
Now, other then your Phone's SD card, your phone will have its own internal flash memory (or "NAND") storage. Tradditionally with Android, you could only install applications to this NAND storage, you cannot install them onto your SD card. So if you have an empty 32GB SD card, but only 5Mb of internal phone storage, you still wont be able to install many apps, if any at all.
This was done to protect the apps from things like piracy - it's not easy to access the location where apps are installed on your phone's internal storage (normally impossible without root), so you can't for example buy an app, copy it, refund it, then install it again.
Still, this is no good for those of us who like to install lots and lots of apps, legitimately, as we run out of internal storage very quickly.
So Google came up with a way to install apps to the SD card. A folder is created called something like .android_secure and this stores (I believe) encrypted versions of applications, but there's a few catches:
1) Apps aren't automatically stored here, you have to manually "move" them
2) Not all apps are capable of being moved, in fact most apps aren't, the developer needs to update their app and allow it. Some apps aren't and wont be updated and some developers may not want to allow it for whatever reason.
3) Not all app data is moved, most of it is but some data is left on your phone so many people still run out of internal storage quickly.
4) You can force ALL apps to be moved to this area by default, but it breaks incompatible ones - such as Widgets, which are unable to load due to the SD card not being "prepared".
So that's Froyo's version. Before Froyo existed, some very clever people came up with a thing called "Apps2SD". Remember I said that your SD card normally is one big FAT32 partition? Well, Apps2SD works by having your SD card patitioned into TWO filesystems. A normal FAT32 partition for your usual stuff and a secondary "EXT" partition. EXT is just a filesystem, like FAT32 or NTFS, but it's the filesystem used by Android internally. The SD card is normally FAT32 because it's a "universal" filesystem, that just about any machine will be able to read, whereas EXT filesystems are generally Linux only, but I digress.
EXT has several different versions. The most common one you'll see is ext3. The main difference between ext2 and ext3 is "journaling", which is just a fancy way of saying that should an operation (such as copying, writing or reading) be interrupted unexpectedly (say, by you turning your phone off), then no data should be lost or corrupted. You know how when you turn your phone on, it says "preparing SD card"? It takes a few minutes, but what it's actually doing is checking that the FAT32 partition hasn't been damaged, because FAT does NOT have journaling. If you used a computer back in the Windows 98 days, you may remember that lovely blue "Scandisk" screen that had to run every time you didn't shut your computer down correctly - that's the same thing. But then Windows 2000/XP came along with NTFS, which also has journaling, meaning you had less chance of loosing data. But I digress once more.
So you have your SD card partitioned into EXT and FAT32. Generally it doesn't matter if it's ext3 or ext4, but you don't get any real advantage with ext4 over ext3 in this instance. Apps2SD then runs a special script on your phone which "symbolically links" the folder from your phone's internal storage where your apps are normally stored, to the ext partition on your SD card. A symbolic link is a bit like a shortcut for folders, except it's transparent to the OS: In other words, Android doesn't know that when it's installing it's apps to the internal phone storage, it's actually being stored on the SD card. This effectively boosts your internal phone memory from the previous 5mb that you had in my example above, up to whatever size you made the ext partition on your SD card (often 512Mb or 1Gb, but it depends on how many apps you install).
Plus, because it's "journaled", it doesn't need to be "prepared", meaning it's ready to go as soon as the phone starts - so your widgets and apps work immediately (unlike "forced" Froyo Apps2SD, where widgets disappear).
The catch with Apps2SD is that whatever space the ext partition takes up is taken away from the SD card. So if you have a 4Gb card (with something like 3.5Gb of actual storage) and you make a 512Mb ext partition, your SD card will "shrink" to 3Gb. The space isn't actually lost, it's just being used by the ext partition. If you reformat your card, you'll get it back.
Finally, there's a difference between "Apps2SD" and "Apps2SD+". Remember I said that your apps are stored on a special folder inside your Phone's NAND storage? Well, that was a bit of a lie. It's actually stored in TWO places. There's a second area which is called the Davlik Cache. You don't really need to worry about what this is for (Hint: IT's to do with the Java runetime your phone uses to run apps), all you need to know is that apps use it to store data, which also eats up internal phone memory. Apps2SD+ moves davlik cache to the ext partition on your SD card as well, freeing up even more space. Some people believe that this may come at the cost of performance, as the internal NAND memory should be faster than your SD card (Which is why you also get people arguing over which "class" SD card is better for Apps2SD - the logic being that a faster SD card means less impact from this move), but the truth of the matter is that your applications will be running from your Phone's RAM anyway, so performance isn't really impacted at all. Since most apps are only a few hundred Kb's in size, or a couple of MB at the most, it's a non-issue.
Finally, any recent version of Apps2SD/Apps2SD+ should work with an SD card that is or isn't formatted with an ext partition. It'll check for this partition when your phone first boots and if it's not there, just use internal phone storage.
Having an ext partition WITHOUT Apps2SD+ shouldn't cause any issues, either, so you can format your SD card whenever you're ready.
So in summary:
Apps2SD "fakes" your phone's internal memory and puts it all on a hidden section of your SD card.
Apps2SD+ pushes even more content to the SD card, freeing up even more space on the phone itself.
"Froyo" Apps2SD has various limitations that "old" apps2SD does not, but is much easier to handle as it doesn't involve any kind of "partitioning".
New android version Marshmallow has a feature to use microSD card as internal storage.
When Marshmallow detects a microSD card for the first time it asks to chose Portable or Internal storage mode.
If you choose "Use as portable storage" you will use it as before. You can save your photos, videos, some applications or their data,
backup/restore your phone, etc. and you can see your files if you take it out of your phone and connect to another device or PC, as usual.
But if you choose "Use as internal storage" and click "ERASE&FORMAT" button at next screen,
then your microSD card will be formatted as ext4 and encrypted. You will loose everything in your microSD card and it will
become your only internal storage. Now, If you take it out of your phone and connect to another device or PC, it will not possible to see your files
since it is encrypted. Your microSD is usable only with your phone.
Than, what is the advantage of using microSD card as internal storage?
If your phone's real internal storage very small (ex: 4gb) and you have trouble installing new apps then you may put a 32 GB microSD card and use it as internal storage. Then your internal storage will be 32 GB (Not total of 36GB).
It will act as your phone's internal storage.
Disadvantages?
microSD card used as internal storage is useless out of your phone since it is encrypted. You can not use it taking out of your phone and putting into another device to transfer your photos, music files, zipped ROM files etc.
It will not be visible as external storage anymore.
Phone's real internal storage is not visible.
So,
If your phone's real internal storage is not too small and especially if you want to use your external storage as usual, there is no need to use a microSD card as internal storage.
darkRd said:
New android version Marshmallow has a feature to use microSD card as internal storage.
When Marshmallow detects a microSD card for the first time it asks to chose Portable or Internal storage mode.
If you choose "Use as portable storage" you will use it as before. You can save your photos, videos, some applications or their data,
backup/restore your phone, etc. and you can see your files if you take it out of your phone and connect to another device or PC, as usual.
But if you choose "Use as internal storage" and click "ERASE&FORMAT" button at next screen,
then your microSD card will be formatted as ext4 and encrypted. You will loose everything in your microSD card and it will
become your only internal storage. Now, If you take it out of your phone and connect to another device or PC, it will not possible to see your files
since it is encrypted. Your microSD is usable only with your phone.
Than, what is the advantage of using microSD card as internal storage?
If your phone's real internal storage very small (ex: 4gb) and you have trouble installing new apps then you may put a 32 GB microSD card and use it as internal storage. Then your internal storage will be 32 GB (Not total of 36GB).
It will act as your phone's internal storage.
Disadvantages?
microSD card used as internal storage is useless out of your phone since it is encrypted. You can not use it taking out of your phone and putting into another device to transfer your photos, music files, zipped ROM files etc.
It will not be visible as external storage anymore.
Phone's real internal storage is not visible.
So,
If your phone's real internal storage is not too small and especially if you want to use your external storage as usual, there is no need to use a microSD card as internal storage.
Click to expand...
Click to collapse
No way to read or write in ext4 in pc???
jaswinprakash said:
No way to read or write in ext4 in pc???
Click to expand...
Click to collapse
Possible, on Linux
Ranpe said:
Possible, on Linux
Click to expand...
Click to collapse
But its still encrypted, so that won't help I guess. Also once you flash your phone or something, the contents won't be available anymore I think. It's just a guess though, I don't know how it is decrypted and all.
Sent from my MotoG3-TE using XDA Forums
jaswinprakash said:
No way to read or write in ext4 in pc???
Click to expand...
Click to collapse
It seems to be not possible out of your phone by anyway since it is encrypted.
I don't not know whether it is possible to extract encryption key from phone and decrypt the files using this key but this shouldn't be possible because of security reasons.
No one desires access to the important files in the sd card if it is captured by any one else.
darkRd said:
It seems to be not possible out of your phone by anyway since it is encrypted.
I don't not know whether it is possible to extract encryption key from phone and decrypt the files using this key but this shouldn't be possible because of security reasons.
No one desires access to the important files in the sd card if it is captured by any one else.
Click to expand...
Click to collapse
It is possible done it in my Lenovo A328. Courtesy of this mod:
http : / / forum.xda-developers.com / android / development / rom-flight-a328-custom-rom-based-150429-t3137708
MM brought the adopted internal storage option for SD cards, which combines your SD space with your device space. It still has a few bugs with certain apps but for the most part is pretty fluid. The traditional portable storage works as usually expected but also encounters some bugs in MM.
Personally I'm having a hard time choosing between the two and some people seem to dislike the adopted storage.
Which do you use and which do you prefer?
Now that twrp works adopted is almost mandatory for 16gb model.
I found Adoptable Storage poorly thought out and implemented. Google should've pushed devs to support it. It doesn't combine storage either. There are just two internal drives (one embedded, one SD).
Moving apps to the SD card now takes quite a few more steps. There's no overview of apps able to move or installed on the SD card, and no way to multi-select apps for moving.
On top of that, system apps completely ignore the adopted storage drive and you can't select what drive to store files on. It's supposed to be automatic, but it's not. Once you fill the eMMC, apps that don't support SD cards will start to fail as they can't store data.
Portable storage, I keep my music, movies, pictures, ROMs, and nandroids on my microsd card. Every once in a while I pop out the card and either move new media to it or move backups from my PC. I also sometimes wipe internal and accidentally wipe my roms and flashable zips, so in that case I pop out the memory card put it in my PC and download whatever I need from there and pop it back in. The option to manage media from a PC far outweighs having extra (half-baked) internal storage for me.
I haven't tried using adoptable storage yet with updated TWRP, but I find keeping the SD card as portable is more convenient if you're into flashing custom ROMs every few weeks/months. You can keep all your backups and other files on it and wipe everything else including the internal storage during clean flashes. I might look to see how well adoptable storage works now later.
nv2k said:
I haven't tried using adoptable storage yet with updated TWRP, but I find keeping the SD card as portable is more convenient if you're into flashing custom ROMs every few weeks/months. You can keep all your backups and other files on it and wipe everything else including the internal storage during clean flashes. I might look to see how well adoptable storage works now later.
Click to expand...
Click to collapse
Say you don't flash ROMs very often, and usually have backups uploaded to the cloud. I'd there a dire need for a portal SD? Also, if adopted storage is used and you flash a ROM, does that essentially wipe all the apps/data?
In your case, portable storage wouldn't be necessary. As I haven't tested it, I can't say for sure how flashing new roms would work with adoptable storage. My guess is that you would only wipe the system if you want to keep your data, but I'd do some research before going through with that.
They both suck with the 16GB model which I stupidly bought because I figured I could throw a 64GB SD card in it and be good. Unfortunately it doesn't work as advertised and I didn't find out the SD card is basically useless until after Best Buy's 2 week return window was up.
First I tried setting it up as portable. I could set Google Music to cache and download music to the SD card, but when I went to install Star Wars KOTR I was out of space. So then I formatted it as internal. It doesn't really work as expected. I was able to install all my apps including KOTR, but then Google Play Music will only cache music to the internal storage and my device was full after downloading just a few albums.
Nothing stopping you from using a different method to store music on your device.
lafester said:
Nothing stopping you from using a different method to store music on your device.
Click to expand...
Click to collapse
True, I could just download it all and copy it to the SD, but I've had issues doing that in the past. Google Play shows 2 copies of every song, one local and one cloud. Plus I subscribe to Google Play Music, there is no way to use another method to store songs that are part of the subscription that I don't own.
I've had at least one app (Geometry Dash) fail when using adopted storage. I'm using portable storage right now.
And won't adopted storage become unrecognized if you wipe /data (ex after installing a new ROM)? Seems like a pain to copy the contents of SD-Card before and after switching ROMs or restoring nandroids. I'm considering using TWRP to partition my SD-Card instead and doing a more traditional apps2sd.
Decided to start using this yesterday, was a sort of on the whim decision.
I have a 32 gig S7 and a 64 gig sd card, it is an expensive samsung SDHC EVO UHS card. (they cheaper now but was expensive when I purchased).
So previously I had internal memory which was the phone's internal storage, obviously this is not the full 32 gig as a chunk is partitioned off for OS usage.
SD card as portable storage formatted using exFAT
I noticed first when I installed superman rom I couldnt make /data F2FS, tkkg explained it is because alot of the scripts used to install the likes of magisk etc. do not support F2FS so my internal is ext4, but I managed to make the cache filesystem F2FS at least.
Likewise yesterday I discovered using the portable sdcard as F2FS is also not supported, the rom wont auto mount it and a notification appears saying its corrupted. Since I had already wiped the SD to change filesystem I decided to try adoptable storage, I enabled using the adb method and using the mixed mode so not the full sdcard is adoptable storage, in my case I chose a 50/50 split bearing in mind nandroid backups are huge, to do one single backup I need 12 gig free on the portable sdcard storage.
Interestingly I discovered the partition used for the adoptable storage is F2FS , it gets mounted under /mnt/expand/{some long random id}, I dont know the exact criteria for how parts of data get moved there but 1.8gig was utilised from the off.
Knowing its F2FS which is more resilient than exFAT, I have already moved titanium backups to the adoptable storage away from the portable sdcard storage and I plan to also move media to it as well that is currently on the portable storage.
My free space that is available for internal use is now moved from 13.6gig free out of max 25 gig to 36gig free out of a max 55gig.
I have one warning tho, I have already raised this on github to the TWRP dev's, from what I can see TWRP is not adoptable storage aware. The F2FS partition is not auto mounted in TWRP and I cannot even find a way to manually mount it (in the GUI), since some stuff from /data will get moved there it means when a nandroid backup is done parts of /data may be excluded that are sitting on the adoptable storage. Not a big deal if you doing a backup to test something, and then if you restore, its done close to when the backup is taken, but if the restore is done a long time after the backup the adoptable storage been out of sync might be an issue.
I welcome further thoughts from people.
update TWRP devs say it is supported but might be an issue with mixed mode which I will provide them more info on later.
attaching speed test
first sdcard is exfat second is f2fs Adoptable
I'm really confused what you are trying to show? Are you claiming that your sd card somehow becomes faster as adoptable storage?
I dont know if it is actually faster but it does benchmark faster probably due to using F2FS instead of exFAT.
The main reason I am preferring F2FS as it has more resilience than exFAT whilst still been fast.
Ok a little update, after my failed aatempt to upgrade to a 128 gig card, I restored the nandroid backup which I made before I first inserted the 128gig card.
Now the adopted storage is not been mounted by android, I wont be doing anything about this now as I have another 128 gig card arriving tommorow at which point I will need to setup mixed storage on that anyway, but it seems if you try to make another adoptable storage on new card, even if you have a nandroid backup, the previous adoptable storage is not preserved, suggesting the settings for it are not configurdd in a location that is included in nandroid backups.
I am not aware of a process that allows an already created adoptable storage partition to get remounted, I assume I would need to wipe the sd card again and rerun the commands to set it up which is not very user friendly.
It was running perfectly fine until I tried to make a new storage on my 128gig card, but is flawed if you are swapping out sd cards.
ok some clarification on the bench figures.
The red scard is the portable sdcard storage.
The yellow sdcard is actually the phone internal memory.
Internal memory is the adoptable storage.
So the F2FS isnt miles faster which makes sense as F2FS is supposed to be very close to exFAT in performance, faster than ext4 but not so much exFAT, however it has exFAT levels of performance with better data integrity mechanisms (exFAT has no safety mechanisms).
I found this out in two ways.
The internal memory test failed when I accidently left the bench folder read only in the adoptable storage.
I also added a custom location test of /sdcard which matched the yellow sdcard scores.
The question now is that is the slower write performance of a evo+ card going to be noticeable versus the internal storage speeds. So far indications seem no, also that by default my camera was writing to the sdcard anyway and has always worked fine.
It seems what goes on the mnt/expand or on /sdcard when device storage is specified is automatically decided by an algorithm.
Those who are want to use adoptable storage and have concerns over write speeds, there is pretty fast sdcards out there like the samsung pro which has 90mB writesm, but I think that card can only go up to 64gig in size.
Hello,
I've add a 256GB SD card on my Fire HD 10, and I set it as portable storage.
My SD card is a Sandisk micro SDXC UHS-I (V30 3U A2).
All time I logon on my Fire HD, FireOS shows me the settings page "How you will use this storage device".
Is it a known FireOS bug?
Or, do you think my SD card is defective?
SD card in Portable storage mode comes with data robed risk if I lost my Fire HD.
Thus I'd like to encrypt SD card data.
FireOS offer Encryption feature in settings.
Does someone have experience with it?
If I set this SC card as "tablet storage", does data will be able to be readable from another device?
Thanks a lot for your help and advices
Chris
If the SD card is not properly formatted as FAT32 or exFAT (or wrong alignment) Android will offer to format.
If you format as portable storage the SD card is not encrypted (recommended). If you remove the SD Card you can read it on card reader on PC later.
If you format as adoptable storage the SD card becomes encrypted and will replace the internal storage (which becomes unused). This is not recommended as the encryption key is inaccessible to nobody, therefore no way to recover data in case of failure.
Thank you alecxs.
If you format as adoptable storage the SD card becomes encrypted and will replace the internal storage (which becomes unused). This is not recommended as the encryption key is inaccessible to nobody, therefore no way to recover data in case of failure.
Click to expand...
Click to collapse
In this case, all data on SD card will be readable by anyone if I lost my pad.
Is there a way to encrypt data on a SD card formated as portable storage?
Thanks,
Chris
chrbar said:
Thank you alecxs.
In this case, all data on SD card will be readable by anyone if I lost my pad.
Is there a way to encrypt data on a SD card formated as portable storage?
Thanks,
Chris
Click to expand...
Click to collapse
I think the only way to do what you're after is with a 3rd party tool to encrypt your SD card. I suppose that's possible, but performance may be sluggish that way.
if you downgrade to Fire OS 5.6.4.0 you can use mtk-su to access the encryption key from /data/misc/vold once. this key can be used on linux PC to decrypt adoptable storage (except for FBE file-based encryption)
How to decrypt and split adopted storage?
How to partition and to have adopted storage at same time. You don't need to root your device but the device i done this with is rooted You need to enabled Developer Options. Enable the USB Debugging option. Make sure your SD card is formatted...
forum.xda-developers.com
(obviously) all other 3rd party solutions require similar additional software to decrypt container stored on portable storage.
Transparent Folder Encryption
Greetings, I'm looking for an App that would provide transparent folder encryption, along the lines of the "Encrypt contents to secure data" option on a Windows folder. One that works on a SD card, and also treats files transfers via USB cable...
forum.xda-developers.com