I've had my nexus since December and have tried several ROMs since then--not a total noob, but there's a lot I don't know.
I've been wondering what part of the memory is left untouched by the factory wipes that I've been doing in preparation to flash a ROM? And is there any need to periodically wipe that portion of the memory to remove any remnants of ROMs or deleted apps or anything else that is potentially problem causing or just eating up memory space?
And would your answer explain this: I once did a factory wipe and then accidentally selected reboot before flashing the new ROM and the phone booted normally into the ROM I thought I had just wiped.
factory wipe (data/cache) in CWM only removes the apps, user data, and cache
it leaves /data/media alone (this is the /sdcard/ partition)
so if you hit reboot after a factory reset, it will still keep the same rom as /system is untouched unless you remove it or the rom installer script for the new rom deletes the partition.
When you wipe you clean the ROM for a new one to come. and as far as I know there's no storage to be cleaned up. When yo wipe cache and data it should be good to go.
Sent from my Galaxy Nexus using xda app-developers app
if you factory wipe using CWM, it will keep the data/media folder, which is all your sdcard contents. other than that the rest of the data folder (apps/settings) will get wiped.
if you wipe userdata using fastboot, either by typing in 'fastboot erase userdata' or when using the -w command when installing factory images then your sdcard will get formatted too.
Anytime you want to change Rom's just move the important files/pics/etc to a subfolder of /data/media or just copy them to your PC first. I think its good to factory reset every once in a while to clear out the remnants of uninstalled programs. Seems to speed up the phone too in my opinion.
Mounts & Storage → Format System "Not SD"
It will help with issues people mostly run into.
bOx Stash - https://www.box.com/shared/d8a46b7252c38069deb1
Related
Will wiping the phone in CWM delete files on the "SD" space of the phone? I've read it is all apart of the same partition, so I wanted to make sure before awkwardly deleting the ROM I am about to install..
I have wiped tons of times in CWR and it hasn't touched the /sd yet. All my files are safe and sound.
Sent from my GNex
Grims said:
Will wiping the phone in CWM delete files on the "SD" space of the phone? I've read it is all apart of the same partition, so I wanted to make sure before awkwardly deleting the ROM I am about to install..
Click to expand...
Click to collapse
Yes, it clears *all* internal storage.
So...which is it?
Maybe I misunderstood but are you talking about wiping /data and /cache? Because when I do this it does NOT wipe the /sd but does wipe all other user data, just like on every other android phone I have had.
Sent from my GNex
Grims said:
So...which is it?
Click to expand...
Click to collapse
Wipe data/factory reset on CWM wipes your WHOLE phone, including "SD" card. I advise you to use the Super Wipe Lite script from the Android Revolution ROM, get it here. This will do a complete wipe, except SD card.
A bit of more info, in case you're interested: the SD card is the folder /data/media mounted as /sdcard. When you wipe in CWM, the data folder is emptied as well.
EDIT: i havent actually tried to do a normal full wipe from CWM, im stating the above just from reading other reports here. Maybe the last version from CWM has fixed this, i dont know
EDIT2: You can wipe cache and dalvik as usual from CWM without any problems.
flakz0r said:
Wipe data/factory reset on CWM wipes your WHOLE phone, including "SD" card. I advise you to use the Super Wipe Lite script from the Android Revolution ROM, get it here. This will do a complete wipe, except SD card.
A bit of more info, in case you're interested: the SD card is the folder /data/media mounted as /sdcard. When you wipe in CWM, the data folder is emptied as well.
EDIT: i havent actually tried to do a normal full wipe from CWM, im stating the above just from reading other reports here. Maybe the last version from CWM has fixed this, i dont know
EDIT2: You can wipe cache and dalvik as usual from CWM without any problems.
Click to expand...
Click to collapse
I figured that was how it was setup, but didn't know if CWM had any logic built into it to filter out the folder. I'll take a look at the script, thanks.
The built-in factory reset in Android will also wipe everything.
I did data,cache,dalvik wipe and formatted system going from 4.0.2 to 4.0.3.
I did NOT lose my SD card
The default wipe in ICS clears *all* internal memory. The default Factory Reset feature of CWM does the exact same thing. I've done it twice and it wiped fully both times.
Very interesting direct contradictions going on in here..
Wiping data in CWM DOES NOT WIPE THE VIRTUAL SDCARD. People need to stop saying it does.. it is all one partition but the virtual SD card is not wiped when you wipe data in cwm.. Factory resets in settings will wipe your virtual SD card but cwm WILL NOT.
Edit: sorry I had a long night, but I will leave the caps so people actually read it.
Sent from my Galaxy Nexus using xda premium
It is quite troubling to read how many people are saying that wiping in CWM will erase the SD card.
It 100% DOES NOT. I have wiped in CWM dozens of times already. I can not say the same for Factory Reset in Android...but in CWM wiping data DOES NOT wipe your SD.
Hello everyone,
after more then 2 years with my trusted N1 i finally had to move to a new phone because i broke the screen of my old one.
having the GN now for allmost a week, and within the first few hours of owning the device it got 3 OTA updates and is now at 4.1.1. i am quite happy with it but 2 days ago i startet messing around wiht it. so i ulocked the boodloader and rooted and got myself franco kernel on the GN.
as expected everything worked fine.
today i wantet to give some 3th party roms a try. i tried installing MIUI and euroskanks cm10. both with rom manager.
but on each of them i got in a bootloop after flashing, just showing the franco kernel boot animation.
i flashed both roms without wiping the data (just the cache)
i suspect that is my problem.
i am a little bit scared about the wipe data option for flashing new roms. on my N1 it worked fine since all my files on the sd card where not touched and i could get started allmost immediantly.
unlocking the bootloader of the GN wiped everything out off my phone and i had to copy it all back from a backup.
if i choose wipe data will that also (again) wipe my complete device or just the "OS part" and leave my data alone?
if it wipes everything how do i avoid having to make a backup of my data and restore it afterwards after each and every rom i flash?
i have noted the mnt/sdcard folder on my GN that (apparently) just links back to the root of the memory. what is the puropse of this folder? just to be compatible with "old" apps that insist on writing files to the SD-card or something else?
thanks for the info
no data from sdcard gets removed.
its basically a "NON REMOVABLE sdcard"... think of it that way.
patlabor said:
Hello everyone,
if i choose wipe data will that also(again) wipe my complete device or just the "OS part" and leave my data alone?
if it wipes everything how do i avoid having to make a backup of my data and restore it afterwards after each and every rom i flash?
i have noted the mnt/sdcard folder on my GN that (apparently) just links back to the root of the memory. what is the puropse of this folder? just to be compatible with "old" apps that insist on writing files to the SD-card or something else?
thanks for the info
Click to expand...
Click to collapse
1. It will wipe your "OS part" + apps. Will leave data in "sdcard" alone. Factory Wipe clears the virtual "sdcard"
2. Can't be avoided, I use Wugfresh's toolkit to make app backups a breeze. Takes a little more time than it used to when I had my OG Droid with a EXT partition but hey, at least you'll always have a current backup of your apps.
3. Yes. It'd actually be less obvious it's still called /sdcard/ if you weren't rooted and poking around . I believe JB switches this to sdcard0 now to account for devices that have external sdcards to be mounted as /sdcard1 and so on.
Ok, I guess I get it.
Just one more thing to make sure.
It looks like all my files are in the root of my phone and mnt/sdcard has just one folder but with the same files as the folder with the same name in my root.
When I wipe data now will it keep everything or just the files in my mnt/sdcard folder?
patlabor said:
Ok, I guess I get it.
Just one more thing to make sure.
It looks like all my files are in the root of my phone and mnt/sdcard has just one folder but with the same files as the folder with the same name in my root.
When I wipe data now will it keep everything or just the files in my mnt/sdcard folder?
Click to expand...
Click to collapse
Custom recovery (AKA not CWM or TWRP or whatever you're using) will wipe your SD card. Just remember that.
All the custom recoveries wipe /data/ while keeping /data/media/ (your sd card).
Nothing on your "SDcard" will be lost.
I'm in the same situation as the original poster and would like a "definitive" answer. CWM has both a factory reset and a format /data option (in a separate submenu). Which preserve the content of the virtual sdcard ? Which is the raccomended way to try out a JB rom? I have 10+ Gb of data in the sdcard and i would like to avoid moving everything forth and back via MTP protocol...
Thanks
Sent from my Galaxy Nexus using xda app-developers app
IF you are using CWM recovery, "wiping data" will erase the entire userdata partition EXCLUDING /sdcard. This means that everything under /data (except /data/media which = /sdcard) will be erased. This includes all apps you have installed in /data, and most data for those apps.
IF you are using a stock recovery, "wiping data" or "factory reset, will wipe the entire userdata partition, including /sdcard.
Wiping data or factory restore/reset/whatever does NOT touch the system partition or return the device to "factory condition". So if you have installed apps in /system or have root, the will still be there.
I understand about wipe the dalvich cache, cache, and user data.* I see it is recommended that you format the system data and sd card and this is where I am confused.
I am on a custom rom and the next time I change roms I want to make sure I do it properly.* Before I flashed my latest JB rom I did a complete factory restore to 4.0.4 and then unlocked/rooted using one of the all in one programs. (wanted a clean install of all apps/data)* I then loaded rom manger downloaded my rom, went to recovery, wiped the cache, dalvich, and user data and while still in recovery I installed the downloaded rom no problem and everything is running fine.
My questions.
When they say back up your SD card is that what I see when I plug the phone into my computer? And this is the safe part of the system if all goes well during rom changing.
When told to format system and sd card here is what I see for my options:
Mount/sdcard
Mount/system
Unmount/cache
Unmount/data
Format/sdcard
Format/system
Format/cache
Format/data*
What do I actually need to do in this section and what order do I do it in?* Before or after the cache/dalvich/userdata?
And my main question is, if I use Rom Manger and download a rom, then reboot into recovery, then wipe the cache, dalvich, user data, and then do the format part above, will I lose the downloaded rom or is that part of the system untouched?
Unnecessary steps are unnecessary.
Rom install will format/wipe system for you and new dalvik cache will be generated automatically.
Going to a whole new rom, just do factory reset/wipe data from main screen in cwm. Then install rom.
Cache will be wiped with factory reset within cwm.
And yes when they say back up your sdcard, it means the files you see when you plug it into your computer.
Sent from my Nexus 7 using Tapatalk 2
Thanks for helping me understand more clearly. I guess i did do everything correct my last install.
korsjs said:
Thanks for helping me understand more clearly. I guess i did do everything correct my last install.
Click to expand...
Click to collapse
Sounds like you did it fine.
General rule of thumb is that there is no need to nuke and start fresh unless you are having some major issues with your rom
Sent from my Nexus 7 using Tapatalk 2
Have had my Galaxy Nexus for 2 years now. It was also my first android device so I've tried every app out there haha. This year I did my first root and tested a few roms. I think I have found one I like but before starting fresh I would like to completely restart my internal memory and SD card. Every flash I have done I have just done the factory reset which clears my SD card only I believe. I use TWRP and see that they have a few options to erase internal memory along with other things. Is it safe to do the advanced wipe? If I checked off all of the items and did the advanced erase, would I have to install the factory image in SDK again before being able to install a rom? How else would I install a rom if there is no data on the phone? All I am looking for is to completely clean up my phone before continuing on with it. Hopefully my post makes sense. Thanks for any future replies.
Best way to do that is to follow this guide and return to stock then start over. I'm pretty sure it wipes everything in the process.
http://forum.xda-developers.com/showthread.php?t=1626895
Yes I've done the return to stock from your link. Although some items are still in my internal memory left behind from apps. The options I speak of are as follows in TWRP.
Dalvik Cache
System
Cache
Data
Internal Storage
USB OTG
Question is can I just select all of these and wipe the phone and reinstall factory image in fastboot. or a rom in fastboot?
sumthin2die4 said:
Yes I've done the return to stock from your link. Although some items are still in my internal memory left behind from apps. The options I speak of are as follows in TWRP.
Dalvik Cache
System
Cache
Data
Internal Storage
USB OTG
Question is can I just select all of these and wipe the phone and reinstall factory image in fastboot. or a rom in fastboot?
Click to expand...
Click to collapse
re-lock then unlock the bootloader will wipe your data and internal sdcard.
flashing userdata.img with fastboot will do the same
Hello all,
Sorry for this semi-noob question. I have had many android phones and rooted all of them but this is my first Nexus device. I've unlocked my bootloader and have TWRP installed and I'm ready to install a ROM. Unfortunately I am unsure of how I can do a full wipe without wiping my internal storage too.
On every other phone I have had, I would go to advanced wipe and then wipe system, data, cache and dalvik cache but I just did that and it wiped my internal storage :/
I had to flash the stock system image through ADB because ADB sideload wasn't working. Now I'm afraid to wipe system again before trying again because I feel like it will wipe my internal storage again. How can I wipe system properly before installing a new ROM?
Thanks!
Now the interesting question here is: What is internal storage?
You seem to think it is the entire emmc, including your system, cache and data partitions but that is not how that term is used.
As far as I have been able to figure this out "Internal Storage" in Android refers to the entire /data partition which in itself again is divided into a user accessible part where your photos, videos, files are stored ( /data/media and mounted as /sdcard/0 ) and the rest of the /data partition which is used for apps you install and their data. That part is not accessible to the user unless you have root.
Now, for 99% of all wipe operations all you need to do when installing a new rom is to wipe the data partition of all user installed apps and their data, dalvik and cache - also called a 'clean install'.
Any rom installer worth a damn will format /system before installing a new rom, so wiping /system is redundant.
TWRP made this very easy: Enter the Wipe menu and swipe the button. Default is to wipe /data (without wiping /data/media), cache and Dalvik. Flash the rom - done.
berndblb said:
Now the interesting question here is: What is internal storage?
You seem to think it is the entire emmc, including your system, cache and data partitions but that is not how that term is used.
As far as I have been able to figure this out "Internal Storage" in Android refers to the entire /data partition which in itself again is divided into a user accessible part where your photos, videos, files are stored ( /data/media and mounted as /sdcard/0 ) and the rest of the /data partition which is used for apps you install and their data. That part is not accessible to the user unless you have root.
Now, for 99% of all wipe operations all you need to do when installing a new rom is to wipe the data partition of all user installed apps and their data, dalvik and cache - also called a 'clean install'.
Any rom installer worth a damn will format /system before installing a new rom, so wiping /system is redundant.
TWRP made this very easy: Enter the Wipe menu and swipe the button. Default is to wipe /data (without wiping /data/media), cache and Dalvik. Flash the rom - done.
Click to expand...
Click to collapse
"Internal Storage" as I used the term refers to just the user accessible part of the data partition where (as you said) photos, files, etc are stored. On previous versions of TWRP for phones I have had, you could wipe system, date, cache, etc and it would always leave internal storage intact. Ergo, after wiping, you could navigate to your downloads folder and find the ROM you wanted to flash. The issue I had was that I wiped "system" using TWRP and it wiped my "internal storage", meaning my downloads and photos and everything - leaving me with no ROM to flash.
You answered my question perfectly toward the end with this
Any rom installer worth a damn will format /system before installing a new rom, so wiping /system is redundant.
Click to expand...
Click to collapse
I come from a series of phones where this was not standard behavior for ROM installers, so failing to wipe system would lead to a dirty flash and almost assuredly cause issues. Thanks for the input, I will just do a data wipe from now on.
You shouldn't count on roms wiping system automatically.
A well established rom like pure Nexus for instance does not wipe system at flashing, leaving it up to the user to clean or dirty flash.
Always read and follow the installation instructions that come with the rom and you should have little problems. If there aren't any instructions, stay away from the rom is my advice, especially of you are a new user.
As to your question: go to the wipe menu in twrp. Then do an advanced wipe. Check every box except internal storage and wipe. Then proceed to flash your rom.
peltus said:
You shouldn't count on roms wiping system automatically.
A well established rom like pure Nexus for instance does not wipe system at flashing, leaving it up to the user to clean or dirty flash.
Always read and follow the installation instructions that come with the rom and you should have little problems. If there aren't any instructions, stay away from the rom is my advice, especially of you are a new user.
As to your question: go to the wipe menu in twrp. Then do an advanced wipe. Check every box except internal storage and wipe. Then proceed to flash your rom.
Click to expand...
Click to collapse
Thanks, I'm not a new user by any stretch, just new to the Nexus 5x.
As to your question: go to the wipe menu in twrp. Then do an advanced wipe. Check every box except internal storage and wipe. Then proceed to flash your rom.
Click to expand...
Click to collapse
This is exactly what I did when it wiped the ROM file (and all photos/sms backups) from my internal storage. That's how I have always wiped before flashing a new ROM in TWRP and this is the first time it ever wiped my internal storage, hence my question. I think I'll just stick to ROM installers that perform a system wipe. I plan on running the odex stock based ROM I just installed for a while anyway.
The_mamba said:
Thanks, I'm not a new user by any stretch, just new to the Nexus 5x.
This is exactly what I did when it wiped the ROM file (and all photos/sms backups) from my internal storage. That's how I have always wiped before flashing a new ROM in TWRP and this is the first time it ever wiped my internal storage, hence my question. I think I'll just stick to ROM installers that perform a system wipe. I plan on running the odex stock based ROM I just installed for a while anyway.
Click to expand...
Click to collapse
Sorry for assuming you're a newby. Last time i wiped that way in twrp (June 2016) it left my SD card alone. Maybe you checked the wrong box?
peltus said:
Sorry for assuming you're a newby. Last time i wiped that way in twrp (June 2016) it left my SD card alone. Maybe you checked the wrong box?
Click to expand...
Click to collapse
No worries, I appreciate the help either way. I suppose it's possible I checked the wrong box but I am very diligent about that because I have REALLY screwed myself over with that in the past. I accidentally wiped internal storage once or twice on my HTC One and had to RUU back to stock, losing everything including root. Luckily recovery is quicker and easier on the 5x (and the phone is brand new so it had no pictures on it).
I'm afraid to try it again even with a nandroid since the recovery files or stored on internal storage so wiping that would leave me SOL too. Like I said, I'll probably just ride on this ROM until the Nougat or so and then make a full cloud backup before trying a full wipe again.
Wiping system did not erase your files. /system is read only, so you nor your apps can store anything there.
I respectfully disagree with @peltus. In those parts of XDA where I "grew up" a dirty flash is a rom flash without wiping data. And I would be grateful for a link to a rom where the installation script does not involve formatting or wiping /system.
I could be wrong but I believe TWRP's wipe of data is without data/media.
Internal Storage wipes the entire data partition.
One if these days with more time I'll give it a try
Sent from my Nexus 5X using Tapatalk
BONUS: What is a data/media device?
https://twrp.me/faq/datamedia.html
The relevant part:
Since /data/media is part of /data, we pretty much never actually format the data partition. Formatting data, of course, also removes the media folder that contains the internal sdcard. When you choose a factory reset [or wipe data], instead of formatting, we use rm -rf commands to remove all the folders except for the media folder so that we can remove all of your apps and settings while leaving your "sdcard" intact. In TWRP we also have a wipe internal storage option that rm -rf's the media folder and a "Format Data" option that formats to recreate the entire file system in case something goes completely wrong or to remove device encryption.
Click to expand...
Click to collapse
[ ] - added by me.