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 741 forks source link

"could not mount /data and unable to find crypto footer" Redmi Note 4 / mido #1265

Open ghost opened 6 years ago

ghost commented 6 years ago

After successfully installing LineageOS 15.1 (lineage-15.1-20180703-nightly-mido-signed.zip) with latest TWRP (twrp-3.2.2-0-mido.img) with SU addon I am not able to access my data partition anymore. Got the error message while trying to backup my install.

Mountpoint /sdcard and /sdcard1 are empty, before I was able to access the .zips for installing from there and I didn't set any password or encryption meanwhile this install and TWRP is not asking for one to unlock. There was encryption once, but I could remove it with formating internal storage/data as written somewhere to get rid of it, but this was some weeks ago. And as said before, I rebooted into twrp-3.2.1-0-mido.img, flashed twrp-3.2.2-0-mido.img rebooted into the new Recovery, used advanced wipe to wipe all except internal storage, then flashed lineageOS and SU .zips with out any problem, just now after the install I am not able to access the internal storage anymore or do backups.

Trying to reboot into Revocery again from TWRP itself also fails and just LineageOS boots again. Just booting into Recovery from LineageOS is working.

But interestingly TWRP is still reading the settings (which file is stored on internal storage) in correctly, because I set vibration off and default is on and its still off in TWRP.

karl-gd commented 6 years ago

Same Problem here with lineage-15.1-20180710. Flashing Build 20180627, rebooting System once and then rebooting twrp, /data is mounted correctly again.

ghost commented 6 years ago

seems that the recovery provided in the xda thread for the Official LineageOS 15.1 got updated few days ago https://forum.xda-developers.com/redmi-note-4/xiaomi-redmi-note-4-snapdragon-roms-kernels-recoveries--other-development/rom-lineageos-15-0-t3690465/post76945848#post76945848

See changelog, where fstab changes are mentioned https://en.wikipedia.org/wiki/Fstab for future releases. So new releases might have changes which are not supported by the official TWRP from now on at the moment.

This recovery is working fine for me, see https://forum.xda-developers.com/showpost.php?p=77024481&postcount=1102 and the posts before that.

Idix commented 6 years ago

Hi,

I ran into the same issue, it seems that TWRP needs to be compiled with the support of CONFIG_QUOTA. Here is my dmesg output when trying to mount /data

<3>[ 184.856386] scm_call failed: func id 0x72000501, arginfo: 0x22, args: 0xe92bc000, 0x1000, 0x0, 0x0, ret: -2, syscall returns: 0xffffffffffffffbf, 0x0, 0x0 <6>[ 184.856407] get_ice_device_from_storage_type: found ice device ffffffc0039ac800 <6>[ 184.983752] get_ice_device_from_storage_type: found ice device ffffffc0039ac800 <3>[ 184.986325] QSEECOM: qseecom_create_key: Set the key successfully <6>[ 184.987719] device-mapper: req-crypt: req_crypt_ctr: Mapping block_device /dev/block/mmcblk0p49 to dm-req-crypt ok! <6>[ 184.987719] <3>[ 185.433478] EXT4-fs (dm-0): Filesystem with quota feature cannot be mounted RDWR without CONFIG_QUOTA

EDIT : After some research I found the relevant commit : https://github.com/LineageOS/android_kernel_xiaomi_msm8953/commit/f4426d93b22f9beb9d532e98186c71ad6376faf2

stephanlachnit commented 6 years ago

Same issue here on mido. This Recovery (https://forum.xda-developers.com/redmi-note-4/xiaomi-redmi-note-4-snapdragon-roms-kernels-recoveries--other-development/rom-lineageos-15-0-t3690465) should fix it, but i havent tried yet.

wrtc90 commented 6 years ago

I have the same issue. Actually, I can't wipe Dalvik/Cache/System/Data at all due to this error. I don't know what happened when I installed the LineageOS weekly from 2018/06/18 but it basically broke my phone/recovery to the point where I'm now not even able to get rid of LineageOS and install another ROM.

I am not willing to install a unofficial recovery. It's a sad state but apparently the maintainer pushed some update to TWRP and I hope it will be merged soon. Source: https://forum.xda-developers.com/showpost.php?p=77189749&postcount=3512

ethnopolino commented 6 years ago

Hi, I had the same problem. But after installing RedWolf https://mirrors.c0urier.net/android/Dadi11/RedWolf/mido/RedWolf-027-mido.img with adb/fastboot everything works fine

bskendig commented 6 years ago

I hit the same problem with the LOS 15.1 July 3 build, and tried unsuccessfully to figure it out here:

https://www.reddit.com/r/LineageOS/comments/8yfdho/questions_about_encrypted_data_partition_with_los/

But if "TWRP needs to be compiled with the support of CONFIG_QUOTA" (as @Idix said above), and recent TWRP builds don't have this but the Treble build from the link @9Strike provided does, that would explain why the older build works.

chrisnew commented 6 years ago

Same here for Oneplus 5 and a recent version of Lineage.

<3>[19701205_07:34:29.469942]@0 EXT4-fs (sda13): Filesystem with quota feature cannot be mounted RDWR without CONFIG_QUOTA

mounting with ro option works though

dioni21 commented 5 years ago

A work around for Samsung S7?

https://forum.xda-developers.com/galaxy-s7/development/recovery-official-twrp-herolte-t3333770/post77296102#post77296102

ghmia commented 5 years ago

I am running an official build of TWRP, downloaded from https://twrp.me/Devices/ I am running the latest version of TWRP I have read the FAQ (https://twrp.me/FAQ/) I have searched for my issue and it does not already exist Device codename: mido TWRP version: 3.2.3-1

WHAT STEPS WILL REPRODUCE THE PROBLEM? Encrypt phone, phone reboots, remains unencrypted

WHAT IS THE EXPECTED RESULT? Phone encrypted

WHAT HAPPENS INSTEAD? Phone remains unencrypted

ADDITIONAL INFORMATION https://forum.xda-developers.com/redmi-note-4/help/encryption-isnt-anymore-t3831029

Apparently twrp doesn't format data properly. It works if you format data using OrangeFox.

Sorry I don't know why but I cannot create new issue

CopyPasteFail commented 5 years ago

I have the same issue with my Redmi Note 5 Plus (Vince) - running on AOSP Extended (Android 9.0) with TWRP 3.3.0.0, it started after upgrading (clean flash) from an unofficial LineageOS 15.1 (Android 8.1)

ENCRYPTION IS DISABLED on my device Using an unofficial Red Wolf Recovery still didn't fix it.

Any updates? this issue is preventing me from creating an image backup of my system.. :(

HeadCrash66 commented 5 years ago

The generell TWRP problem is with Pie devices ... the TWRP kernel does NOT support ext4 quota. That need's to be fixed/updated by TWRP team.

If you remove this quota feature it works. But you need newer tune2fs tools.

./tune2fs -O ^quota /dev/block/platform/soc/.../by-name/userdata ./tune2fs -Q ^usrquota,^grpquota /dev/block/platform/soc/.../by-name/userdata

JPT77 commented 5 years ago

You should use this problem to make TWRP more fail-proof: that means allow formatting / wiping data even if TWRP cannot mount /data for any reason.