Phone: xt1060, verizon, Moto X Dev edition (2013)
ROM: Cm 12.1 (however, I was unable to encrypt with my last ROM as well)
My data directory is formatted with f2fs. When I attempt to encrypt the phone, it reboots without error and without any encryption action. I've used logcat to capture these messages:
I/Cryptfs ( 242): Check if PFE is activated on Boot
E/Cryptfs ( 242): Bad magic for real block device /dev/block/platform/msm_sdcc.1/by-name/userdata
E/Cryptfs ( 242): Error getting crypt footer and key
E/Cryptfs ( 242): Bad magic for real block device /dev/block/platform/msm_sdcc.1/by-name/userdata
E/Cryptfs ( 242): Not a valid ext4 superblock
E/Cryptfs ( 242): Orig filesystem overlaps crypto footer region. Cannot encrypt in place.
Click to expand...
Click to collapse
Because of the "Not a valid ext4 superblock" error, I tried changing the file system to ext4. When I boot after changing the data partition to ext4, the phone enters a boot loop. It boots up to an error that says "encryption unsuccessful" and the only choice is to reset the phone. I reset the phone and it boots back to the same error. I've formatted cache, system, data and sdcard, reinstalled both ROM and recovery and still I boot back up into this error message even though I am not presently trying to encrypt.
I read about a problem which requires the data partition to be reduced in size by at least 16KB, so I reduced it by about 4MB. The data partition was 27606912 blocks, and I reduced the partition to 27606000 blocks. However, this had no affect.
I have changed the partition back to f2fs because at least the phone boots using this file system without entering the "encryption unsuccessful" loop.
I have tried multiple recoveries in case that was the problem. I've tried CWM, the recovery for CM 12.1, and the most recent TWRP. I get the same problem in each of these.
I am most baffled about the boot loop after formatting the partitions in ext4 then installing a fresh ROM. Apparently my attempt to encrypt is remembered somewhere other than system, data, cache, or sdcard?
I considered flashing back to factory, however, I do not have the files, the links I've found on xda are broken, and I am waiting on Motorola to provide me access to the stock firmware - I requested it tonight though.
I appreciate any assistance that can be offered. Thank you.
I found the factory firmware and I attempted following the directions for a factory restore:
$ fastboot flash partition gpt.bin
$ fastboot flash motoboot motoboot.img
$ fastboot reboot-bootloader
$ fastboot flash logo logo.bin
$ fastboot flash boot boot.img
$ fastboot flash recovery recovery.img
$ fastboot flash system system.img
$ fastboot flash modem NON-HLOS.bin
$ fastboot erase modemst1
$ fastboot erase modemst2
$ fastboot flash fsg fsg.mbn
$ fastboot erase userdata
$ fastboot erase cache
$ fastboot reboot
Click to expand...
Click to collapse
However, the system.img failed. So, I reflashed recovery to TWRP and found that I did not have a system, data, cache or sdcard partition. I reflashed recovery to CWM because it has a custom format option and I formatted data, cache, system and sdcard using ext4, then I reflashed recovery to TWRP and because I am able to transfer files using TWRP. I transferred the CM 12.1 and gapps images, flashed them both, then rebooted.
After all of that, I still booted up into an "encryption failed" screen!
I then went back into TWRP, changed the data partition to f2fs, then I was able to boot into the new CM 12.1. So, the exact same problem exists: using f2fs, I am unable to encrypt the phone. Using ext4, I am stuck in an "encryption failed" loop.
I'm giving this thread a bump in hopes someone can share a solution with me as I am still having the same problem.
I'm on Verizon Developer Edition, but I had a similar problem after the Lolipop update. I just got it working. I had to flash the moto recovery back and format data and cache through there. Then I could encrypt. I'm gonna try to restore a backup from TWRP onto my encrypted data partition now.
I used the recovery from 47-vzw_xt1060_444-kxa2112-l126_cfc_1ff (google the file I can't post links). I'm not sure if its totally perfect with lolipop, but it formatted my data to work with encryption (ext4).
Same issue here on Moto X (ghost) with cm-12.1-20151007-SNAPSHOT-YOG4PAO332 and cm-12.1-20151105-NIGHTLY.
I could get rid of the message
E/Cryptfs ( 242): Orig filesystem overlaps crypto footer region. Cannot encrypt in place
Click to expand...
Click to collapse
by applying the update from this thread, but the other error messages still remain and I cannot encrypt my device..
Related
After backup, in my nandroid folder, the file 'ext.tar' is apparently corrupt, Nandroid restore is not working, (although it reports 'completed' but no boot). Bart restore gives this error: 'invalid tar magic'.
So my questions are, can the .tar be repaired and/or can I do a restore via fastboot without the ext.tar? (will the sd-ext contents be intact? I haven't done anything to it)
If I try the restore, my steps using the contents of the nandroid folder, would be:
Code:
fastboot erase system
fastboot erase userdata
fastboot erase cache
fastboot erase boot
fastboot flash boot boot.img
fastboot flash cache cache.img
fastboot flash userdata data.img
fastboot flash system system.img
then reboot
correct?
Solved: - Not enough space on SD card
pardus said:
Code:
fastboot erase system
fastboot erase userdata
fastboot erase cache
fastboot erase boot
fastboot flash boot boot.img
fastboot flash cache cache.img
fastboot flash userdata data.img
fastboot flash system system.img
Click to expand...
Click to collapse
that will restore the nandroid.. (usually I don't restore cache unless you have offloaded some of the rom to cache to force it to fit into a smaller space)
however the /sd-ext is backed up to the tar file. (you might try extracting it on your computer... sounds like the header of the file is malformed.. I won't know about the rest.)
Of course if you just want to restore the system.. and the contents of /sd-ext have not changed this is not an issue.. fastboot can't modify the sdcard, least with the steps mentioned.
Thank you for the reply, the cache.img file is very small so I skipped that one. Tried the above but no-go.
On my PC the tar only extracts about half the contents and gives a 'corrupt archive error' (winrar).
This all started when I flashed the oc614 kernel, but found everything even slower and then tried to restore with Nandroid and/or Bart.
I have now reflashed the rom (using your post here: http://ip208-100-42-21.static.xda-developers.com/showpost.php?p=8427522&postcount=1844) and am back to 'stock' but I would still like to restore what I had before the kernel flash.
Would I just need to flash 'system' and 'userdata' from the nandroid folder to get back there?
Weird things, when ever I do a:
Bart backup the 'ext-backup.tar' file is always corrupt or a
Nandroid + Ext Backup the 'ext.tar' file is always corrupt
??
What is the syntax for making a .tar backup from console or adb?
I'm on a rooted m7spr, was running cm11 official, S-ON. I was prepping to try out the cm12 build so I went to CWM 6.0.4.8, made a backup, adb pulled it, and proceeded to format /system. It spent about 30 minutes before I decided to reset and try again. It never completes and now I am unable to restore my backup or boot (trying to restore the backup hangs)
Ideally I would adb and use fdisk to check the disks and formats and mkfs.whatever /dev/sdWhatever to manually format system and cache (the 2 partitions that I have tried and failed to format) but fdisk -l shows nothing and mkfs doesn't exist. I have no idea how to proceed. I'm lucky my laptop is authed to adb shell so hopefully I will be able to recover from this.
Any ideas? Any help is greatly appreciated!
Additions: I also tried fastboot erase and fastboot format - erase says "FAILED (remote: not allowed)" and format says "FAILED (remote: unknown command)".
I noticed there's a "factory reset" option in the bootloader. Is this something I should try or could it make things worse?
EDIT: I think I got it - Apparently CWM sucks, which sucks because CWM looks so much better to me than TWRP, but I guess it had to be done. Flashed TWRP with fastboot and it seemed to format fine.
I flashed cm12.1 on my mi3w and after using it for 2 weeks it turned off suddenly. when i switch on it says enter password, any password could be used, then it says decryption error, your data is corrupted try to reformat and goes to recovery. but i cant reformat or install zip form sd card it always failes.cwm r8 or hiigher is installed. I tried several methods to flash miui again as cwm say error while formatting. i used miflash tool, adb - fastboot commands. they all say error while erasing userdata.img? I can access twrp or stock recovery by typing boot recovery.img on fastboot but when i flash them cwm appears again. i tried boot stock recovery and select system1 , the system2, i tried flashall, exept data storage, exept storage. flashall says error erasing partition or userdata, others flash successfully but it boots up with cyanogenmod BLINKING EYE! and asks for enter password. I wonder if someone could help. my phone is not working since september and we have'nt got service center or replacing parts. sorry for my english
I've found two ways of wiping and reinstalling my rom. One way uses fastboot and the other TWRP recovery. I'd like to find out how they correlate with each other.
Method 1: Fastboot
Format data
fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
fastboot flash bootloader bootloader.img
fastboot reboot-bootloader
fastboot flash radio radio.img
fastboot reboot-bootloader
fastboot flash recovery recovery.img
Transfer rom zip files and install them
Method 2: TWRP
Simply format data and wipe every checkbox
Transfer rom zip files and install
What are you specifically looking to find? TWRP probably just issues the fastboot commands.
You don't need to flash the bootloader, modem, or recovery unless their are new ones available. Flashing them again is just redundant and a waste of time. Personally I only use fastboot to flash my bootloader,modem, or new version of TWRP. I use TWRP for literally everything else. You can wipe the partitions easier and quicker than using fastboot, or you can format data and completely nuke the phone and disable encryption. I'm not sure why you're asking how they correlate, I'm pretty sure it's common sense. If you erase a partition in fastboot, it's the exact same thing as wiping the partition in TWRP.
Also if you want to reinstall your ROM why are you wiping your whole internal storage? This is pretty much never required unless you want to free up space or decrypt the device. If you just wipe every partition but internal storage, you can keep local files (like Titanium Backup, pictures, music, any files you have on there, etc..). Then when you flash the ROM, it's still a clean flash because your system, data, cache, and boot partitions are already wiped.
The most important thing for me is that with Twrp-recovery, there is no other device needed; PC etc.
I just did a full flash and erase with sweet_global_images_V13.0.12.0.SKFMIXM_20220801.0000.00_12.0_global ROM.
after a quick rom setup with no sim and no wifi, I went back to TWRP and the data partition can't be mounted.
I tried then the usual advanced wipe, setting the partition to ext2 then to ext4 and the rom does not boot and goes back to recovery.
If from recovery I do a wipe, then the rom starts, but after setup, going back to TWRP gives agaion the same problem and the data partition can't be mounted.
Any Idea?
which TWRP version you use?
Zibri said:
....Any Idea?
Click to expand...
Click to collapse
Have you format data partition before starting the new rom?
Format is neccesary to remove the encryption of the formal rom.
Wipe data isn't enough for that.
yes I did... but I think MIUI reformats it.
which twrp are you using?
Maybe the twrp you're using doesn't support encryption yet
it worked with MIUI 12.5.9.. but MIUI 13.0.12 reformats the userdata partition if it is formatted with twrp.
maybe because of dm-verity but I am not sure.
I just did this:
FULL FLASH from EDL or FASTBOOT without relock and including userdata.
Then fastboot boot twrp-3.6.2_11-0-sweet.img
Form TWRP I reformatted userdata as EXT4.
Then booted the system... after booting for the first time the system, userdasta is again encrypted.
Yes, seems u are using twrp which not support decryption yet, change ur twrp/ofox then (there is 1 that already support android 13)