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.
Related
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..
This problem has been solved by @Didgesteve
Thank you very much, Didgesteve!
For everyone who is a genius(like me), read his post.
Hi Community,
short story: my device seems kind'a bricked, because i am not able to install a rom via twrp; error: unable to mount /data /cache and /system.
What I did:
I unlocked my bootloader via the official sony method > everything worked flawlessly
I bootet my device into fastboot mode and flashed twrp onto it > everything still workes fine
I wiped /data /cache and /system according to the normal cm13.0 installation process > still finr
I installed the cm13.zip from an external sd-card > no errors
I installed the gapps.zip from the sd-card > Nothing unusual
I booted into cm13, configured it and installed some apps > works as usual
I noticed that a new version of the rom was published, so I booted into twrp > worked
I wiped /data /cache and /system > worked
I reallized, that i could flash my external sd-card, too because i wanted to install the new cm13-version via adb-sideload > now the errors came in
So i thougt retrying wiping /data /cache and /system and the same errors occured > holy sh*t
Last I tried simply installing the cm13.zip from the external sd-card > same errors
What the errors are for wiping(those for install are basically the same:
Code:
could not mount /data and unable to find crypto footer
failed to mount /data (no such device)
Unable to recreate /data/media folder
Failed to mount /system (Invalid argument)
Failed to mount /cache (Invalid argument)
Unable to mount storage
Same goes for using the official cyanogen recovery and other cyanogenmod versions.
I am also not able to find/mount it via adb shell.
The images, etc:
CM13: http://forum.xda-developers.com/z3-compact/development/rom-cm13-t3277402/page7 version by @nelvinchi on 25th February 2016, 12:39 PM
TWRP: https://twrp.me/devices/sonyxperiaz3compact.html
Gapps: https://www.androidfilehost.com/?fid=24269982087021755
Additional information:
OS: Mac OSX El Capitan and Linux Mint 17.3
Sd-Card: SanDisk Ultra 64GB micro sdxc
Phone: Sony Xperia Z3 Compact D5803 (colorrange)
My ideas for fixing this:
-manually adding the partitions via adb shell
+required: correct partiton table and adb commands
+don't now, if this would work
Hope i didn't miss anything and there is someone out there, how can help me,
yours sincerely,
Niggl
Well I followed your method up to step 8 and the point of wiping system in recovery mode. Even if you were flashing a completely different rom, you shouldn't have to touch system unless you're coming from LL to CM for the first time. Updating roms to a later version should only require a wipe of dalvik/cache. By the sound of it there are no system files for it to boot into, either that or the partition tables are corrupt.
Have you got flashtool working? Have you tried pushing a stock tft? to see if you can repair it?
There is Sony Bridge, which if it does the same as the PC version will repair the phone to stock, as long as you can still get into Flashmode.
The chances of being able to repair it back into CM are slim, I suspect you're going to have to start from scratch, get stock working then go back to CM after.
**SOLVED**
Thank you for your help!
Didgesteve said:
Well I followed your method up to step 8 and the point of wiping system in recovery mode. Even if you were flashing a completely different rom, you shouldn't have to touch system unless you're coming from LL to CM for the first time. Updating roms to a later version should only require a wipe of dalvik/cache. By the sound of it there are no system files for it to boot into, either that or the partition tables are corrupt.
Click to expand...
Click to collapse
The partition tables were(because of bull**** or something like that) corrupted(I checked it: not because of the wiping, but i will not wipe /system at an update in the future)
Didgesteve said:
There is Sony Bridge, which if it does the same as the PC version will repair the phone to stock, as long as you can still get into Flashmode.
Click to expand...
Click to collapse
I can boot into recovery and fastboot/flash mode.
Xperia companion and sony bridge are both not working because of "modified software".
Flashtool worked for the stock tft.
So THANK YOU VERY MUCH,
you are my savior!
I hope nobody else, will be a genius like me
Thx again,
Niggl1999
I haven't formatted my phone in a while, so rather than delete files while my phone was working. I booted into recovery and selected the format data option in TWRP. Now I am getting all kinds of errors in TWRP. I was on a custom rom when I did all of this and somehow I screwed up. I can't even get a zip on my phone as my phone is only recognized as charging and not a storage device under these circumstances. I have tried adb sideloading a rom, but that is to no avail. I am thinking about flash a stock recovery in hopes that I'll be able to flash a stock rom and fix my phone.
this is what it says when trying to wipe anything:
could not mount /data and unable to find crypto footer.
failed to mount '/data (invalid argument)
without typing out everything the rest of it says failed to mount '/data' (invalid argument)
Boot the phone into fastboot, type fastboot format userdata
fastboot format cache
then fastboot flash recovery <name of twrp recovery>.img (don't put < >)
boot into recovery and go to advanced wipe and wipe everything except internal
everything will be fine now
you can flash any rom now.
If it worked, hit the thanks button
Try unbrick tutorial from XDA to back to new alike!
This is the best option
Well actually I took a different route altogether. I don't know why I didn't think about it initially. You would think after almost 10 years of dealing with custom ROMs and recoveries that I would of been a lot quicker in finding a solution, so I googled it. Came to the conclusion that I needed a stock OP3T recovery, so I downloaded it and fastboot flashed the stock recovery. From recovery I was able to wipe data, cache, dalvik-cache. All was good after that. Now I'm running coltOS.
Sent from my ONEPLUS A3000 using Tapatalk
Glad you fixed it. If you face a similar issue in the future you can download MSMTool for the OnePlus 3T which will restore stock OOS through fastboot
So I have this problem. When I tried to flash clarity kernel for my device, it won't boot, but I still able to access TWRP and then I try to Format Data so I can restore my backup later.
But, my device suddenly turned off while it was formatting and still won't boot.
Worse, when I tried to go to TWRP, it just show some log like "failed to mount data (invalid argument)" and "failed to mount /twrp/twrps (invalid argument)". Though, I still able to access fastboot mode, but I dont know what to do with it.
Could somebody help me please? I'm stuck right now.
Jaeger00 said:
So I have this problem. When I tried to flash clarity kernel for my device, it won't boot, but I still able to access TWRP and then I try to Format Data so I can restore my backup later.
But, my device suddenly turned off while it was formatting and still won't boot.
Worse, when I tried to go to TWRP, it just show some log like "failed to mount data (invalid argument)" and "failed to mount /twrp/twrps (invalid argument)". Though, I still able to access fastboot mode, but I dont know what to do with it.
Could somebody help me please? I'm stuck right now.
Click to expand...
Click to collapse
Please boot in fastboot mode and run:
fastboot format userdata
fastboot format cacheThen try TWRP again.
k23m said:
Please boot in fastboot mode and run:
fastboot format userdata
fastboot format cacheThen try TWRP again.
Click to expand...
Click to collapse
Thanks for your information and time, really appreciate it.
Btw I just got my problem solved by reflashing my device with MiFlash. Anyway, thank you
Hello,
As stated in the titled I have tried to root my OP 3T and it horribly wrong. First I got the error message telling me it couldn't mount my /system partition. I googled how to fix it and discovered that I had to wipe the partition as it might be corrupt. Just to be sure that it was indeed corrupt. The size was stated as 2913MB but the used space was stated as 1728265MB. I therefor wiped it and tried to boot. Now I couldn't boot into Oxygen OS...The only thing i can boot into was fastboot and recovery. I then tried to install the LineageOS and it worked. I can finally boot to a OS. However when going in the recovery again and wiping the cache I get a slew of errors. Almost all of them are "Error opening: '/data/local/nhsystem/kali-armhf/dev/xxxx' (Not a directory)". There is also one other error: "Unable to mount storage"
How do I fix this?
uptivuptiz said:
First I got the error message telling me it couldn't mount my /system partition.
I therefor wiped it and tried to boot. Now I couldn't boot into Oxygen OS...
Click to expand...
Click to collapse
System partition is the OS. So from that fact, it should now be obvious that wiping system (and therefore wiping the OS) will result in not being able to boot to OS.
Not being able to mount system is a little odd. What version TWRP? Current version is typically recommended (currently 3.2.3-1).
You can try in TWRP Wipe section, the "Format data" button. This will often fix corruption issues with data partition (format is not the same as wipe), although I'm not sure how the system partition was affected.
redpoint73 said:
System partition is the OS. So from that fact, it should now be obvious that wiping system (and therefore wiping the OS) will result in not being able to boot to OS.
Not being able to mount system is a little odd. What version TWRP? Current version is typically recommended (currently 3.2.3-1).
You can try in TWRP Wipe section, the "Format data" button. This will often fix corruption issues with data partition (format is not the same as wipe), although I'm not sure how the system partition was affected.
Click to expand...
Click to collapse
I'm using TWRP 3.2.3-1. I tried to format with the "Format data". It seems that I still can't install the OxygenOS. Also the error "Error opening: '/data/local/nhsystem/kali-armhf/dev/xxxx' (Not a directory)" still accurs.
I'm still able to install and run LineageOS.
uptivuptiz said:
I'm using TWRP 3.2.3-1. I tried to format with the "Format data". It seems that I still can't install the OxygenOS. Also the error "Error opening: '/data/local/nhsystem/kali-armhf/dev/xxxx' (Not a directory)" still accurs.
I'm still able to install and run LineageOS.
Click to expand...
Click to collapse
Formatting with 3.2.3-1 will remove the encryption footer. It's basically the only build of TWRP you DO NOT want to use! 3.2.3-10 is the latest but that won't reinstate your encryption footer. My advice is this. Flash TWRP 3.2.3-0, format at least /system, /data and /cache from the Wipe/Advanced screen and then Wipe everything for good measure.
Make sure you are in front of your PC when you do this. Back up everything to PC first as formatting will delete everything from Internal Storage. Make sure you have all your Install zips ready to go on your PC. Whn you're done formatting and wiping you can copy the install zips back to Internal Storage and flash OOS full Zip (or Custom ROM).
Dirk said:
Formatting with 3.2.3-1 will remove the encryption footer. It's basically the only build of TWRP you DO NOT want to use! 3.2.3-10 is the latest but that won't reinstate your encryption footer. My advice is this. Flash TWRP 3.2.3-0, format at least /system, /data and /cache from the Wipe/Advanced screen and then Wipe everything for good measure.
Make sure you are in front of your PC when you do this. Back up everything to PC first as formatting will delete everything from Internal Storage. Make sure you have all your Install zips ready to go on your PC. Whn you're done formatting and wiping you can copy the install zips back to Internal Storage and flash OOS full Zip (or Custom ROM).
Click to expand...
Click to collapse
Thanks! I will try that when i get time tomorrow. There will come an update.
uptivuptiz said:
Thanks! I will try that when i get time tomorrow. There will come an update.
Click to expand...
Click to collapse
Let me know.
Remember to reboot Recovery once you have 3.2.3-0 installed so that your format operations are carried out with that version.
Dirk said:
Let me know.
Remember to reboot Recovery once you have 3.2.3-0 installed so that your format operations are carried out with that version.
Click to expand...
Click to collapse
I have now downgraded TWRP to version 3.2.3-0 and wiped everything. I didn't backup as I don't have anything on there because it's not my main device. After wiping I tried installing OOS again and this time I get the same "Error opening: '/data/local/nhsystem/kali-armhf/dev/xxxx' (Not a directory)" error and now it cant mount the /system partiton again
uptivuptiz said:
I have now downgraded TWRP to version 3.2.3-0 and wiped everything. I didn't backup as I don't have anything on there because it's not my main device. After wiping I tried installing OOS again and this time I get the same "Error opening: '/data/local/nhsystem/kali-armhf/dev/xxxx' (Not a directory)" error and now it cant mount the /system partiton again
Click to expand...
Click to collapse
You're not just wiping, You're formatting. Select each of the partitions (Cache/Data/System) and format in each case. (I recommend EXT4 for Data)
Dirk said:
You're not just wiping, You're formatting. Select each of the partitions (Cache/Data/System) and format in each case. (I recommend EXT4 for Data)
Click to expand...
Click to collapse
Ok. I tried to format all the partitions with EXT4 and tried to install OOS again with a adb sideload. This didn't work and I got an error "adb sideload cannot read 'OnePlus3TOxygen.zip'". So I tried installing it with a OTG adapter and a USB inside TWRP and it worked. OOS is running and working! Thanks for the help
Now I'm just curios as to why I can't sideload...
uptivuptiz said:
Ok. I tried to format all the partitions with EXT4 and tried to install OOS again with a adb sideload. This didn't work and I got an error "adb sideload cannot read 'OnePlus3TOxygen.zip'". So I tried installing it with a OTG adapter and a USB inside TWRP and it worked. OOS is running and working! Thanks for the help
Now I'm just curios as to why I can't sideload...
Click to expand...
Click to collapse
A few possibilities:
1) OnePlus3TOxygen.zip of course isn't the name of the file as downloaded, so i assume you renamed it to something more sensible before trying to sideload? Do you have 'Hide Extensions of known filetypes' selected in Windows Explorer? Could it be that what you ended up with was 'OnePlus3TOxygen.zip.zip', which of course wouldn't work if you were trying to sideload 'OnePlus3TOxygen.zip'?
2) You didn't move your download to your platform-tools folder in adb?
3) You didn't open a CMD window in your platform-tools folder?
Anyway, good that you're back on your feet.
Dirk said:
A few possibilities:
1) OnePlus3TOxygen.zip of course isn't the name of the file as downloaded, so i assume you renamed it to something more sensible before trying to sideload? Do you have 'Hide Extensions of known filetypes' selected in Windows Explorer? Could it be that what you ended up with was 'OnePlus3TOxygen.zip.zip', which of course wouldn't work if you were trying to sideload 'OnePlus3TOxygen.zip'?
2) You didn't move your download to your platform-tools folder in adb?
3) You didn't open a CMD window in your platform-tools folder?
Anyway, good that you're back on your feet.
Click to expand...
Click to collapse
Here's what I did:
Moved the zip file to the platform-tools folder.
Kept the stock name of the zip file.
opened CMD window in platform-tools folder.
I still get the error.
uptivuptiz said:
Here's what I did:
Moved the zip file to the platform-tools folder.
Kept the stock name of the zip file.
opened CMD window in platform-tools folder.
I still get the error.
Click to expand...
Click to collapse
You wouldn't be the first. It's a common issue. You know you can just move the zip to Internal Storage and flash it with TWRP? The Recovery is MTP enabled. Useful to know for future reference. :good: