TeamWin / Team-Win-Recovery-Project

Core recovery files for the Team Win Recovery Project (T.W.R.P) - this is not up to date, please see https://github.com/TeamWin/android_bootable_recovery/
http://twrp.me
1.96k stars 740 forks source link

titan Moto G 2014 - Could not mount /data and unable to find crypto footer. #1475

Open lpla opened 5 years ago

lpla commented 5 years ago

Device codename: titan TWRP version: 3.3.1-0

WHAT STEPS WILL REPRODUCE THE PROBLEM?

Encrypt data partition from Android 8.0 or 9.0 OS, then run TWRP recovery.

WHAT IS THE EXPECTED RESULT?

Password/PIN is requested at the very beginning of TWRP recovery boot and data partition is decrypted

WHAT HAPPENS INSTEAD?

Password is not requested, data is not decrypted and error is shown.

ADDITIONAL INFORMATION

Latest version 3.3.1-0 and 3.3.0-0 is not working well with Android 8.0-9.0 data encryption. When recovery loads it shows

Could not mount /data and unable to find crypto footer.
Failed to mount '/data' (Invalid argument)
Unable to recreate /data/media folder.
Updating partition details...
Failed to mount '/data' (Invalid argument)
...done
Unable to mount storage
Failed to mount '/data' (Invalid argument)
Full SELinux support is present.
Unable to mount /data/media/TWRP/.twrps
MTP Enabled

And then I am unable to load anything from internal memory. Version 3.2.3-0 looks like it can decrypt data partition perfectly but it is not working well with Android 9.0 specifically, so I need latest TWRP version fixed to flash 9.0 updates with encrypted data partition.

Anything else I could do? Should I report this anywhere else?

Looks like other people had this problem with other phones: TeamWin/Team-Win-Recovery-Project/issues/747 TeamWin/Team-Win-Recovery-Project/issues/1141 TeamWin/Team-Win-Recovery-Project/issues/1265

(just search "Could not mount /data and unable to find crypto footer." on Google)

Pastim commented 5 years ago

I have a very similar problem on an encrypted moto G 4G peregrine with an Internal SD Card. 3.3.1 reports:

[code]I:Setting up '/data' as data/media emulated storage. I:Created '/sdcard' folder. I:Can't probe device /dev/block/mmcblk0p36 I:Unable to mount '/data' I:Actual block device: '/dev/block/mmcblk0p36', current file system: 'f2fs' I:Can't probe device /dev/block/mmcblk0p36 I:Unable to mount '/data' I:Actual block device: '/dev/block/mmcblk0p36', current file system: 'f2fs' E:Unexpected value for crypto key location Could not mount /data and unable to find crypto footer. I:Setting up '/data' as data/media emulated storage. I:Can't probe device /dev/block/mmcblk0p36 I:Unable to mount '/data' I:Actual block device: '/dev/block/mmcblk0p36', current file system: 'f2fs' I:Can't probe device /dev/block/mmcblk0p36 Failed to mount '/data' (Invalid argument) I:Actual block device: '/dev/block/mmcblk0p36', current file system: 'f2fs' Unable to recreate /data/media folder.[/code]

If there's anything I need to look at, could someone give me some hints.

jgneff commented 5 years ago

I see the same errors when I install the weekly "/e/" system update on the same phone. Note that I had to reformat the data partition as ext4 instead of f2fs to be able to encrypt the phone. The system update works, though. The only problem seems to be these error messages during the installation of the update under TWRP.

cloviscardoso commented 3 years ago

Failed to mount / data is a problem (we can call it a bug) recurring in several brands and models under TWRP of different versions. Personally, I have a Samsung J2, where I installed TWRP versions 3.1.1, 3.2.3-4 and 3.5.0_9.0 ALWAYS presenting the same problem: Failed to mount / data (invalid argument). In the 3 attempts the device continued to function normally, without any problem. To solve the issue of BACKUP: today I use SuperBckup, which can be downloaded from Google Play. If you want a Factory Reset: just go back to TWRP and FORMAT the device in the first option presented in Wipe, simple. Thus, I got around the problem presented. Although the message still appears, it does not affect the installation of .zips (my phone is rooted with Magisk 22.0 and I perform all functions without any problem). The way was to relax and learn to live with the hassle of the message.