[Q] [VERY STRANGE] Wipe data doesn't work anymore! - Samsung Galaxy Nexus

Hi everybody,
I'm getting into the new AOKP Milestone 4 from the Codename 1.5.0 - so I downloaded the files and get recovery (clockwork 5.5.0.2) to make the wipes and flash the new rom and gapps... the usual routine.
Wipe data - Wipe Cache - Wipe Dalvik - Flash AOKP - FLASH GAPPS - REBOOT
1st strange thing after that: the Old Franco Kernel bootlogo. And in stuck, obv.
Why the Franco bootlogo? Bah, re-wipe everything and go on...
Nothing, stuck on Franco. So I decided to re.wipe everything again and re install the Codename android, 1.5.0 - the same wich i was coming from - to get the phone work for tomorrow. And here we go for the biggest surprise.
EVERYTHING IS HOW I LEFT BEFORE THE WIPES WHEN I WAS ON CODENAME!!!!!
Same routine, flashed Codename and reboot. Franco logo and then no configuration wizard, no backups.. everything was EXACTLY like how i left before the first attempt!!! My apps, my homescreen, even my login account, like i have never attempt any wipe or flash!!!!
IT DOESN'T WIPE ANYTHING, ANYMORE!
I'm getting mad.. tried this ten times. It's like nothing is getting wiped!
P.s: clockwork is correctly installed.. i've tried TONS of roms on my gnexus, everything has ALWAYS worked fine. No errors during wiping, usuals script "wiping /data .... wiping /cache etc.." until "DONE". No error flashing the AOKP.
Help please..
Fab

Hey there,
mike, the dev from Android Revolution HD, has a super wipe script in his thread, on the first page, might want to try that one.
It works like flashing a ROM
-Syn

You are not wiping correctly. You are having problems because the system and boot partitions were not wiped at all....
Sent from my Galaxy Nexus using xda premium

SynFox said:
Hey there,
mike, the dev from Android Revolution HD, has a super wipe script in his thread, on the first page, might want to try that one.
It works like flashing a ROM
-Syn
Click to expand...
Click to collapse
Already tried. Same results, it ends successfully the superwipe string.. and then no wipe at all!

adb reboot bootloader
fastboot -w (might wipe SD card)
or
fastboot erase system
fastboot erase userdata
fastboot erase cache
fastboot update update.zip (for installing the rom)

Ok new infos.
From the log file the /data wipe seems to be undone due to the "filesystem is read only".
Any ideas?

Stupid question... but maybe check if the device is still rooted and unlocked correctly?
Maybe something messed up there...

these are signs that the internal hdd is getting screwed up... like the partition values... its a known issue for all samsung devices. the i9000 had it, the nexus s had it. they even have a lot of threads out there reporting issues abt it but no fix till now. i even had it with my nexus s (which is now a paperweight)
some fixed it with a simple wipe using oem lock n unlock, others fastboot wipe....
the most common symptom is that you can see a lot of files on your phone, but can neither delete them nor add anyting to the sdcard.

As anton2009 said, you should try wiping all the partitions, then reflash CWM, then flash your ROM/kernel.
Reboot into fastboot and type the following:
fastboot erase boot
fastboot erase system
fastboot erase recovery
fastboot erase userdata Note this will wipe/sdcard
fastboot erase cache
Then flash CWM and then ROM/kernel.
Sent from my Galaxy Nexus using Tapatalk

I am also having the same issue. However I just reflashed a bunch of roms and even though all my data is still there everything seems to be working fine.

Cptsamir said:
I am also having the same issue. However I just reflashed a bunch of roms and even though all my data is still there everything seems to be working fine.
Click to expand...
Click to collapse
Guys, all of your data is stored on the userdata partition. Most ROMs I don't think flash that partition, so all the data still remains. As well, I don't think every ROM includes a kernel, so the boot partition is not erase either. Wiping in CWM does not wipe /sdcard (which is actually located on the userdata partition as /data/media).
Use what I had posted 2 posts up and it will certainly wipe.

efrant said:
Guys, all of your data is stored on the userdata partition. Most ROMs I don't think flash that partition, so all the data still remains. As well, I don't think every ROM includes a kernel, so the boot partition is not erase either. Wiping in CWM does not wipe /sdcard (which is actually located on the userdata partition as /data/media).
Use what I had posted 2 posts up and it will certainly wipe.
Click to expand...
Click to collapse
I also think your solution will work well.
My only question is about new rom flashing: erasing ALL datas even in the /sdcard how will I be able to flash new roms if there will be nothing more on the phone? Where will i get'em?
Will I need to flash again even the CWM?
Sorry for the stupid question..

fab2disco said:
I also think your solution will work well.
My only question is about new rom flashing: erasing ALL datas even in the /sdcard how will I be able to flash new roms if there will be nothing more on the phone? Where will i get'em?
Will I need to flash again even the CWM?
Sorry for the stupid question..
Click to expand...
Click to collapse
You can still wipe userdata, boot into Android (obviously you can't do this if you wipe system), and download a rom from there. Otherwise you can download a rom onto your computer and then:
adb push /where/your/file/is/rom.zip /data/media/download
This will put the file from your computer to your download folder in your SD card. I'd recommend pulling any necessary files before you wipe userdata (such as music, pictures, etc) or you can pull the whole SD card (adb pull /data/media) and then cherry pick what you want to add back later.

SOLVED.
Wiped all with fastboot, pushed new rom with adb push and flash it.
Just to feel relaxed installed a couple of apps, gone back in recovery and tried to wipe data/cache/dalvick then re-flashed AOKP, everything is now working fine, the wipe erase all app and userdata now.
Hope this won't happen anymore.. thank you all..

fab2disco said:
SOLVED.
Wiped all with fastboot, pushed new rom with adb push and flash it.
Just to feel relaxed installed a couple of apps, gone back in recovery and tried to wipe data/cache/dalvick then re-flashed AOKP, everything is now working fine, the wipe erase all app and userdata now.
Hope this won't happen anymore.. thank you all..
Click to expand...
Click to collapse
Good to hear! Glad everything worked out for you. You can put [Solved] in the thread title so other people with the same problem will know what to do.

anton2009 said:
Good to hear! Glad everything worked out for you. You can put [Solved] in the thread title so other people with the same problem will know what to do.
Click to expand...
Click to collapse
I feel sooooo newbie, but.. how can I do that?

Backing up and restoring /sdcard is very time-consuming and usually unnecessary in these situations. It only takes a minute to fix the filesystem errors on /data and then you can wipe data as normal (in CWM, no need to use fastboot which also erases /sdcard). Just boot into CWM and in an adb shell:
Code:
e2fsck /dev/block/mmcblk0p12
Answer 'y' to everything if prompted. Done.

Jimmy Flip said:
Backing up and restoring /sdcard is very time-consuming and usually unnecessary in these situations. It only takes a minute to fix the filesystem errors on /data and then you can wipe data as normal (in CWM, no need to use fastboot which also erases /sdcard). Just boot into CWM and in an adb shell:
Code:
e2fsck /dev/block/mmcblk0p12
Answer 'y' to everything if prompted. Done.
Click to expand...
Click to collapse
Confirmed working.. Thanks a lot for your help. You are a life saver.

Help
I can't delete anything, i can't flash anything..
everything stay where it is, wipe or format doesn't work.. and my phone is stucked on infinite reboot..
please help!

Dobie999 said:
I can't delete anything, i can't flash anything..
everything stay where it is, wipe or format doesn't work.. and my phone is stucked on infinite reboot..
please help!
Click to expand...
Click to collapse
Try to lock the bootloder and if it fails, your phone is bricked...the emmc is broken.. try warranty

Related

[Q] How do you format internal memory?

I know the formating option in cwm recovery but that only deletes the
data files it does not format the whole internal memory.
So how do you do this? i heard people just use oem lock
and oem unlock to relock the bootloaded and unlock it again since that seems
to wipe everything.
But i wanna know if theres legit command that does formatting of internal
storage for galaxy nexus?
best way is to use the fastboot commands
fastboot oem lock
fastboot oem unlock
0806sung said:
I know the formating option in cwm recovery but that only deletes the
data files it does not format the whole internal memory.
So how do you do this? i heard people just use oem lock
and oem unlock to relock the bootloaded and unlock it again since that seems
to wipe everything.
Click to expand...
Click to collapse
Zepius said:
best way is to use the fastboot commands
fastboot oem lock
fastboot oem unlock
Click to expand...
Click to collapse
That does not erase everything.
0806sung said:
But i wanna know if theres legit command that does formatting of internal
storage for galaxy nexus?
Click to expand...
Click to collapse
Yes. Reboot your device into fastboot and type the following:
fastboot erase system
fastboot erase userdata
fastboot erase boot
fastboot erase recovery
fastboot erase cache
Device is now wiped. You will need to flash a new ROM afterwards...
ive followed these steps and done all of the commands but now i cannot flash a rom.
im launched straight to fastboot, (as theres no rom) and it says no boot or recovery img.
i can get into CWM, but i see this.
E:Can't mount /sdcard/
any ideas anyone? think i need to look for a boot.img?
iamdarren said:
ive followed these steps and done all of the commands but now i cannot flash a rom.
im launched straight to fastboot, (as theres no rom) and it says no boot or recovery img.
i can get into CWM, but i see this.
E:Can't mount /sdcard/
any ideas anyone? think i need to look for a boot.img?
Click to expand...
Click to collapse
If you followed my steps above, you have effectively wiped your device (except the bootloader, radio and splash image).
You can't see /sdcard, because /sdcard is just a symlink to /data/media, which you just wiped.
You need to re-flash all the partitions that you just wiped. What ROM are you trying to flash, and how are you trying to flash it? If you are trying to flash a ROM in recovery and need /sdcard, you need to first flash the userdata partition with the stock userdata.img found in one of the images here.
great minds... i have already done that, went here http://code.google.com/android/nexus/images.html#yakju then flashed each .img one by one through nexus toolkit.
booted up into stock already. nice
thanks
I have the battery not charging issue. On top of that I can't fastboot my phone since it is not recognized by my PC. So how can I wipe the internal storage? I have only a certain amount of battery left. And I do not want to send all my private data to Samsung support.
ouilsen said:
I have the battery not charging issue. On top of that I can't fastboot my phone since it is not recognized by my PC. So how can I wipe the internal storage? I have only a certain amount of battery left. And I do not want to send all my private data to Samsung support.
Click to expand...
Click to collapse
Why is it not recognized by your PC. Did you install the drivers properly?
let me introduce u another way :
get to download mode and use oding to flash a new stock rom . if u dont have xda page u can use this to get proper file i used it 5 time with no fail
h t t p : / / androidadvices.com/update-galaxy-nexus-official-ics-404-firmware-odin/2/#.UBdkTSK42U0
flashing new kernel willerase all internal storage that gnexus let u use
---------- Post added at 09:30 AM ---------- Previous post was at 09:27 AM ----------
but this method will wipe your recovery image , after that u should flash recovery image and su
afraaa said:
let me introduce u another way :
get to download mode and use oding to flash a new stock rom . if u dont have xda page u can use this to get proper file i used it 5 time with no fail
h t t p : / / androidadvices.com/update-galaxy-nexus-official-ics-404-firmware-odin/2/#.UBdkTSK42U0
flashing new kernel willerase all internal storage that gnexus let u use
---------- Post added at 09:30 AM ---------- Previous post was at 09:27 AM ----------
but this method will wipe your recovery image , after that u should flash recovery image and su
Click to expand...
Click to collapse
Odin is a leaked Samsung tool. If you're suggesting such tool, search around for Heimdall, see if it supports galaxy nexus, if it does, suggest that.
Excuse for digging out an old thread.
Just wanted to check if there is a way to to format internal memory without loosing root?
blinkjona said:
Excuse for digging out an old thread.
Just wanted to check if there is a way to to format internal memory without loosing root?
Click to expand...
Click to collapse
As long as you don't format /system, you won't lose root.
a maguro wrote this.
Thanks. Is there a tool/app to do that please. Or I can just go about and delete
The reason I want to format is after having flashed 4.3( 3 different build) im no longer able to use instagram with an error 'unfortunately,Instagram has stopped' whereas all other things is working fine. I can't clear data/cache Instagram either.
Sent from my Galaxy Nexus using xda app-developers app
blinkjona said:
Thanks. Is there a tool/app to do that please. Or I can just go about and delete
The reason I want to format is after having flashed 4.3( 3 different build) im no longer able to use instagram with an error 'unfortunately,Instagram has stopped' whereas all other things is working fine. I can't clear data/cache Instagram either.
Sent from my Galaxy Nexus using xda app-developers app
Click to expand...
Click to collapse
In your custom recovery
Sent from my Galaxy Nexus
pls help
i have yueka plus yu5510 ,
i've installed cm13 on it.
when i'm wiping its cache using twrp 3.0.8 , it shuts down.
after reboot i tried again then it shows 'failed to mount cache' , 'failed to mount system' , failed to mount data'.
size of internal storage,cache,system become 0 mb.
What have to do ???? pls. help me . i'm stuck .
i tried every thing under my knowledge like erasing and formatting using fastboot .
i tried to flash stock rom cm12.1 but it says "flash write failure".
also cant change twrp to cwm cause of 'flash write failure'.
pls. pls. can someone help me
Hi efrant, it seems that I have exactly the same issue: My evita was a bit slow so I performed a factory reset from the bootloader... stupid idea as it removed the OS (ROM) from my SD. I tried to push a ROM in the device, it said it was successful but there is still nothing on my SD card.
In the bootloader adb is not detecting my phone, fastboot is working though. Sideload is not working.
When i try to wipe anything from TRWP it says : it says "failed to mount 'sdcard' (invalid argument)"
Charac:
EVITA PVT SHIP S-ON RL
HBOOT2.15.0000
TWRP 2.8.7.5
I can't try your solution because I don't know how to flash system, userdata & cache (I know how to flash boot & recovery). Can you help me on this?
antonin2503 said:
Hi efrant, it seems that I have exactly the same issue: My evita was a bit slow so I performed a factory reset from the bootloader... stupid idea as it removed the OS (ROM) from my SD. I tried to push a ROM in the device, it said it was successful but there is still nothing on my SD card.
In the bootloader adb is not detecting my phone, fastboot is working though. Sideload is not working.
When i try to wipe anything from TRWP it says : it says "failed to mount 'sdcard' (invalid argument)"
Charac:
EVITA PVT SHIP S-ON RL
HBOOT2.15.0000
TWRP 2.8.7.5
I can't try your solution because I don't know how to flash system, userdata & cache (I know how to flash boot & recovery). Can you help me on this?
Click to expand...
Click to collapse
I found the solution : Plug the phone to the PC, open in TWRP recovery / click on mount, then the PC ask to format the device, format in fat32. Then copy the rom to the sdcard. Flash it with TWRP. Done!

[Q] Hardware navigation buttons do not work on some ROMS after clean install

Hi,
I'm finding with some ROMs (SlimBean, ProBAM, CM Domination) after an install on my HOX that the hardware navigation keys don't work anymore. I have to enable the soft keys in order to be able to use the phone - obviously not desirable as it wastes screen space.
I've done a crapload of googling, searching the forums, etc and can only find info on disabling the buttons. Is there some obscure setting I am missing somewhere?
The process I use is the same as is recommended on most of the other posts:
- fastboot erase cache
- fastboot flash boot boot.img (of the rom I am installing)
- in CWM, delete userdata, format cache/dalvik
- install rom
- reboot
When the phone boots up - straight away the capacitive buttons no longer work.
Reflash with a different ROM (CM10, Blade) and they are fine.
Can anyone help?
Thanks
I've had that happen on probam/slimbean if I don't flash Gapps.
Sent from my HTC One X using Tapatalk 4 Beta
sinkster said:
I've had that happen on probam/slimbean if I don't flash Gapps.
Sent from my HTC One X using Tapatalk 4 Beta
Click to expand...
Click to collapse
Aha - thanks for the suggestion, I'll give it a go. From memory I probably hadn't installed Gapps at that stage since I was just checking the ROM out..
thanks man
Gapps would have no bearing on such a problem, coincidence. And to prove a point, gapps are included in the ProBAM rom and the fault still occurred. I would suggest you change slightly the method of wiping between roms.
From CWM recovery, format data,system and cache. Then mount usb storage and format the sdcard to fat32 from your pc or laptop, but change the allocation unit size from 16 to 32 in the dropdown. Then while usb is mounted copy over the rom, and gapps if required. Just to be sure wipe dalvik cache in recovery then reboot the bootloader and flash boot image in fastboot and fastboot erase cache.
Very important to erase cache in fastboot.
Once that is done, back to recovery and flash rom and gapps if required and your done. This is the method I use every day and never have a problem.
Just re-read OP and I noticed that you fastboot erase cache before flashing boot image, you must also erase cache after flashing boot.
sent from my shorts
nogotaclue said:
Gapps would have no bearing on such a problem, coincidence. And to prove a point, gapps are included in the ProBAM rom and the fault still occurred. I would suggest you change slightly the method of wiping between roms.
From CWM recovery, format data,system and cache. Then mount usb storage and format the sdcard to fat32 from your pc or laptop, but change the allocation unit size from 16 to 32 in the dropdown. Then while usb is mounted copy over the rom, and gapps if required. Just to be sure wipe dalvik cache in recovery then reboot the bootloader and flash boot image in fastboot and fastboot erase cache.
Very important to erase cache in fastboot.
Once that is done, back to recovery and flash rom and gapps if required and your done. This is the method I use every day and never have a problem.
Just re-read OP and I noticed that you fastboot erase cache before flashing boot image, you must also erase cache after flashing boot.
sent from my shorts
Click to expand...
Click to collapse
notgotaclue, thanks for the detailed response - I will most definitely give this a go when I get some time over the next few days. Cheers mate
@nOtgotaclue: I went through your process and it did work for me with CM10 Domination - but not ProBam or Slimbean, they still had the same problem with hardware keys not working.
I've ended up flashing another kernel (TripNDroid v15 AOSP) and it has fixed the issue (for SB at least, yet to try it on ProBam).
Thx again for your help

Bricked?

Im in desperate need of help.
My one X randomly locked up and on a hard reboot (held power button) it now no longer boots to CM, instead it boot loops.
On booting to recovery (CWM) I was presented with a black screen. So using fastboot I was able to flash TWRP 2.4.0.0 and successfully boot to it.
It opens with a password prompt to which I can click cancel and get to the options. This is where it complains things get complicated :/
If I try to wipe anything:
E: error unable to mount '/cache'
It will do the same with /data and /system.
adb sideload so far has failed me,
failed to write data 'protocol fault (no status)'
It seems once one attempt fails the phone seems to go into some locked status until the battery is fully drained and recharged. Which makes everything so long and tedious to troubleshoot.
adb push cm.zip /sdcard returns an error. But this is all in vain as I have cm10.1 on the /sdcard but twrp fails to flash it.
Any help would be greatly appreciated! Ive been without internets at work for days now :crying:
bump.
Update your twrp to latest 2.7 or whatever its near the top in development thread. Then fastboot erase cache, flash boot image for desired ROM fastboot erase cache, boot to recovery flash ROM then gapps, wipe davlic and cache, enjoy..
Sent from my alarm clock.
myheroduane said:
Update your twrp to latest 2.7 or whatever its near the top in development thread. Then fastboot erase cache, flash boot image for desired ROM fastboot erase cache, boot to recovery flash ROM then gapps, wipe davlic and cache, enjoy..
Sent from my alarm clock.
Click to expand...
Click to collapse
Brilliant mate. There was an option in 2.7 to repair the partitions. I had to set /data back to ext4 (even though it said it already was) then repair the partition, and voila. Its all working again

[SCRIPT] (Depreciated) Wipe Encrypted Data Without Wiping Internal Storage

Update: The latest TWRP is already capable of decrypting data. This method is now unnecessary and depreciated. Use factory reset in TWRP menu instead
Disclaimer: This mod will wipe your data. I am not responsible for data loss after using this mod.
I tested on my device several times, it's working for me so internal storage is always preserved, but I cannot guarantee if anything is messed up on your side. Please read the post carefully before using this mod!
Always backup your important data before modifying your phone's software!
To compensate the mistake I have done in the modified SuperSU script (I fixed it eventually though ), I decided to release a mod I consider quite useful for most people.
I've used the 10 for quite some time, and I've been messing with it from day 1.
Since the encryption is required for the phone to have proper radio signal (more info here), we are forced to keep our devices encrypted.
And because HTC uses proprietary encryption method, TWRP is unable to decrypt our data partition, which causes the recovery unable to read anything from data.
This is actually quite a big problem. If you want to full wipe and clean flash your favorite custom rom, the "Factory Reset" option in TWRP is not available, so you are forced to wipe the whole data partition, which will cause all your personal files stored in internal storage to be removed.
If you're a flashaholic like I am, you are forced not to store anything important in the phone storage because it will be wiped every time trying to clean flash a rom.
To breakthrough this inconvenience, I created this flashable zip to accomplish something similar to the "Factory Reset" option in TWRP.
Requirement: You have to use the systemless root of SuperSU to use this mod. If you want to flash the wipe script with SuperSU, flash SuperSU first, then flash the wipe script.
Important: If you have chosen "Require PIN/password/pattern to start device" in the "Secure startup" page during the initial setup, you CANNOT use this mod!
If you have to enter your PIN/password/pattern before your device booted up, this means that you have secure startup enabled. You CANNOT use this mod!
If secure startup is enabled and you flash this zip, your encryption will be messed up and you will have to format the whole data partition eventually to make your phone working again.
After flashing the mod, your data will not be wiped immediately in recovery because we cannot do so. It will wipe the data AFTER you rebooted back to system. It will reboot again after the wipe is done. If you flashed SuperSU at the same time with this mod, you will experience 2 consecutive reboot loops. This is normal behavior, don't panic.
If devs are interested in including this zip into your rom, you can use it in the same way as SuperSU:
Code:
package_extract_dir("wipe", "/tmp/wipe");
run_program("/sbin/busybox", "unzip", "/tmp/wipe/wipe.zip", "META-INF/com/google/android/*", "-d", "/tmp/wipe");
run_program("/sbin/busybox", "sh", "/tmp/wipe/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/wipe/wipe.zip");
For those who are interested in what this zip actually do, here is a brief explanation:
If secure startup is disabled, data will be decrypted as soon as the device booted up. We can only access data after it is decrypted. So our only choice is to wipe data after the device has booted up.
I created a script to wipe all data except SuperSU app, su binary image, and your internal storage.
SuperSU will automatically run scripts inside the directory /su/su.d, so after putting the script into the folder, SuperSU will the wipe script at boot time.
The problem is: su.img is also located in /data, how can we push files into the image? Fortunately, our master Chainfire has thought of this problem. The image /cache/su.img will be merged with /data/su.img during boot. So I just need to place the script into /cache/su.img, then Chainfire's script will do all the rest of the work automatically. If you're interested in the merging process, take a look at launch_daemonsu.sh in the ramdisk of a SuperSU modified boot for more details.
Is this helpful in regards to initial routing and flashing a rom or only afterwards to flash a new one?
topjohnwu said:
Disclaimer: This mod will wipe your data. I am not responsible for data loss after using this mod.
I tested on my device several times, it's working for me so internal storage is always preserved, but I cannot guarantee if anything is messed up on your side. Please read the post carefully before using this mod!
Always backup your important data before modifying your phone's software!
To compensate the mistake I have done in the modified SuperSU script (I fixed it eventually though ), I decided to release a mod I consider quite useful for most people.
I've used the 10 for quite some time, and I've been messing with it from day 1.
Since the encryption is required for the phone to have proper radio signal (more info here), we are forced to keep our devices encrypted.
And because HTC uses proprietary encryption method, TWRP is unable to decrypt our data partition, which causes the recovery unable to read anything from data.
This is actually quite a big problem. If you want to full wipe and clean flash your favorite custom rom, the "Factory Reset" option in TWRP is not available, so you are forced to wipe the whole data partition, which will cause all your personal files stored in internal storage to be removed.
If you're a flashaholic like I am, you are forced not to store anything important in the phone storage because it will be wiped every time trying to clean flash a rom.
To breakthrough this inconvenience, I created this flashable zip to accomplish something similar to the "Factory Reset" option in TWRP.
Requirement: You have to use the systemless root of SuperSU to use this mod. If you want to flash the wipe script with SuperSU, flash SuperSU first, then flash the wipe script.
Important: If you have chosen "Require PIN/password/pattern to start device" in the "Secure startup" page during the initial setup, you CANNOT use this mod!
If you have to enter your PIN/password/pattern before your device booted up, this means that you have secure startup enabled. You CANNOT use this mod!
If secure startup is enabled and you flash this zip, your encryption will be messed up and you will have to format the whole data partition eventually to make your phone working again.
After flashing the mod, your data will not be wiped immediately in recovery because we cannot do so. It will wipe the data AFTER you rebooted back to system. It will reboot again after the wipe is done. If you flashed SuperSU at the same time with this mod, you will experience 2 consecutive reboot loops. This is normal behavior, don't panic.
If devs are interested in including this zip into your rom, you can use it in the same way as SuperSU:
Code:
package_extract_dir("wipe", "/tmp/wipe");
run_program("/sbin/busybox", "unzip", "/tmp/wipe/wipe.zip", "META-INF/com/google/android/*", "-d", "/tmp/wipe");
run_program("/sbin/busybox", "sh", "/tmp/wipe/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/wipe/wipe.zip");
For those who are interested in what this zip actually do, here is a brief explanation:
If secure startup is disabled, data will be decrypted as soon as the device booted up. We can only access data after it is decrypted. So our only choice is to wipe data after the device has booted up.
I created a script to wipe all data except SuperSU app, su binary image, and your internal storage.
SuperSU will automatically run scripts inside the directory /su/su.d, so after putting the script into the folder, SuperSU will the wipe script at boot time.
The problem is: su.img is also located in /data, how can we push files into the image? Fortunately, our master Chainfire has thought of this problem. The image /cache/su.img will be merged with /data/su.img during boot. So I just need to place the script into /cache/su.img, then Chainfire's script will do all the rest of the work automatically. If you're interested in the merging process, take a look at launch_daemonsu.sh in the ramdisk of a SuperSU modified boot for more details.
Click to expand...
Click to collapse
Is the systemless one the one you patched?
Sent from my LG-H830 using XDA-Developers mobile app
stonew5082 said:
Is this helpful in regards to initial routing and flashing a rom or only afterwards to flash a new one?
Click to expand...
Click to collapse
It functions the same as "Factory Reset" in TWRP, which means it will wipe all data, but your personal files stored in internal storage will remain on the device.
StickyEyez said:
Is the systemless one the one you patched?
Sent from my LG-H830 using XDA-Developers mobile app
Click to expand...
Click to collapse
Actually you can use the original version. But I suggest you to use my patched one, in case you accidentally wiped your whole data partition (this mod will not do this), you will stay encrypted, and your data signal will be fine
Hi topjohnwu
@ jollywhitefoot suggested you might be able to help to wipe userdata from download mode.
My phone will not get passed message "Your phones is encrypted" "TO DECRYPT YOUR PHONE. ENTER YOUR SCREEN LOCK PASSWORD" I had no screen lock password... i have different passwords to decrypt . Each time i put a password in it resest phone and does factory rest and then reboots straight into Bootloader again.
Phone has no recovery " Failed to boot into recovery mode" red writing on a black screen.
Phoned has OEM Relocked ....cant fastboot or unlock bootloader again
Please can you help
tailor999 said:
Hi topjohnwu
@ jollywhitefoot suggested you might be able to help to wipe userdata from download mode.
My phone will not get passed message "Your phones is encrypted" "TO DECRYPT YOUR PHONE. ENTER YOUR SCREEN LOCK PASSWORD" I had no screen lock password... i have different passwords to decrypt . Each time i put a password in it resest phone and does factory rest and then reboots straight into Bootloader again.
Phone has no recovery " Failed to boot into recovery mode" red writing on a black screen.
Phoned has OEM Relocked ....cant fastboot or unlock bootloader again
Please can you help
Click to expand...
Click to collapse
You can try to unlock your bootloader again.
If you cannot unlock it, then I regret to say that your phone might be doomed.
Never try to relock your phone if it's not in 100% stock condition and perfectly working.
topjohnwu said:
You can try to unlock your bootloader again.
If you cannot unlock it, then I regret to say that your phone might be doomed.
Never try to relock your phone if it's not in 100% stock condition and perfectly working.
Click to expand...
Click to collapse
I have tried unlocking boot loader again. The log shows oem needs to be unlocked.
When a RUU comes out, would that help recover the phone?
Sent from my ONE A2003 using XDA-Developers mobile app
tailor999 said:
Hi topjohnwu
@ jollywhitefoot suggested you might be able to help to wipe userdata from download mode.
My phone will not get passed message "Your phones is encrypted" "TO DECRYPT YOUR PHONE. ENTER YOUR SCREEN LOCK PASSWORD" I had no screen lock password... i have different passwords to decrypt . Each time i put a password in it resest phone and does factory rest and then reboots straight into Bootloader again.
Phone has no recovery " Failed to boot into recovery mode" red writing on a black screen.
Phoned has OEM Relocked ....cant fastboot or unlock bootloader again
Please can you help
Click to expand...
Click to collapse
Assuming you have a stock recovery image..
Boot to bootloader then recovery.
Long press power for a few seconds then tap volume up.
You can then factory reset in stock recovery
LeeDroid said:
Assuming you have a stock recovery image..
Boot to bootloader then recovery.
Long press power for a few seconds then tap volume up.
You can then factory reset in stock recovery
Click to expand...
Click to collapse
Oh dam it, just seen your post a bit late. Car phone warehouse has just collected my handset :silly: - im sure they'll send it back saying ive lost warranty :crying:
tailor999 said:
Oh dam it, just seen your post a bit late. Car phone warehouse has just collected my handset :silly: - im sure they'll send it back saying ive lost warranty :crying:
Click to expand...
Click to collapse
Oh dear....
topjohnwu said:
Requirement: You have to use the systemless root of SuperSU to use this mod. If you want to flash the wipe script with SuperSU, flash SuperSU first, then flash the wipe script.
Important: If you have chosen "Require PIN/password/pattern to start device" in the "Secure startup" page during the initial setup, you CANNOT use this mod!
If you have to enter your PIN/password/pattern before your device booted up, this means that you have secure startup enabled. You CANNOT use this mod!
If secure startup is enabled and you flash this zip, your encryption will be messed up and you will have to format the whole data partition eventually to make your phone working again.
Click to expand...
Click to collapse
the thing is i have selected no for secure boot but whenever i setup a fingerprint and boot then it gets enabled again even if i had disabled it...
any way around or am i missing on something.. currently on lee's rom
SacredDeviL666 said:
the thing is i have selected no for secure boot but whenever i setup a fingerprint and boot then it gets enabled again even if i had disabled it...
any way around or am i missing on something.. currently on lee's rom
Click to expand...
Click to collapse
you're talking about something different that he is. secure boot is a pin before you ever get the system loaded. you are talking about lockscreen pin/password, which, is mandatory if you use fingerprint scanner.
jollywhitefoot said:
you're talking about something different that he is. secure boot is a pin before you ever get the system loaded. you are talking about lockscreen pin/password, which, is mandatory if you use fingerprint scanner.
Click to expand...
Click to collapse
cool thank you...
I'm confused a bit. So every time I want to clean flash a rom, I can flash this script and it will wipe everything (system, data, cache etc.) except internal storage? Would dirty flashing a rom have any affect?
Ndaoud360 said:
I'm confused a bit. So every time I want to clean flash a rom, I can flash this script and it will wipe everything (system, data, cache etc.) except internal storage? Would dirty flashing a rom have any affect?
Click to expand...
Click to collapse
+1
Ndaoud360 said:
I'm confused a bit. So every time I want to clean flash a rom, I can flash this script and it will wipe everything (system, data, cache etc.) except internal storage? Would dirty flashing a rom have any affect?
Click to expand...
Click to collapse
It will only wipe data without internal storage.
You should flash this zip after you flash a rom.
It will wipe data after the device boots up.
topjohnwu said:
It will only wipe data without internal storage.
You should flash this zip after you flash a rom.
It will wipe data after the device boots up.
Click to expand...
Click to collapse
Ok so the process would be wipe system, cache, flash rom, flash data wipe script?
Ndaoud360 said:
Ok so the process would be wipe system, cache, flash rom, flash data wipe script?
Click to expand...
Click to collapse
Why would you wipe system this will be done by the rom installation, just flash the rom then flash the script & job done
LeeDroid said:
Why would you wipe system this will be done by the rom installation, just flash the rom then flash the script & job done
Click to expand...
Click to collapse
huh? Ever since I began rooting phones, I would wipe system, data and cache before a clean flash of a rom. I guess I never knew the rom does it for you. I thought the rom just over wrote the system possibly leaving remnants of the old system which could lead to issues which is why devs advise to full wipe when switching roms.
Ndaoud360 said:
huh? Ever since I began rooting phones, I would wipe system, data and cache before a clean flash of a rom. I guess I never knew the rom does it for you. I thought the rom just over wrote the system possibly leaving remnants of the old system which could lead to issues which is why devs advise to full wipe when switching roms.
Click to expand...
Click to collapse
Ah, a full wipe is only applicable to data buddy, if a rom dev doesn't wipe system before their installation, they need a good slap with a frozen kipper.
Cache is entirely optional

Big help needed - cant boot after flash

I tried to install the eu rom through twrp. Twice now i have tried, something appears in red writing at the start of the flash, but the process continues. the phone however doesnt boot now. I have flashed twice and left to boot for over 30 minutes without success.
ive also tried to push the global fastboot rom on to flash that. When i go to fast boot, and run adb push it cant spot any devices. Xiaomi flashtool does see it, but it wont do anything until it boots up the phone and so it fails.
You probably did not format /data
You have to format and not just wipe /data
Follow the steps here: https://www.reddit.com/r/Xiaomi/wiki/flashing/twrp
alose said:
You probably did not format /data
You have to format and not just wipe /data
Follow the steps here: https://www.reddit.com/r/Xiaomi/wiki/flashing/twrp
Click to expand...
Click to collapse
Cheers. I didnt format data, will give that a try now cheers!!
Does format data wipe internal storage? Rom wasnt there after i did the format, i didnt tell it to wipe storage. Managed to get Global rom reinstalled using miflash. Going to give eu rom another go tomorrow. Panic over for now!

Resources