How to root phone without losing WhatsApp account? I'm planning to root my Sony Xperia P, but there's a complication. Due to issues with my telco, I currently don't have a plan - my phone is practically just a Wi-Fi device right now, and in addition I lost my phone number. I'm afraid that when I root my phone and reinstall WhatsApp, WhatsApp will not be able to verify my device, leaving me no other option than to create a new account. This is not an ideal situation because I will lose the access to my chat groups and I won't be able to use WhatsApp until I sign a new contract with a telco.

Is there a way to prevent this scenario from happening?

My phone:

Sony Xperia P (LT22i)
Android version 4.1.2
Build number 6.2.A.1.100
If you are planning on using the same phone again, you can simply uninstall whatsapp and reinstall it after you add the new number. Whatsapp FAQ says that you will be given an option to restore all the data at the reinstall process. They specifically ask to install the app from their website rather than downloading from Google Play. (I couldn't find any reason for this).

If you can use the previous number, you will not lose your account or the data. Simply login to the app again. 

On a side note, it is highly advisable to backup your chat history to your SD card as explained in this answer before you attempt anything (rooting, uninstall, etc.)