Long story short... My USB port is dead on my Nexus 6. I flash everything in TWRP such as roms, kernels and modems (YAY for the ability to do so). I am wanting to wipe everything in my phone to start fresh. Let's say I did a factory reset to the phone (wiped everything except userdata), got my rom to boot and then went into recovery to wipe my userdata partition only, would my phone go ahead and rebuild the partition on successful boot?
Thank you in advance!
thawte said:
...Let's say I did a factory reset to the phone (wiped everything except userdata), got my rom to boot and then went into recovery to wipe my userdata....
Click to expand...
Click to collapse
Wiping a partition in twrp will show a.o. the message 'formatting...'. The partition is already build but empty.
NLBeev said:
Wiping a partition in twrp will show a.o. the message 'formatting...'. The partition is already build but empty.
Click to expand...
Click to collapse
Ah gotcha. Also the rom will still boot with empty USERDATA? Just making sure it does not have important files for boot...
thawte said:
Ah gotcha. Also the rom will still boot with empty USERDATA? Just making sure it does not have important files for boot...
Click to expand...
Click to collapse
Wiping data in recovery shouldn't affect the system or booting.
But, personally, I'd take a full nandroid backup before anything. If you can't plug in to a pc and use fastboot to fix anything serious, you should be playing it very safe. :good:
Darth said:
Wiping data in recovery shouldn't affect the system or booting.
But, personally, I'd take a full nandroid backup before anything. If you can't plug in to a pc and use fastboot to fix anything serious, you should be playing it very safe. :good:
Click to expand...
Click to collapse
Doesn't the nandroid backup store to userdata?
Sent from my Nexus 6 using Tapatalk
thawte said:
Doesn't the nandroid backup store to userdata?
Sent from my Nexus 6 using Tapatalk
Click to expand...
Click to collapse
Data in recovery and userdata aren't the same. There's no "userdata" in twrp. (unless the newest twrp has changed?)
Userdata is apps, data and internal SD storage. You use fastboot typically to erase userdata.
You use twrp to erase data, and internal storage, separately.
Edit: and yes, it does store to userdata. But you can't erase userdata without a PC. Just erase data in twrp, and leave internal storage alone.
Or wipe it all, but without access to a PC, you could not fix the phone if anything goes wrong. That's why I'd keep a full nandroid backup on the device.
Related
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.
I know some people may read this and call me a n00b, or whatever....deal with it lol
I'm coming from a Nexus S, and this is my first android with the new unified storage, rather than the old method that was partitioned for rom storage and sd/usb storage. I just flashed a Nexus 4 factory image for the first time ever, and when I did all my files on my storage partition were wiped. This includes my nandroids, all my apk backups, titanium backups, my roms, kernels, gapp zips, pictures, music.....EVERYTHING!!!!!!! When I rebooted, there was not ONE file on my phone that wasn't part of the factory image!! When I did a factory flash on my nexus s, since there were separate partitions, my storage was completely untouched. The only thing similar that would wipe it was a bootloader unlock. This is (obviously) no longer the case. My only saving grace is that at least half my apks are stored in my box account (thank you box for the free 50gb for registering with an LG device ) and my pics were set to auto-sync with ubuntu one. Everything else is lost forever, though
IF YOU HAVE TO FLASH A FACTORY IMAGE, BE SURE TO BACK UP YOUR STORAGE PARTITION FIRST!!!!
You have been warned
Assuming you used the flash-all script, just remove the -w option
I flashed back to stock, radio, system, boot loader etc, but just didn't flash the data partition (or whatever its called) and the internal SD was untouched.
Admittedly I got stuck in a boot loop, but I just powered off, booted in to boot loader and flashed TWRP from fast boot. Factory reset and cleared cache and I still had everything saved
Sent from my CM10.1 Nexus 4
crachel said:
Assuming you used the flash-all script, just remove the -w option
Click to expand...
Click to collapse
nope. i flashed each individual .img file the userdata.img is what wiped the storage....apparently the device thinks the two are connected. maybe they really are....i'm not an expert in this area, to say the least.
Tom540 said:
I flashed back to stock, radio, system, boot loader etc, but just didn't flash the data partition (or whatever its called) and the internal SD was untouched.
Admittedly I got stuck in a boot loop, but I just powered off, booted in to boot loader and flashed TWRP from fast boot. Factory reset and cleared cache and I still had everything saved
Sent from my CM10.1 Nexus 4
Click to expand...
Click to collapse
yup...you're correct!! twrp knows the difference between actual userdata and storage...it seems that fastboot does NOT know the difference, unfortunately. I figured since twrp is safe to wipe the data with, fastboot should be too.
hp420 said:
nope. i flashed each individual .img file the userdata.img is what wiped the storage....apparently the device thinks the two are connected. maybe they really are....i'm not an expert in this area, to say the least.
Click to expand...
Click to collapse
I think the title "userdata" should have given you a clue about what it was going to do, i.e. flash over the user data and erase what was previously there
Sent from my CM10.1 Nexus 4
Tom540 said:
I think the title "userdata" should have given you a clue about what it was going to do, i.e. flash over the user data and erase what was previously there
Sent from my CM10.1 Nexus 4
Click to expand...
Click to collapse
As I said before, my last android was a Nexus S that was partitioned, so the data was separate from the usb/sd storage space. When I flashed the userdata.img on my Nexus S it didn't delete all my sd/usb storage....only the rom's data partition. Based on my previous experience, and considering this is the first time I've flashed a factory image to my Nexus 4, why would the name "userdata" give me any clue that something other than the "userdata" would be wiped???? Even if you don't take my previous experience into account, why would the name "userdata" ever have anything to do with "sd/usb data"???? userdata and sd storage are two separate things. Yes, they are stored in the same partition now, but that doesn't mean they are the same thing. userdata is tied to your rom, and your sd storage is for any additional personal files you decide to store there.
The problem is that the fake SD is on /data/media, so flashing a data IMG overwrites the entire partition and deletes your stuff. Lgnpst doesn't though, not sure why. Perhaps try that next time or just don't flash data.
Sent from my LG-LS970 using xda app-developers app
There are also very clear guides on here that tell you that flashing userdata will clear everything. Flash everything except that one next time.
Sent from my Nexus 4 using Tapatalk 4 Beta
Question if I do a factor reset on my MotoX DEV Ed. 4.4.2 updated with unlocked bootloader, TWRP, SuperSU will I need to reinstall TWRP and SuperSU or will I retain TWRP and SuperSU?
A factory reset just wipes /data (via recovery). It doesn't do anything to recovery or to /system. Put those two together and you have your answer.
CartlandSmith said:
And when you have TWRP installed, it doesn't even completely wipe data since your Nandroid backups survive a factory reset. I just did one and was surprised to see that.
Click to expand...
Click to collapse
"Data" in this case is the /data partition. Backups are stored on the SD card, which is a separate partition.
Sent from my Nexus 10 using Tapatalk
CartlandSmith said:
thanks I did eventually figure that out. So /data is apps, settings, contacts, texts, call logs. Anything else?
Click to expand...
Click to collapse
Correct.
Sent from my XT1060 using Tapatalk
kbluhm said:
"Data" in this case is the /data partition. Backups are stored on the SD card, which is a separate partition.
Sent from my Nexus 10 using Tapatalk
Click to expand...
Click to collapse
No it isn't. The /sdcard is /data/media. The reason that TWRP and CWM do not format this during a factory reset is that they are setup not to. They don't actually format when you do it, they do a "rm -rf" of everything except /data/media, unless you select the option to wipe everything, in which case, they actually format it.
So, I figured I'd set up the scenario first in hopes to help make this understood:
1. Got the device
2. Booted/Updated to 5.0
3. Rooted using CF Autoroot
4. Remained on Stock 5.0 + Root (Stock bootloader/recovery)
- 1st "OFFICIAL" ROM came out so like the gentle flash'aholic I am, I rushed and downloaded [ROM][Unofficial][5.0.2][alpha/wip] Resurrection Remix v5.2.6[victara]
1. I installed TWRP via the Google Play App, (I think i was on 2.8.3.0)
2. Rebooted into TWRP, and did a FULL BACKUP (saved locally)
3. Formatted Davlik, System, Data, Internal Storage, Cache
4. Rebooted into TWRP, pushed the ROM files ([ROM][Unofficial][5.0.2][alpha/wip] Resurrection Remix v5.2.6[victara])
5. Flashed the ROM, GAPPS, SuperSU, Rebooted.
After about a minute of booting into the new ROM (new red loading animation) I started to get "encryption unsuccessful", and the only option was to factory reset phone, after which nothing happened, my guess was because of the custom recovery.
What was my error, and how do I prevent this from happening again?
My thinking is that wiping the Cache/System/Data/Internal/Davlik partitions somehow messed up some function someplace?
To fix it I took steps in this thread (http://forum.xda-developers.com/moto-x-2014/help/lollipop-update-failing-how-troubleshoot-t2961633) - thanks @randyklein
-Download "Official 4.4.4 Full Restore Images" from http://www.graffixnyc.com/motox.php# and extract. Move recovery.img, boot.img, and system.img into adb folder
-Boot into fastboot, plug in USB
-Using mfastboot v2, run the following commands:
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash system system.img
How do I avoid this in the future if I decide to try a custom ROM/Recovery again?
Same problem...
Format data in twrp to fix encryption error
CWick4141 said:
Format data in twrp to fix encryption error
Click to expand...
Click to collapse
will i lose my twrp backup ?
marquesini said:
will i lose my twrp backup ?
Click to expand...
Click to collapse
Data partition just stores your apps (if not pre-loaded into system partition via ROM), and any data associated with them, so it leaves the Internal SD Card partition alone.
What concerns me is that I already wiped data, and I think I formatted the data partition as well, and still had the issue.
I'll have to try again soon.
I did a full wipe and then formated the data, then installed the ROM,gaaps,and supersu beta.
Got it working with root.
Shemploo said:
Data partition just stores your apps (if not pre-loaded into system partition via ROM), and any data associated with them, so it leaves the Internal SD Card partition alone.
What concerns me is that I already wiped data, and I think I formatted the data partition as well, and still had the issue.
I'll have to try again soon.
Click to expand...
Click to collapse
Formatting data in twrp is not the same as wiping data
CWick4141 said:
Formatting data in twrp is not the same as wiping data
Click to expand...
Click to collapse
True, that is why I said in above post that I think I formatted it as well, but being as I'm not certain I'll have to do it again to be sure.
Shemploo said:
True, that is why I said in above post that I think I formatted it as well, but being as I'm not certain I'll have to do it again to be sure.
Click to expand...
Click to collapse
You would know if you formatted data since it erases everything including internal storage
CWick4141 said:
You would know if you formatted data since it erases everything including internal storage
Click to expand...
Click to collapse
Alright, I booted TWRP, and clicked "Data" then "Repair/Change File System" it's currently showing f2fs, my format options are EXT2, EXT3, EXT4, FAT.
I think I want EXT4 right?
UPDATE: I tried EXT4 as every partition seems to use it, and from past experience, and It's working!.
Thank you for nudging me in the right direction.
edit: wrong thread
I flashed a file that was supposed to disable encryption but it still shows as "encrypted" in Security settings. How can I tell if encryption is actually enabled or not?
If not encrypted you will have option "Encrypt phone" in security settings. After flashing kernel that does not enforce encryption you need to format userdata.
The Resurrection Remix ROM I'm using gave a zip to flash that was supposed to disable encryption but all I did after flashing the ROM, Gapps, and then that file was wipe the cache and then the dalvik cache. What is formatting the userdata?
enginuity2 said:
I flashed a file that was supposed to disable encryption but it still shows as "encrypted" in Security settings. How can I tell if encryption is actually enabled or not?
Click to expand...
Click to collapse
flashing a file wont decrypt you. you have to decrpt yourself after flashing that file or a kernel that allows decrypting. you have to format your user data/storage, this will delete everything in your storage. only then will you be decrypted after booting up.
enginuity2 said:
The Resurrection Remix ROM I'm using gave a zip to flash that was supposed to disable encryption but all I did after flashing the ROM, Gapps, and then that file was wipe the cache and then the dalvik cache. What is formatting the userdata?
Click to expand...
Click to collapse
Connect device to a PC and use command "fastboot format userdata". This will wipe all your private stuff so backup before proceeding.
Can I do that through my TWRP recovery?
enginuity2 said:
Can I do that through my TWRP recovery?
Click to expand...
Click to collapse
You can. It is in Wipe>Format Data section. You will have to type "yes" to confirm.
Is that all I need to do to decrypt now? Just wipe the user/data? Can I install a new kernel and not have to wipe everything?
enginuity2 said:
Is that all I need to do to decrypt now? Just wipe the user/data? Can I install a new kernel and not have to wipe everything?
Click to expand...
Click to collapse
not wipe. format. they are two differing things. and yes, as long as it allows decryption.
That worked surprisingly well. Since I've already lost all of my data, what can I wipe in order to do a full clean install of my rom? TWRP gives me the option to wipe Dalvik Cache, System, Data, Internal Storage, and Cache. Your help is greatly appreciated.
enginuity2 said:
That worked surprisingly well. Since I've already lost all of my data, what can I wipe in order to do a full clean install of my rom? TWRP gives me the option to wipe Dalvik Cache, System, Data, Internal Storage, and Cache. Your help is greatly appreciated.
Click to expand...
Click to collapse
to get a full real wipe.. you should wipe system and data, then reflash your rom. because when you wipe system, you wipe your rom off your phone.
enginuity2 said:
That worked surprisingly well. Since I've already lost all of my data, what can I wipe in order to do a full clean install of my rom? TWRP gives me the option to wipe Dalvik Cache, System, Data, Internal Storage, and Cache. Your help is greatly appreciated.
Click to expand...
Click to collapse
Before you do that make sure that you can connect your device to PC in bootloader mode and in recovery mode (TWRP). If you wipe everything you will cut the branch you are sitting on.
Witek_M, you beat me to it. Thank you.
Witek_M said:
Before you do that make sure that you can connect your device to PC in bootloader mode and in recovery mode (TWRP). If you wipe everything you will cut the branch you are sitting on.
Click to expand...
Click to collapse
to be safe, ok. thats a great idea for newer folk.
but ill be honest, there are a few differing ways to get a rom onto your device from twrp. but you should downliad the rom beforehand, it wont get deleted. anyways, now you can use adb to transfer files, two differing ways. and you can just simply transfer a rom to your phone using twrp, not adb, as well.
What commands do I need to use to push the rom onto the phone?
enginuity2 said:
What commands do I need to use to push the rom onto the phone?
Click to expand...
Click to collapse
if anything, i use adb push. but twrp has an option now to tranfer roms over to your phone as well, without using adb.
So if I put the rom's zip, gapps, etc on the phone's storage and wipe system, the rom zip file and twrp will still be usable on the phone after that?
enginuity2 said:
So if I put the rom's zip, gapps, etc on the phone's storage and wipe system, the rom zip file and twrp will still be usable on the phone after that?
Click to expand...
Click to collapse
yes. wiping system will get rid of the rom, wiping data will get rid of all your apps and data, but none of them will wipe your storage. thats in advanced wipe settings.