delete_recursive can leave the filesystem in an unclean state. Using this workaround is not advisable.
It is better to use an update-binary that has been rendered safe by building with BOARD_SUPPRESS_EMMC_WIPE.
Run this to check an update-binary for safety:
Code:
strings update-binary |grep MMC
It should return:
Code:
warning: %s: Wipe via secure discard suppressed due to bug in EMMC firmware
Any update-binary versions that have that string are safe to use.
Thank you a lot for the input.
However, Chainfire just answered me in his CF-Root for the n7000 that using format commands in update.zip could still brick an unsafe kernel whatever recovery (patched or non patched) it uses. Now, you say that a patched binary in update.zip will make it safe what ever kernel/recovery combo it is
If you confirm it, I will update my post. CF disagree the use of format commands in update.zip (yes, I know, if there are FS errors, they will not be fixed without format)
Good news Phil! Ran Entropys command on Temp CWM Touch 6.0.12 update-binary and got this "ubuntu@ubuntu:~/Desktop/binary$ strings update-binary |grep MMC
warning: %s: Wipe via secure discard suppressed due to bug in EMMC firmware
EMMC
EMMC:" Unfortunately doesn't produce same result in update-binary for ur wiping script. So simply swap update binary, change "delete-recursive" to "format", re-sign file and job done right? (That's assuming u trust Entropy, and who doesn't?)
Following Entropy512 recommendations, I updated the binary-update to a safe one.
Now format commands are used in script instead of delete_recursive.
This makes the wipe much clean if some file system errors are present
Well it's one thing to contribute theoretical information, but it's another to actually go ahead and do it! I hope Entropy is right, I'm about to use script to do factory reset based on his assertion that "format" commands in zips with update binarys that contain "secure discard supressed" are safe.
---------- Post added at 07:54 PM ---------- Previous post was at 07:10 PM ----------
Entropy's right! No problems whatsoever Flashed factory reset, format commands and all. and the patched update-binary prevented my Note from bricking! It only took seconds (Man.... that was a wild ride)
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?