[SOLVED] How to completely wipe literally EVERYTHING - Nexus 5X Q&A, Help & Troubleshooting

I looked through many threads, posts, websites, and tutorials, but none of them say how to literally wipe my device completely (it could be that it's not possible), what I want to do is completely remove literally everything so that it's like a brand new hard drive without even any files in it.
'Factory Reset' doesn't remove everything because android still boots after a factory reset and android wouldn't be able to boot if there were no files on the device. TWRP doesn't remove everything either because how is twrp running, and I can still see the androids root directories in twrps file manager (TWRP does tell me that there's no OS installed, but then why is there still a functioning file system with actual files in them).
I want to completely wipe everything so that any future roms I download will have no way to be affected by any old kernels/roms/apps that I have installed in the past. I want to clean install android on top of a literally empty phone hard drive. If this isn't possible then what's the closest to that that I can get? Cuz I tried various roms and I had bugs that persisted between multiple roms even though other people said that they didn't have these issues.
In case you're wondering: I'm currently running LineageOS 15.1, oreo 8.1

Your best bet it to wipe using stock image. Reinstall TWRP and wipe system, cache and data before installing new ROM

I agree with the advice given by Vanschtezla.
Also, if you would completely wipe all data on the phone's storage then that would also wipe the partition table. The storage area is divided into partitions which are mounted to for example /system /data and /cache when your phone boots.
Also there is no real need to "wipe everything" as you say as that could brick your phone. If you just boot TWRP and wipe using "Factory reset" and additionally: System then everything should be clean enough to install a new ROM. Depending on the ROM it will wipe the System partition anyway.
Kernels reside in the system partition so when you wipe System, any Kernel is gone
Pre installed (system) Apps sit in the System partition so wipe System and they are gone
User Apps sit in the data partition so wipe data (that is included in the Factory reset) and they're gone
All in all I think you're expecting issues that simply do not exist. Especially if you just follow the instructions of the (custom) ROM you want to install.

THANK YOU!
peterpv said:
I agree with the advice given by Vanschtezla.
Kernels reside in the system partition so when you wipe System, any Kernel is gone
Pre installed (system) Apps sit in the System partition so wipe System and they are gone
User Apps sit in the data partition so wipe data (that is included in the Factory reset) and they're gone
Click to expand...
Click to collapse
This is exactly what I was looking for! Why don't any "How to wipe your phone" guides say these things (even the ones that get more technical don't mention what exactly gets deleted for each wipe option, which is why from your perspective it was probably very weird to read my question).

Related

[Q] Wiping Cache from Recovery? *PLEASE HELP*

Upon booting up via Vol. Down + Power, there are four options (fastboot, recovery, wipe cache, and simunlock). What happens when you wipe cache?
I just installed a new ROM (well updated), couldnt get it to boot as I was stuck on the custom boot screen, but after wipe cache it loads up?
Does this effect the functionality at all? Please help. Thanks
I believe this is a factory wipe, but is a dumbed down version, that does not wipe /sd-ext partitions etc. Just removes /data programs and user info, but won't touch any /system applications.
It is used to reset the phone without actually booting up the OS
Any particular reason why my ROM wouldnt boot up normally but requires a cache wipe in order to boot?
trenwei said:
Any particular reason why my ROM wouldnt boot up normally but requires a cache wipe in order to boot?
Click to expand...
Click to collapse
Soms roms will require you to wipe dalvik cache in order for the new rom to boot (conflicts can be caused), and wiping this cache would do it, however you can just wipe dalvik cache from recovery not this hboot menu.
For future reference when changing roms, especially when changing to someone elses rom (and especially especially when its a different base) you should be doing a full wipe
A full wipe is:
-Data (factory reset)
-Dalvik Cache
-Ext partition (although sometimes you can get away with skipping this one)
You should be able to wipe those three from both Amon-RA and Clockwork Mod recoveries.
NOTE: I am sleep deprived, so this will proberly not make alot of sense
I'm not that technical with the Android system (have worked with linux abit though)
Deleting the cache would remove any saved data from the system. These saved items may contain anything from images to which default program is loaded, to which widgets are loaded on the homscreen.
This is why after a new install the phone takes a little longer booting up, creating all the new files. If you need me to go into cache, use Google.
Another theory would be:
After an upgrade, some files and apps think that the system has changed owners, so their permissions change from read/write to read/only etc.
With this, some system files will become inaccessible, will be unable to be edited and so forth.
A way around this would be to "fix" the permissions of the data, changing the owner of the files allowing read/write permissions
Rom Manager has a nice little feature that allows you to fix permissions, and has come very helpful for me, with my switching to and from OD/Pinky, and restoring LauncherPro, which likes to FC at every restore -.-.

Guide/// Full Wipe To Install Roms Perfectly

I know this is not a development thread but I must insist we have something like this in this area. I feel it's important to all development for accurate results and debug information.
I see this all the time. People think they are fully wiping when a developer asks for it. I believe that some people still don't understand what a full wipe is because there is no such single option in ClockWorkMod Recovery. Most likely the reason for that is because Koush didn't want too many posts about "I'm stuck on Google logo" or "my phone won't boot". So here is a test you can do yourself: Backup your ROM of course, and then do a full wipe. Then don't install anything and just reboot. If you end up pass the Google logo and onto the boot loop screen, then what you think is a full wipe is incorrect. If you are stuck on the Google logo and nothing is happening however, then congratulations... you know what you're doing 
For the rest of you, here are proper steps to fully wipe without leaving any trace of ROM on your phone:
* wipe data/factory reset
* format /system
* format /boot
Now most people think that the first option is enough. That may often be the case but because the developer can drastically change the contents of the /system folder, things can get messed up if you don't format it. And guess what, that first option will not do it. Wipe data/factory reset only wipes the /data folder which contains your personal settings and all the apps you installed. The ROM is then left blank as if you just flashed it and you can start over. FYI, the format of boot partition simply wipes the boot animation and you can restore it using the advance option in recovery from ROM to another.
I've seen some zip files which do this automatically so that's fine but at least you know what needs to be done to fully wipe.
There you go. I hope this clears some things. Now lets flash some ROMs! 
Credit
Obasanity

[Q] Proper way to completely format a galaxy nexus in preparation for a custom rom?

What is the proper way to format a galaxy nexus? I want to clear everything possible and start fresh in an attempt to solve the abysmal write speeds I've been getting recently and I don't want to wind up bricking the thing in the process since I know certain partitions store the boot loader and more.
Other attempts to fix the write speed including fstrim, changing the mount command to enable trimming deleted files automatically, completely filling all free space with zeros then removing it, and none have helped yet. It gets approximately 0.10-0.15KB/s on random write with androbench, 2.0-5.5MB/s for sequencial write. I've never had anything less than 12GB free space, except when I tried filling all the free space
I want to format before reinstalling cyanogenmod and I understand there are risks involved that could brick my device so any instruction for what should and should not be touched would be greatly appreciated.
You need custom recovery installed (twrp or cwm). I have twrp. You need from recovery, for example twrp, wipe cache, dalvik cache, data and system from advanced wipe menu. After that, you should put in queue rom (which you are installing in zip format), then gapps(not all rom's need gapps, read install description for current rom) and custom kernel (not necessarily). After you just swipe on menu to proceed with installation and thats it
marko207 said:
You need custom recovery installed (twrp or cwm). I have twrp. You need from recovery, for example twrp, wipe cache, dalvik cache, data and system from advanced wipe menu. After that, you should put in queue rom (which you are installing in zip format), then gapps(not all rom's need gapps, read install description for current rom) and custom kernel (not necessarily). After you just swipe on menu to proceed with installation and thats it
Click to expand...
Click to collapse
Make sure yu don't wipe "sdcard data" (there's a difference in System Data and SDCard Data). Marco207 mentioned that yu will have to wipe System Data. Rest yu may wipe anything, in fact, everything in case yu want a whole fresh ROM.

Clean Flash Custom Rom

I know I saw this process in a recent thread but I've misplaced it. If anyone can point me to it, I would be grateful.
I want to clean flash CM 13 on my OP3.
From what I remember, I'm supposed to store the CM 13 zip file and gapps file in the SD Card folder. Is that truly correct? The OP3 doesn't have an SD Card though I did find a folder.
If I do a factory reset and wipe everything, won't that folder also get wiped? Then how would I install the ROM from the phone?
Sorry, I know this is a straightforward process for many of you, and dirty flashing is easy. But I think a clean flash is better and I'd rather not guess and end up with a bricked phone I have to fuss with.
Again, I know this exact process is in a thread somewhere but I can't find it.
the phone storage is /sdcard/
u can use something like ES File Explorer and create a folder called CM13 or whatever u want
u do have ur bootloader unlocked and twrp installed, correct?
yes u will just the get cm zip file and put it in a folder (ex. /sdcard/CM13/)
i put the gapps in the same folder
create a nandroid backup
wipe/advance wipe - wipe caches/data/system !!!!Do NOT WIPE - INTERNAL STORAGE OR OTG!!!
then flash cm zip and gapps
Hi, thank you. Yes, bootloader unlocked, twrp installed and I've done it in the past on a different phone but couldn't sort out clean flashing from dirty flashing. I've done it correctly in the past, and it's also gone very wrong for me. I think I mistakenly wiped internal storage once and that was a disaster.
Somewhere I've also read about a factory reset through trwp.
I don't need to do that, or wiping caches/data/system is the same thing?
.
digger16309 said:
Hi, thank you. Yes, bootloader unlocked, twrp installed and I've done it in the past on a different phone but couldn't sort out clean flashing from dirty flashing. I've done it correctly in the past, and it's also gone very wrong for me. I think I mistakenly wiped internal storage once and that was a disaster.
Somewhere I've also read about a factory reset through trwp.
I don't need to do that, or wiping caches/data/system is the same thing?
.
Click to expand...
Click to collapse
If you wipe internal storage, you will lose the zips for your ROM and GAPPS. You can connect your device and have it recognized on your PC from within TWRP if you do accidentally wipe your internal storage.
Factory reset doesn't wipe the system partition as that would remove your OS. Most Roms will wipe your system partition before it installs itself so generally you don't have to wipe the system partition manually, but it's good practice.
Clean flash = wipe dalvik, cache, data; then install ROM (which will wipe system before it installs, or manually wipe system before the ROM install for good measure).
Dirty flash = flash ROM, then wipe dalvik and cache. The only time you should do this if the ROM you're looking to flash says it can be done (ie. CM nightlies).

wipse system in TWRP

I accidentally wiped the system in TRWP and the phone won't boot, it just shows white screen with HTC logo and the red text down.
Did I just wiped my android from the phone?
I can get into bootloader and recovery. But I dont have rom in my internal storage. (because I deleted everything) How can I put rom.zip into my storage again and do the flash?
PLEASE HELP!
delete please have found an answer
JernejB2 said:
delete please have found an answer
Click to expand...
Click to collapse
Threads typically aren't deleted on XDA. If you found a solution, post it for the benefit of others that may have the same/similar issue.
In the future, you shouldn't be wiping anything, if you have no idea what it is, or what the outcome will be. It says right on the TWRP Wipe section, that the default wipe is the only one you need most of the time. And it says that for a reason. And the remaining options are also called "Advanced" for good reason.
Yes, "system" is the Android Operating System. By wiping it, you wiped the whole OS.
Recovering from this is typically done by putting a ROM on removable SD, or alternately using adb push to put a ROM on the phone. Then boot into TWRP and install the ROM.
You should also typically have TWRP backup of your current ROM, for easy recovery. Basic good practice to always have a TWRP "nandroid" backup whenever messing with the phone (root, ROMs, other mods). And there is usually not a good reason to wipe "everything" (all at the same time) and therefore also wipe your backups wherever they may be (internal storage or SD card).

Categories

Resources