How to wipe everything with TWRP?

Hey

I’m trying to wipe everything to do a clean install on my FP2 prior to install LOS last version.

I use TRWP and did advanced wipe, checked everything but it says that it failed to wipe the internal storage … So when I flash LOS, I just get my phone back like before, like I didn’t do anything…

Why ?

Thanks :slight_smile:

Is your device encrypted?

If you use an SD card in the phone, did you choose to let Android incorporate it into Internal Storage?

If you want to wipe anyway, perhaps try the factory reset of the OS first, That should take care of Internal Storage … then wipe in TWRP.

Encrypted ? How ? Why ?

Negative. My external SD storage is separate, it is mainly for music and APK installers.

Is this going to make a really clean base to re-install LOS ?
I do this since I can’t use my VPN on it, and seems that the problem comes from the system itself.


So would I wipe everything to make sure that I have a good base and see if the problem occurs again. In that case, I will downgrade to LOS 14.

You can encrypt your data somewhere in the OS settings (it will speak of “encrypting the phone” there, but it really only encrypts the data partition), but due to still unknown reasons encrypting currently only works without the new main camera module (so either with the old camera or without any camera in the phone, after encrypting is done a new camera can be put back into the phone again).

After encryption the phone will ask you for your PIN/pattern/password (the one you set up before to unlock the screen) everytime it boots, else Android can’t be booted.
TWRP will ask for this too when started, else TWRP can’t access encrypted data (but will still work for any other task, e.g. OS updates).

For more info search “encryption” here in this forum.

Wiping everything in TWRP should do that already, you were completely right trying that.
I’ve never seen wiping Internal Storage fail in TWRP, so I thought why not let the OS try it instead of TWRP?

Android’s organization of Internal Storage can be quite a mess as far as I understand, that’s why TWRP doesn’t even try to back it up when backing up all the other stuff.

As soon as Android is done booting however, Internal Storage is there, the possible mess by then was put together to a usable state, so to speak.
In this state, when the OS does a factory reset, Internal Storage might get wiped successfully … just my reasoning, it might still fail nonetheless, you would just have to try it.

1 Like

Because, if i remember correctly, the “standard” wipe does a “rm -rf”, and this wouldn’t work on an encrypted, not mounted, partition. Format data should be your friend

1 Like

WipeFormat Data should do the job, as @lklaus says.

1 Like

Yes ! It did the job without issue.
Problem solved. Thanks guys !

@AnotherElk
Thanks for the explanation about the encryption. I learned something new :slight_smile:

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.