This little guide is written down after I managed to screw up my partitions on my Galaxy Tab while rooting it. Luckily I still had some space that allowed me to reinstall stock firmware through Odin. I wrote a blog post on how to do this here . Then I had to get a recovery bootloader that gave me root access in recovery mode and the parted tool. So if you have a booting Android but with fucked up partitions, try this. PS! Android will probably not boot after this. So know you will have to reinstall. And if you have something on your SDcard you should back it up, you probably need to remove all partitions if you have a real screw up. You can resize if you want to get advanced though. The guide is written for windows command line . 1. You device must be booted into Android at first. Install Samsung Kies and make sure it can connect to your PC, you need the drivers that comes with it. 2. Install ADB, it comes with Android SDK . When you have ADB you should test it. First set your...