deleted
assuming you're talking about /sdcard what is just a bind mount of /data/media/0 and not related to /external_sd MicroSD card, that indicates your whole phone storage is encrypted.
no-verity-opt-encrypt-6.1.zip does not decrypt phone, it is prerequisite to run phone unencrypted. to remove encryption, formatting userdata is required (aka factory reset)
however the mentioned zip has a bug, it will mix up file-based encryption with full-disk encryption.
Luckily it does not have any effect on read-only vendor partition, as it tries to modify /vendor/etc/fstab.* file.
official TWRP is capable of decrypting userdata partition (except for stock samsung encryption), it will ask for lock screen pin. if it's a pattern you can translate into password (not sure TWRP provides pattern screen, though)
https://twrp.me/faq/openrecoveryscript.html
if you're talking about encrypted MicroSD Card that is probably Samsungs own encryption feature and can only decrypted within the ROM itself.
https://www.samsung.com/ca/support/mobile-devices/galaxy-phone-use-a-microsd-card
deleted
Related
After a few days of googling, i stumbled upon a thread in Droid DNA forum. Which led me to this answer right from the source on why it's not possible to mount our SD Card or actually, just a folder in /data, in TWRP.
Just wanted to share and hope this will clear things up and hoping that people won't wipe their /data partition since it will delete the SD Card folder as well.
I find this very enlightening so read on.
What is a data media device?
I'm writing this page because there seems to be a lot of confusion about how many of the newer Android devices work. Starting in Honeycomb 3.0 with the Xoom, Google changed the way that they handled storage. Instead of having a "data" partition with your apps and a separate "sdcard" partition for storage, Google started giving you a single, very large data partition. Inside /data is a folder at /data/media that contains all of the contents of what you think of as your internal sdcard.
Since /data/media is part of /data, we pretty much never actually format the data partition. Formatting data, of course, also removes the media folder that contains the internal sdcard. When you choose a factory reset, instead of formatting, we use rm -rf commands to remove all the folders except for the media folder so that we can remove all of your apps and settings while leaving your "sdcard" intact. In TWRP we also have a wipe internal storage option that rm -rf's the media folder and a "Format Data" option that formats to recreate the entire file system in case something goes completely wrong or to remove device encryption.
When you're booted to Android, Android fuses the media folder to /sdcard and emulates a FAT files system that doesn't have permissions for legacy apps. We don't currently have fuse in recovery, so we just add an extra mount command to mount /data/media to /sdcard so in recovery you still have to worry about permissions on /sdcard.
Because the "internal sdcard" is not a true FAT file system, you can't mount it via USB storage. Well, that's not technically true, but the vast majority of people use Windows computers and Windows doesn't recognize ext4. If we were to allow you to mount the data partition via USB storage, Windows would claim that the device wasn't formatted and offer to format it for you, which, as you can imagine, would be a disaster. The whole ext4 setup is another reason that Android switched to using MTP for transferring files. Most of these devices don't have the necessary kernel configuration to even support USB storage mode, so it's not very easy to enable USB storage if we even wanted to try. Unfortunately at this time, MTP isn't available in recovery, so if you have no other option, you will have to use adb to push and pull files to/from your device.
As a special note, if you choose to do a factory reset from your ROM, even if the ROM says that it will wipe everything including the internal storage, well, that's not what TWRP will do. A stock AOSP recovery would format data including the "sdcard" but TWRP will use its regular factory reset setup that leaves the internal storage intact.
There are a couple of nice gains with using this setup vs the old data + FAT storage partition. With /data/media you, as the user get more control over how you use your storage. If you have a ton of apps, then that's no problem since you have a huge data partition to work with. If you don't have a lot of apps, you get more room to use for storing things like movies. Further, ext4 doesn't suffer from the 4GB file size limit that FAT has, so you can have a large, high-def movie on your device if you like. I'm sure another motivating factor was to get Android away from using FAT which is a Microsoft creation. Performance on ext4 in Android is also probably better than FAT. As a downside, data media devices tend to store a lot more app data in the "data" section and so backups on these devices tend to be larger.
Android 4.2 has changed things with /data/media devices a little bit due to the multi-user support that came in 4.2. Each user is assigned a subfolder in /data/media. The main user gets /data/media/0 and subsequent users get /data/media/10 and /data/media/11 and so on. If you switch users in Android 4.2, the system will remount the /sdcard folder to point to the proper user's folder. TWRP has been updated to use the /data/media/0 folder starting in 2.3.2.0.
Another "feature" of 4.2 is that when you "update" to 4.2 it may attempt to upgrade your /data/media to multi-user. If you're running an older version of TWRP than 2.3.2.0 or newer, a factory reset may trigger multiple upgrades, causing your "sdcard" to get moved to /data/media/0 then /data/media/0/0 and then /data/media/0/0/0 and so on depending on how many times you "upgraded". This may cause backups to not be visible in TWRP. Also, there currently isn't a good way to go back to a 4.1 ROM after using a 4.2 ROM without having to manually move your files around.
Click to expand...
Click to collapse
http://teamw.in/DataMedia
I asked them if it's possible to just mount the ext4 partition if Windows users install some apps that can read them. Will see if they're going to answer.
Hope this helps. Cheers.
Hello,
where can I see if my device is encrypted. I can't find the option.
I believe the S7 is encrypted by default, and can't be decrypted, at least not on the stock rom. At least that's what it looks like on my AT&T version.
if you are talking about sd card encryption it will be in settings - security
but if you are talking about the device by default samsung is encrypted and cannot be decrypted cmiiw
Device is encrypted out of the box
SD Card can also be encrypted
Device can only be decrypted by formatting data in TWRP
I install a stock 6.0.1 UK(BTU) ROM on a Samsung Galaxy S5 (SM-G900F).
Then I encrypt internal storage (all of it). I don't setup any unlock method.
At this point, the phone can boot by itself, there has to be a "default_password" for dm-crypt master key.
But usually when only the default password is used for encryption and user don't have to type it to boot, TWRP knows it and uses the default password to decrypt and mount the partition.
But I install TWRP and go in recovery and I can not mount /data (invalid argument). I can mount all other partitions.
My question is: is there any other tool to access the encrypted /data? Or if not, is this storage really safe without setting a password you need to enter at boot?
I know encryption without password is not secure on AOSP, but is the Samsung version secure? If so, how did they do it?
Thanks!
I've unlocked my new MI9T to install xiaomi.eu rom.
First of all, after unlock, i've installed the official TWRP and i've formatted (not wiped) the DATA partition.
I've noticed that TWRP logged that it was formatting the DATA partition with mkfs.f2fs ...... really strange...
So, i've rebooted to TWRP and changed the DATA partition type to EXT4 and formatted it... after a reboot i've tried to format it again and it was formatted again in F2FS (like F2FS was the default selection).
So i've tried to switch to OrangeFox recovery (i suspected a bug in TWRP)... but the same behaviour...seems that F2FS is the default partition type for my DATA partition.
I've installed the xiaomi.eu (the kernel in this rom is the official one, and i dont think that it supports F2FS) and the rom boot ok, without problems.
I've tried also to force ext4 on DATA, but with this partition type the rom never boot (it remains on the android bootanimation).
So right now, i see a f2fs partition type on my data partition, with original kernel.
I've tried also to change the cache partition to f2fs (by default this partition is formatted in ext4) but in this way, the rom boots, but i can't see the cache partition, seems that effectively the kernel can't mount the cache partition.
so i've unpacked the official miui_DAVINCIEEAGlobal_V11.0.4.0.QFJEUXM_5001481fbb_10.0 rom, and i've found that in the vendor partition, under (vendor)/etc/fstab.qcom there is this entry for DATA partition:
Code:
/dev/block/bootdevice/by-name/userdata /data [B]f2fs [/B]noatime,nosuid,nodev,nodiscard,fsync_mode=nobarrier,reserve_root=32768,resgid=1065 wait,check,fileencryption=ice,wrappedkey,quota,reservedsize=128M,latemount
So, this phone uses by default a F2FS partition type for DATA????
gulp79 said:
...so i've unpacked the official miui_DAVINCIEEAGlobal_V11.0.4.0.QFJEUXM_5001481fbb_10.0 rom, and i've found that in the vendor partition, under (vendor)/etc/fstab.qcom there is this entry for DATA partition:
So, this phone uses by default a F2FS partition type for DATA????
Click to expand...
Click to collapse
Yes - stock QFJEUXM 11.0.4, never formatted (or wiped) Data, see screenshot from /vendor/etc/fstab.qcom
Internal Storage 0MB unable to mount including Data thus wipe Data failed always asking for Decrypt Data
As titled, after unlocking bootloader using the unlock.sh script method, already flashed several versions of twrp recoveries yet no one can mount the Internal Storage.
Rom is still stock Security patch Oct2018 ASUS_X00TDB OPM1.WW_Phone-15.2016.1810.334-20181019 .
(I tried flashing decrypt.zip from mounted external OTG USB, it seems successful but then the Decrypt Data is still there. )
It is unbelievable that twrp unable to mount the internal storage. Any help greatly appreciated tks
formate data reboot recovery mount system, data and persist flash decrypt zip. if failed flash magisk also.
Update: not sure which one or both solved the internal storage zero issue, by:
1. flashing Disable_Dm-Verity_ForceEncrypt_11.02.2020.zip
2. in twrp, Wipe || Format Data || yes (warning: Data will be deleted in the wipe) (with the Setting "Use rm -rf instead of formatting" UNticked beforehand)