Possible to enable Adoptable Storage - Moto X4 Questions & Answers

I've read through Android Central that there's a way to enable adoptable storage over USB Debugging without rooting the devices using sm set-force-adoptable true but when I ran the command I recieved
Error: java.lang.IllegalStateException: Adoptable storage not available on device with native FBE
Click to expand...
Click to collapse
. Does anyone know if there's a way to enable adoptable storage on it without root or understand the FBE part?

FBE stands for file based encryption. There is no way to use adoptable storage with this encryption method, and there should not be a way to disable it without root.

Related

How to encrypt external sdcard?

Hello.
Can't find option to encrypt external sdcard?
How to do it?
ksuuk said:
Hello.
Can't find option to encrypt external sdcard?
How to do it?
Click to expand...
Click to collapse
I don't think you can, I tried with Windows' encryption (BitLocker) but the phone didn't recognize the encryption and it was just showing a ****load of empty files
I tried searching for an encryption program on Windows that supports Android but didn't find anything
Hmm, I was looking something like - http://www.techverse.net/encrypt-android-phones-external-sd-card/
Seems MotoG doesn't support it.

[How-To] OTG drive ext4 support (need SuperSU)

As I am rooted without KNOX being triggered, the SELinux permissive mode cannot be enabled. That meant apps such as USB OTG Helper which supports multiple drive formats on OTG attached devices would not work. I tried Stickmount and that did not work either as an USB SDCard drive, formatted as ext4, mounted with an empty folder "/sdcard/usbStorage/sda1".
While searching to find a fix for this issue I found a post by jtaylor991 that indicated a SuperSU policy could fix the empty folder problem even with ext4 formatted drives. I made a flash file adding this policy to "/system/sh.d" which allows the policy to be implemented at boot time. Unfortunately I still had the empty folder issue with Stickmount. I next tried USB OTG Helper which I had been using on my Nexus devices and un-installed Stickmount.
After inserting an ext4 formatted OTG drive (microSD) and using USB OTG Helper to mounted the drive, an error appeared "No drives mounted (code 9)", but the ext4 OTG drive was accessable and had full RW access from directory "/storage/USBOtgDrives/drive_1".
Notes:
The mount failure code 9 can be ignored. This same message appeared on both my Nexus 5 & 10 with no ill effects.
You can configure USB OTG Helper to automatically detect and mount/unmount an OTG Drive.
Two notifications are added, one for USB OTG Helper's error code 9 and another stating "Blank USB Storage ...". The second notification cannot be cleared until the OTG drive is disconnected.
I could not get music or video files to play directly from the OTG drive. These same files copied from the OTG drive to the tablet's internal or external storage play without issue. These music/video files all play perfectly from the mSD card on a Nexus 5 and 10. So far this is the only limitation I have been able to identify. It is likely that an addition of the SuperSU policy could resolve this issue.
I did not explicitly test, all the drive formats that USB OTG Helper supports (ext2,3,4 and NTFS with RW permissions), but those formats are likely to work as well.
Requirements:
You must have a rooted device and SuperSU fully functioning.
You may also need busybox installed but I never tried this without busybox installed. USB OTG Helper has a configuration option to use its own "Internal Busybox", so try that if you do not already have busybox installed.
The SuperSU policy contained in the flash (file at end of post) can be flashed using FlashFire or a custom recovery (e.g. TWRP)
Credits:
Chainfire: For SuperSU and FlashFire apps and posting the SuperSu policy command
jtaylor991: For mentioning that Chainfire's SuperSU policy fixed his ext4 issue
Flash the file to add SuperSU policy:

Storage

The sd card in my moto x4 device doesn't show up "format as internal storage" but I'm still able to use it as external. Can somebody help me
that option is not available. don't ask me why.
it's slow AF anyway, why would you nees it?
"... File-based encryption [FBE] cannot currently be used together with adoptable storage. On devices using file-based encryption, new storage media (such as an SD card) must be used as traditional storage ..."
The Moto X4 uses FBE ...
I guess the next question will be ...
https://android.stackexchange.com/q...k-encryption-instead-of-file-based-encryption
romhippo.com said:
"... File-based encryption [FBE] cannot currently be used together with adoptable storage. On devices using file-based encryption, new storage media (such as an SD card) must be used as traditional storage ..."
The Moto X4 uses FBE ...
I guess the next question will be ...
https://android.stackexchange.com/q...k-encryption-instead-of-file-based-encryption
Click to expand...
Click to collapse
I researched this heavily while building TWRP, but abandoned it in favor of trying to build TWRP that properly decrypts the default encryption.
It seems that the fstab.qcom flag "forceencrypt" will force FDE as the default encryption.
This tag (instead of forceencrypt) is supposed to enable an encryption selection option Developer Tools:
forcefdeorfbe=/dev/block/platform/c0c4000.sdhci/by-name/metadata
Click to expand...
Click to collapse
I have not fully tested either, but I may return to converting to FDE if I can't solve FBE in TWRP
I should also note... the kernel will overwrite changes to fstab.qcom on boot, so implementation is more difficult than first glance
Hi Mightysween, Thanks for the update. I hope somebody will find a way to disable Direct Boot (and the FBE requirement that come with it).
Offtopic: I am also following your TWRP topic. Thanks for making "the process" public. It is a very interesting read. Thanks for your efforts!
is it fixed on Oreo? I mean if I update to Oreo will possible to format as internal storage?
PherChe said:
is it fixed on Oreo? I mean if I update to Oreo will possible to format as internal storage?
Click to expand...
Click to collapse
No, not yet

Is P30 Pro encrypted?

Hi,
I wasn't able to find any solid proof of my phone's storage being encrypted. I cannot find the encryption option anywhere in the phone settings, so I cannot make sure this way, and it leaves me with three options:
1) The phone's internal storate is encrypted by default as it is mandatory for Android 9 devices and it cannot even be turned off, thus this option is lacking from settings.
2) The phone's internal storage is not encrypted and cannot even be, because Huawei decided to take the encryption out of EMUI.
3) I missed something.
Which one is it?
Thank you for your thoughts
Rasokoule said:
Hi,
I wasn't able to find any solid proof of my phone's storage being encrypted. I cannot find the encryption option anywhere in the phone settings, so I cannot make sure this way, and it leaves me with three options:
1) The phone's internal storate is encrypted by default as it is mandatory for Android 9 devices and it cannot even be turned off, thus this option is lacking from settings.
2) The phone's internal storage is not encrypted and cannot even be, because Huawei decided to take the encryption out of EMUI.
3) I missed something.
Which one is it?
Thank you for your thoughts
Click to expand...
Click to collapse
It Is encrypted by default, you can't disable it
madoxx77 said:
It Is encrypted by default, you can't disable it
Click to expand...
Click to collapse
madoxx7, How do you know its encrypted by default ?
I've contacted Huawei about it, they told me encryption wasn't supported anymore.
They told me that you have to root your phonr if you want to encrypt it, but they absolutely don't allow encryption of the internal storage.
Frankwatt said:
madoxx7, How do you know its encrypted by default ?
I've contacted Huawei about it, they told me encryption wasn't supported anymore.
They told me that you have to root your phonr if you want to encrypt it, but they absolutely don't allow encryption of the internal storage.
Click to expand...
Click to collapse
I know it cause TWRP cannot access internal storage cause it's encrypted(shows random files), yeah they probably meant you need root to decrypt it, cause it's encrypted by default and you cannot do anything about it without roor.
Good to know, thanks

Question Adoptable storage became corrupted and cannot be recovered

Good day.
I used a Samsung-brand 256 Gb Sd card as adoptable storage in a Xiaomi Redmi Note 10 Pro, with TWRP. At some point the phone froze, and the card could not be mounted anymore.
I followed https://nelenkov.blogspot.com/2015/06/decrypting-android-m-adopted-storage.html
with some changes.
They key in latest 2022 MIUI was 64 byte long, so I through trial and error I found the following the dmsetup options have to be set to crypt aes-xts-plain64:sha512
in my case it was
sudo dmsetup create crypt1 --table "0 493860831 crypt aes-xts-plain64:sha512 ...(128_hex_chars-here)... 0 /dev/mmcblk0p2 0"
Click to expand...
Click to collapse
This way, I obtain a /dev/dm-0 partition, but I cannot mount it (it always fails, as if it was raw).: wrong fs type, bad option, bad superblock on /dev/mapper/crypt1, missing codepage or helper program, or other error
however, if I do "sudo xxd /dev/dm-0", I notice it contains all zeros until position 00000200 (in hex) (see attached)
I believe this means decryption was successful, but I still cannot access my files.
If I do
file -s /dev/dm-0
Click to expand...
Click to collapse
it reports it contains "data" (no recognized filesistem)
I have TWRP, but TWRP fails to decrypt adoptable storage (I think I botched it since I changed phone lock pattern after the adoptable storage ceased to work).
Can anyone provide some help?
feedmehumans said:
Good day.
I used a Samsung-brand 256 Gb Sd card as adoptable storage in a Xiaomi Redmi Note 10 Pro, with TWRP. At some point the phone froze, and the card could not be mounted anymore.
I followed https://nelenkov.blogspot.com/2015/06/decrypting-android-m-adopted-storage.html
with some changes.
They key in latest 2022 MIUI was 64 byte long, so I through trial and error I found the following the dmsetup options have to be set to crypt aes-xts-plain64:sha512
in my case it was
This way, I obtain a /dev/dm-0 partition, but I cannot mount it (it always fails, as if it was raw).: wrong fs type, bad option, bad superblock on /dev/mapper/crypt1, missing codepage or helper program, or other error
however, if I do "sudo xxd /dev/dm-0", I notice it contains all zeros until position 00000200 (in hex) (see attached)
I believe this means decryption was successful, but I still cannot access my files.
If I do
it reports it contains "data" (no recognized filesistem)
I have TWRP, but TWRP fails to decrypt adoptable storage (I think I botched it since I changed phone lock pattern after the adoptable storage ceased to work).
Can anyone provide some help?
Click to expand...
Click to collapse
Did you've tried to read the micro sd with PC?
If with PC readable, copy all to windows, format SD in phone, copy all from windows backup to phone sd
to clarify, Im not entirely sure I am using the proper decription command. I just know the keys are
Laptapper said:
Did you've tried to read the micro sd with PC?
If with PC readable, copy all to windows, format SD in phone, copy all from windows backup to phone sd
Click to expand...
Click to collapse
Adoptable storage is encripted
feedmehumans said:
to clarify, Im not entirely sure I am using the proper decription command. I just know the keys are
Adoptable storage is encripted
Click to expand...
Click to collapse
Ahh I've misunderstood you.
Try to format it new in windows, insert in phone, reboot android and format it inside android as adaptable storage
Laptapper said:
Ahh I've misunderstood you.
Try to format it new in windows, insert in phone, reboot android and format it inside android as adaptable storage
Click to expand...
Click to collapse
Thank you, I know, but I want to recover the files in the encrypted card
feedmehumans said:
Thank you, I know, but I want to recover the files in the encrypted card
Click to expand...
Click to collapse
Only idea is to try ofox recovery instead of TWRP. If not working then the files are lost - my opinion
I did just that. SD card got corrupted somehow.
Readable minus some errors on PC, so i just used dd to write the SD card contents to an .img file.
Then just used dd again to write the .img file back to a brand new SD card (same model/size).
Inserted the new SD card, booted, entered passphrase, phone rebooted (probably to fix the corrupted filesystem), and then it mounted just like if it was the original SD card.

Categories

Resources