Clean Wipe Android Phone Partitions with ADB/FASTBOOT Commands CMD - General Questions and Answers

Hello to everyone. Can anyone inform me about:
1. the exact commands in order to wipe all android partitions except /misc (/boot, /data, /cache, /recovery, /system).
2. the exact commands in order to flash two zip files (1. custom rom, 2. kernel)
3. is there anyway i can merge two android partitions specifically data with recovery because i don't want to use it anymore?
4. what exists after wiping a partition (unallocated space or allocated space)??
My device is HTC desire X UNLOCKED.
My purpose is to perform a clean install without using any custom recovery like TWRP or CWM.

Must have recovery
Got wipe then to advanced and click the box for cache do the wipe
Then go to install find your rom install it then find your kernel and install that then reboot

Kjssplass said:
Hello to everyone. Can anyone inform me about:
1. the exact commands in order to wipe all android partitions except /misc (/boot, /data, /cache, /recovery, /system).
2. the exact commands in order to flash two zip files (1. custom rom, 2. kernel)
3. is there anyway i can merge two android partitions specifically data with recovery because i don't want to use it anymore?
4. what exists after wiping a partition (unallocated space or allocated space)??
My device is HTC desire X UNLOCKED.
My purpose is to perform a clean install without using any custom recovery like TWRP or CWM.
Click to expand...
Click to collapse
1. You need a custom recovery.
2. You need a custom recovery.
3. If you need the data from them just copy and paste them. Not only is it not possible without compiling Android, but it is not useful.
4. Since wiping is usualy done with mkfs (or even rm -rf) allocated space will be made.

Related

Questions about "wiping" data

Ok, with all of the talk about making sure folks do a full wipe before installing ICS, I would like to get some clarification on all of the different wiping methods and which is the best way...
I know of these ways:
1. Via custom recovery - you can wipe data, system, cache, etc.. individually.
2. Via holding Power+VolumeDown until bootloader text appears,, then wait until menu appears and select the Wipe Data option (instead of the cold boot option).
3. Via AARD SuperWipe full script
And then of course, there is the "Reset to factory defaults" in the OS itself...
Which is the best to use? I would assume the AARD SuperWipe full would be the most thorough as it recreates the partitions and everything (instead of just formatting them).
FOr users that have the ability, would an NVFlash of the OS be "more thorough" than CWM method?
Opinions/Experiences?
Thanks!
Don't use super wipe script. A lot of people reported having problems of some ROMs not flashing correctly after using it. There is no reason to use the "full" version anyway. It formats the /media partition(your internal storage partition) which you don't want to nor need to format.
Wipe Data in your #2 does pretty much the same thing as "Reset to factory defaults". They both wipe /data and /cache but do not touch /system.
The most thorough way of wiping that I use is via CWM.
I do all of this within CWM if I want to ensure a clean install of a new ROM and it has never failed.
- wipe data/factory reset
- wipe cache partition
- advanced / Wipe Dalvik Cache
- Mounts and Storage / format /system
I am not sure how NVFlashing a ROM does a clean install? As far as I know, it just flashes whatever it's told to flash. It wouldn't even touch /data if you were just flashing a ROM with it.
horndroid said:
Don't use super wipe script. A lot of people reported having problems of some ROMs not flashing correctly after using it. There is no reason to use the "full" version anyway. It formats the /media partition(your internal storage partition) which you don't want to nor need to format.
Wipe Data in your #2 does pretty much the same thing as "Reset to factory defaults". They both wipe /data and /cache but do not touch /system.
The most thorough way of wiping that I use is via CWM.
I do all of this within CWM if I want to ensure a clean install of a new ROM and it has never failed.
- wipe data/factory reset
- wipe cache partition
- advanced / Wipe Dalvik Cache
- Mounts and Storage / format /system
I am not sure how NVFlashing a ROM does a clean install? As far as I know, it just flashes whatever it's told to flash. It wouldn't even touch /data if you were just flashing a ROM with it.
Click to expand...
Click to collapse
I've tried ALL of the above methods - all with the exact same results, to be honest...
Even if I revert back to honeycomb (even after a full wipe), I STILL exhibit the reboot issues (it's not just me - look around). This was NOT happening before with the exact same version of Revolver. This tells me that there is still yet something else that was changed during the ICS updates. We know the bootloader was updated - i'm now testing ICS with the old bootloader.
Other than the bootloader, what else could have changed?? Unless they upgraded the firmware on a particular device during the ICS update (wifi chip, bluetooth chip, etc). Other than that, I just can't come up with an explanation as to why Honeycomb won't even run properly anymore!
Sent from my Transformer TF101 using Tapatalk
horndroid said:
I am not sure how NVFlashing a ROM does a clean install? As far as I know, it just flashes whatever it's told to flash. It wouldn't even touch /data if you were just flashing a ROM with it.
Click to expand...
Click to collapse
If you use the --create flag, nvflash will format ALL the partitions and then flash them. If you use the --download flag, it will just overwrite the partitions you send it.
That being said, I agree at your wiping method is more than enough. Most times, I don't bother wiping, especially data.
sent from my cyanogen(mod) vision

Is not having external SDCard an issue for rooting?

I'll try to explain myself before people jump at me. I saw another thread with same question but seems like people misunderstood the question.
I am not talking about "lack" of memory, or not having another 32/64gb availble, etc.
I'll give you an example to what I am referring to:
Recently I decided that my rooted S2 needs a little 'refreshing', meaning - not just a wipe, but a complete format, to start from scratch. So I formatted everything, including /system and /emmc partitions. I then re-booted to recovery and had my rom file on the SD card so i was able to get a clean install.
Now, the question is - say I am at a stage when I need to 'refresh' the phone and wipe everything out. How do I then access the rom file for new install if I don't have external SD Card?
Thanks.
with adb.
What I do when I want a clean start, is I will load the rom/gapps/kernel to my phone, go to recovery, factory reset (with system if you choose), then flash all the things you want, then go back and wipe internal storage after. Then you're left with a fresh version of the ROM you want to install and no files whatsoever in the memory. Hope that helps.
I had the same suspicions a while ago. Basically with the nexus 5, even without an external sd, you can still do a full wipe of everything other than your storage. There is a path on the internal storage which essentially acts like an sd card, and when doing wipes in recovery it will not be wiped, unless of course you specifically choose to format /sdcard or all of /data. Read here for more info. I found that explanation very helpful.
So to answer your question, no, its not an issue.
Zepius said:
with adb.
Click to expand...
Click to collapse
This.
I have the same issue, with my OCD, that I always need a complete wipe of EVERYTHING.
One option, I recommend if that's not an option at the time of flash, is to simply "reset" in settings. It clears out the whole SD, which is something I usually want to do when I want a FULL flash
justinisloco said:
simply "reset" in settings. It clears out the whole SD, which is something I usually want to do when I want a FULL flash
Click to expand...
Click to collapse
Reset in settings just uses recovery unless something changed I haven't realised?
It should be down to what recovery you have (stock vs custom) as to whether a reset (regardless of how you initiate it) wipes /sdcard or not... or are you saying that's changed now?
Sent from my Nexus 5 using Tapatalk
Zepius said:
with adb.
Click to expand...
Click to collapse
Pardon my ignorance, but what is adb?
spitefulrain said:
What I do when I want a clean start, is I will load the rom/gapps/kernel to my phone, go to recovery, factory reset (with system if you choose), then flash all the things you want, then go back and wipe internal storage after. Then you're left with a fresh version of the ROM you want to install and no files whatsoever in the memory. Hope that helps.
Click to expand...
Click to collapse
Problem with factory reset, as far as I know, is that it does not wipe out everything. When I do factory reset in my S2, I still see old folders (even though empty) from before the wipe. That's why I like to format everything clean. When I mean clean, I don't want to see any old folder in there
justinisloco said:
This.
I have the same issue, with my OCD, that I always need a complete wipe of EVERYTHING.
One option, I recommend if that's not an option at the time of flash, is to simply "reset" in settings. It clears out the whole SD, which is something I usually want to do when I want a FULL flash
Click to expand...
Click to collapse
OK, but if you do that, where do you 'keep' the rom file and how do you flash it?
sbi1 said:
Pardon my ignorance, but what is adb?
OK, but if you do that, where do you 'keep' the rom file and how do you flash it?
Click to expand...
Click to collapse
Android Debug Bridge. It allows you to communicate with your phone via command line tools.
You would keep the rom somewhere on your internal storage (data/media) just like you would on any other phone. Then after wiping, you would simply choose to install zip from sdcard and your rom, along with any other flashable zip on your sdcard will be available to install. Basically when you do a typical full wipe from a custom recovery, the contents of your internal storage/sdcard are not wiped.
Chromium said:
Android Debug Bridge. It allows you to communicate with your phone via command line tools.
You would keep the rom somewhere on your internal storage (data/media) just like you would on any other phone. Then after wiping, you would simply choose to install zip from sdcard and your rom, along with any other flashable zip on your sdcard will be available to install. Basically when you do a typical full wipe from a custom recovery, the contents of your internal storage/sdcard are not wiped.
Click to expand...
Click to collapse
OK, this seems a bit too complicated for me
sbi1 said:
Problem with factory reset, as far as I know, is that it does not wipe out everything. When I do factory reset in my S2, I still see old folders (even though empty) from before the wipe. That's why I like to format everything clean. When I mean clean, I don't want to see any old folder in there
Click to expand...
Click to collapse
Which is why I said wipe your internal storage after
Sent from my Nexus 5 using Tapatalk
rootSU said:
Reset in settings just uses recovery unless something changed I haven't realised?
It should be down to what recovery you have (stock vs custom) as to whether a reset (regardless of how you initiate it) wipes /sdcard or not... or are you saying that's changed now?
Click to expand...
Click to collapse
Lately, I've noticed that it wipes the Data as well. Unless It was only on CWM that it happened? I had installed CM11 with CWM and wanted to reset my SD. I used the reset feature and it erased everything, except the OS
sbi1 said:
OK, but if you do that, where do you 'keep' the rom file and how do you flash it?
Click to expand...
Click to collapse
I would flash the Rom first, then do the factory reset, the only downside is the nandroid you made may be lost, unless you uploaded it to GDrive or something.
---------------------------------------
Using this guide, you will be able to learn about ADB
http://forum.xda-developers.com/goo...ide-nexus-5-how-to-unlock-bootloader-t2507905
In Step 3-
Chromium said:
3. Rooting
Now that your phone has an unlocked bootloader and a custom recovery installed you have a two options to gain root (Pick one or the other. You don't need to do both)
Option A) Flash SuperSU binaries which will give you root with the stock rom
Confirm that you have downloaded the SuperSU zip from the downloads section above and that it is located in the platform-tools folder inside of the android-sdk-windows folder on your desktop.
Turn the phone off then boot into the bootloader. (volume down + power). Once in the bootloader use the volume rockers to scroll onto Recovery Mode, then press power to select it. This should bring you into your newly installed custom recovery. Leave the phone at the home page of the custom recovery.
Open a command prompt window and run the following commands:
Code:
cd Desktop/android-sdk-windows/platform-tools
Code:
adb push UPDATE-SuperSU-v[COLOR="Red"]X[/COLOR].[COLOR="red"]XX[/COLOR].zip /sdcard/
This will copy the SuperSU zip onto your phone. Once the command has completed continue.
Instructions for TeamWin Recovery Project (TWRP):
Install > browse to SuperSU zip and select the it
Swipe to confirm the installation. Then reboot.
Click to expand...
Click to collapse
It shows how to "Push" a file to your phone. That is the best way, IMO. But instead of SuperSU, just "adb push ROM.zip /sdcard/"
sbi1 said:
OK, this seems a bit too complicated for me
Click to expand...
Click to collapse
Flashing the rom? Its honestly not any more complicated than flashing a rom for any other device. You download the rom to your internal storage. Boot into recovery. Then do a full wipe:
TWRP Full Wipe:
- Wipe
- Advanced wipe
- Select all, except internal storage
- Swipe to wipe
CWM Full Wipe:
- wipe data/factory reset
- wipe cache partition
- advanced > wipe dalvik cache
- mounts and storage > format /system
Finally you can then flash the rom (and gapps).
sbi1 said:
OK, this seems a bit too complicated for me
Click to expand...
Click to collapse
It's not really and if you're rooting and flashing any device, adb is essential knowledge.
Once you've installed adb (millions of guides on the net) you just boot into recovery then connect to pc via usb.
adb commands are run from cmd prompt.
For example...
adb push c:\users\sbi1\desktop\rom.zip /sdcard
Would push the file on your windows desktop called rom.zip to your sdcard.
You can even sideload from recovery.
Or better yet,.just don't wipe /sdcard. It has no benefit other than looking tidy anyway
Sent from my Nexus 5 using Tapatalk
---------- Post added at 10:20 PM ---------- Previous post was at 10:17 PM ----------
Ok too many cooks... i'm bowing out
Sent from my Nexus 5 using Tapatalk
OK, thank you all. So I should have no worries then. Was just wondering how this is done without external SD and it seems to be working fine. Thanks again!
Chromium said:
CWM Full Wipe:
- wipe data/factory reset
- wipe cache partition
- advanced > wipe dalvik cache
- mounts and storage > format /system
Click to expand...
Click to collapse
Parting note
Philz Touch Full Wipe:
- wipe data/factory reset > clean to install new ROM
(Does all the steps mentioned above at once)
Sent from my Nexus 5 using Tapatalk

custom Rom install never works!

Hey guys,
General custom Rom question. Each time I install any custom, following the directions 100% it will never install properly. No matter what when I reboot back into TWRP it doesn't mount data.
Here's some instructions for an example from the latest one I tried Havok.
What am I doing wrong?
How to install
+ if you are coming from OOS then you will need to wipe your data as well as internal storage due to encrypted data but if you had any custom ROM before then just wipe data. No need to wipe internal storage.
for updating
1: Flash ROM
2: Flash TWRP installer
3: reboot again to recovery to boot from second slot.
4: Flash Gapps
5: Flash magisk
6: wipe dalvik cache and reboot to system.
That's all.
use tool all in one to decrypt internal storage

[QUESTION] How to mount /system partition in TWRP or OrangeFox ?

I recently started flashing my Poco X3 with a new rom and some mods, but I quickly realized that when I was flashing my G-Apps package that my /system partition didn't have the free space required to install this package.
I did a bit of research and found out that with TWRP or OrangeFox recovery you could increase the partition size by going into: Wipe > Selecting the partition you want > Fix Partition.
So the next logic step was to try and replicate the same thing on my own phone, but when I went on my custom recovery, I saw that my /system partition wasn't appearing, so I tried to manually mount it by going into the mount option but that did not work, also tried in the terminal by typing "mount /system" but that did nothing saying that "partition /system is not in fstab".
So now I'm completely stuck because to change my ROM I need to wipe the /system partiton which apparently doesn't exist and both recoveries do not work.
PS: I tried this method on all of the recoveries present on the Forum.
I'm asking you guys if you have any idea how to fix this issue or if I have to wait until someone releases a new recovery that is actually fixed ? Thank you.
AFAIK you can't and you shouldn't mess with system partition in any "old standard" way in Poco X3 NFC ... for now it will can make more damage than benefits... you should flash gapps with minimal size that can be safely flashed and install the rest from Play... you want to know more? learn about dynamic partitions used in our phone, I just know that recoveries are patched so people can't brick their phones anymore...

HELP ! WHILE FLASHING LINEAGE 18.1 it's say E001: FAILED TO UPDATE SYSTEM IMAGE HELP PLZ :

Help me with this situation
Why can not flash?
Do you Reverted partition to stock partitioning?
Is your recovery an up to date recovery like TWRP 3.2.x,3.5.1, OrangeFox ,SHRP?
sys1admin said:
Help me with this situation
Click to expand...
Click to collapse
That happened to me once when using the reparticioner I had to install the rom 8.1 to my factory phone with odin after the first start I installed the twrp and from there my cell phone started working fine again
sys1admin said:
Help me with this situation
Click to expand...
Click to collapse
First thing is few lineage OS not work on Vendor partition. To over come this use below steps:
Note: Use orange fox recovery for smooth flow
1. Run revert vendor practitioner for exynos 7870.
2. Then reboot to recovery.
3. Goto format option perform format ( This will erase your internal storage data before action this step take a backup)
4. Then navigate to wipe option then wipe Dalivk cache, cache, system, data, internal storage
5. Then install lineage os zip. reboot and enjoy
If you want to install any treble rom in feature better use Universal script. This script make 4096MB system partition, 512MB vendor partition & 57 cache partition

Categories

Resources