[Q] Problem with flashing roms and partitions/mounting... - Xperia Z Q&A, Help & Troubleshooting

After I flash a rom, when i try boot into TWRP it asks for a password and refuses to mount any partitions unless i wipe data in there, and then wipe the other partitions in CWM... I have no idea what to do as this is pretty much stuffing everything up.
Edit: It's always the /data partition that need to be wiped...

Related

[Q] Can't perform factory reset

Hi there
Although this is my first post, I am regular visitor of this forum since Defy's devs started porting CM and finaly is time to make a post (need a help ).
I have decided to flash Omars ROM but wanted to do nandroid backup first. My phone is encrypted due to exchange policy so I've backup my apps and wanted to do factory reset. For some reason I can't (neither through settings, stock recovery or CWM). When hit wipe data in CWM and confirm, all I get is:
wiping data
formatting /data
error mounting /data!
skipping format
formatting /cache
formatting /sd-ext
formatting /sdcard/.android_secure
error mounting /sdcard/.android_secure!
skipping format
data wipe complete...and everything is as before it.
I was thinking to flash sbf through RSD lite but wanted to ask if somebody had similar problem (I am not even sure if it is encryption related or not) which can be solved easily?
Thanks
//edit: because I couldn't figure out what was blocking factory reset, RSD did the job just right and now everything works great again (and custom rom is finally in)

[Q] How to wipe Data partition after it's been encrypted?

Hey guys,
My work switched to Google Apps for their email so i wanted to test it out on my phone. Doing so required them to encrypt my phone. What this appears to have done is encrypt the data partition. So now when i go into (TWRP) recovery and try to do a backup / wipe / or anything else, it says it is "Unable to mount /sdcard" I'm unable to do a factory reset of any kind so i'm essentially stuck on this rom (ARHD) until i can figure out how to wipe data and get the /sdcard to be not encrypted. Does anyone have any ideas? I'm imagining that with the modified recovery not being able to access the data partition that i'm going to have to do some adb type stuff?
Please help! I want to keep flashing new roms!
Anyone??
I think you can't decrypt your data partition...
Did you try to wipe your data partition with the latest TWRP?
Guich said:
I think you can't decrypt your data partition...
Did you try to wipe your data partition with the latest TWRP?
Click to expand...
Click to collapse
That's the thing, the recovery can't mount /sdcard so wiping isn't an option from recovery
jrun said:
That's the thing, the recovery can't mount /sdcard so wiping isn't an option from recovery
Click to expand...
Click to collapse
Hi! Only TWRP recovery can solve your issue just do this...
Boot to TWRP recovery->Wipe
From there there are 2 options the left is the advance wipe and on the right is Format Data
Just select the format data button and it should reformat the whole data partition.
1st one would prompt so many errors and reformat then reformat it again 1 time and it should fully reformat your phone.
In theory it should reformat data partition even when encrypted but just in case it fails and I won't be able to go back to this thread just boot in bootloader and type
"fastboot erase userdata"
Well none of that works. TWRP doesn't support decryption yet for this device.
sevenalive said:
Well none of that works. TWRP doesn't support decryption yet for this device.
Click to expand...
Click to collapse
What I instructed basically doesn't decrypt the partition. It reformats it.
Riyal said:
What I instructed basically doesn't decrypt the partition. It reformats it.
Click to expand...
Click to collapse
I know what you instructed, it doesn't work. Only way I got it to work. Flash the stock recovery. Boot into system. Take off the encryption, phone reboots and removes the encryption, data is formatted. Then flash TWRP again.
I basically ran into this exact problem. I was hoping that I'd still be able to back up the encrypted device, but forget about it. What a pain in the ass.
Someone should make add something to the guides about how encrypting your device makes nandroid backups impossible.

Formating /system

Just wanted to know what happens when you format /system and /preload partitions.
Suppose you format /system from recovery. Can you boot into you ROM after that? Or is that where the ROM was?
dark_polok said:
Just wanted to know what happens when you format /system and /preload partitions.
Suppose you format /system from recovery. Can you boot into you ROM after that? Or is that where the ROM was?
Click to expand...
Click to collapse
If you format /system in recovery you blow away the ROM, definitely cannot boot after that. If you format /data as well, the only way you'll be able to recover is with an ADB sideload.
you_eeeeeediot said:
If you format /system in recovery you blow away the ROM, definitely cannot boot after that. If you format /data as well, the only way you'll be able to recover is with an ADB sideload.
Click to expand...
Click to collapse
Thanks.
What if I format /system + /data + cache and dalvik chache and then flash a custom rom right after that, without rebooting the phone in any way [meaning not rebooting into system or bootloader or recovery] that should be ok right? Coz I came from a S3 and that combination worked perfectly for it.
Also still have no idea what the /preload partition and formatting it does.
That's what I do when I update within a rom.
Wipe system, cache, dalvik. Flash rom, then wipe cache/dalvik again.
Just a habit after all the different recommendations from previous devs in the past.
dark_polok said:
Thanks.
What if I format /system + /data + cache and dalvik chache and then flash a custom rom right after that, without rebooting the phone in any way [meaning not rebooting into system or bootloader or recovery] that should be ok right? Coz I came from a S3 and that combination worked perfectly for it.
Also still have no idea what the /preload partition and formatting it does.
Click to expand...
Click to collapse
Yes you can wipe /system, /data and /cache and you're good to flash a ROM, no need to reboot back into recovery again. Dalvik-cache is located on /data, so no need to wipe dalvik when you're wiping data, it's redundant. There is no need to worry about wiping or formatting /preload in almost all situations, otherwise the ROM devs would be telling us to do it. Back in my Galaxy s3 days I remember some ROMs would wipe and flash /preload but I don't think it's a big deal on the One. If it needs to be done, the ROM installation script will handle it.
Most ROM installation scripts wipe /system so it usually isn't necessary to do it yourself. However I do it anyway just to insure a completely clean installation in case the dev's script is messed up (it does happen). Wiping /data is optional of course but it is recommended when changing the base version (for example, 4.1.2 to 4.2.2) or if you're anal like me you can wipe data when upgrading between HTC base versions (2.17 to 2.24 for instance). Some people don't ever wipe /data and don't have any problems, but I can guarantee many of the weird odd-ball issues on this forum could have been prevented with a full wipe.
erikikaz said:
That's what I do when I update within a rom.
Wipe system, cache, dalvik. Flash rom, then wipe cache/dalvik again.
Just a habit after all the different recommendations from previous devs in the past.
Click to expand...
Click to collapse
henrybravo said:
Yes you can wipe /system, /data and /cache and you're good to flash a ROM, no need to reboot back into recovery again. Dalvik-cache is located on /data, so no need to wipe dalvik when you're wiping data, it's redundant. There is no need to worry about wiping or formatting /preload in almost all situations, otherwise the ROM devs would be telling us to do it. Back in my Galaxy s3 days I remember some ROMs would wipe and flash /preload but I don't think it's a big deal on the One. If it needs to be done, the ROM installation script will handle it.
Most ROM installation scripts wipe /system so it usually isn't necessary to do it yourself. However I do it anyway just to insure a completely clean installation in case the dev's script is messed up (it does happen). Wiping /data is optional of course but it is recommended when changing the base version (for example, 4.1.2 to 4.2.2) or if you're anal like me you can wipe data when upgrading between HTC base versions (2.17 to 2.24 for instance). Some people don't ever wipe /data and don't have any problems, but I can guarantee many of the weird odd-ball issues on this forum could have been prevented with a full wipe.
Click to expand...
Click to collapse
Very helpful replies guys. Thanks =}

[Q] Deleting encrypted data partition

I turned on device encryption in order to play with it (bad mistake). Performance is suckish, it prevents me from flashing anything stored on the internal filesystem (have to use USB dongle), battery life has gone down, etc.
I tried wiping the device by doing a factory reset both in recovery and through settings. Neither method touches the encrypted data partition. Re-flashing the ROM makes no difference. The encrypted partition is extremely resilient
Based on some research, the only known way to wipe the encryption is to revert to stock and use stock recovery to do a factory reset. This sounds insanely cumbersome if all I want to do is wipe a partition. Does anyone know of a better way?
If stock recovery can do a factory wipe without mounting the encrypted partition, it sounds like a feature to add to CWM or TWRP.
Device is ATT HTC One, rooted, S-OFF, Super CID, CWM recovery, Sentinel ROM 4.0.
Many thanks
You can try and flash an ruu? See if that helps and if it doesnt try the stock recovery thing. Never heard of it though.
Sent from my HTC One X using xda app-developers app
So, the wipe of TWRP didn't removed the encryption like it say this when you will wipe?
Strange
However, flash the stock recovery and do a factory reset like you said, and see if it work..
you can do it via TWRP just make sure the rm -rf mode is disabled in settings... Or maybe in fastboot... Just type
Code:
fastboot erase userdata
Or another perhaps is ask someone to create a nand dump of their user data partition and use "dd" to write it on your own.
Problem Solved!
Eureka!!!!
I was playing with CWM and figured it out. In the "mounts and storage" tab, if you select "format /data" it fails with an error that it can't mount the volume.
If you select "format /data and /data/media" it works like a charm. For some reason, it performs the format operation on the raw partition while the prior option tried to mount it first.
Back in business
Thanks RootShot ["format /data ¨in advanced wipe first¨ and format/data ¨& write yes in second¨ " ] did the trick and saved my phone back to work ...

Question TWRP and MIUI V13.0.12

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)

Categories

Resources