[Sony Xperia P, U, Sola, Go] taboo5200:
Correct.

Correct. You also need to package it into a CWM-compatible zip and place it into the phone's internal memory (and not an actual microSD card!).

Not quite, allow me to clear it up for you. You need to understand why this is necessary, then the remainder will automatically fall into place.

When you flash your phone with PCC/SUS, it's an all-or-nothing procedure - either the phone gets flashed in it's entirety, or it aborts (user cancellation, failure, or whatever reason). Flashtool does it differently - it allows you to select parts of the firmware to flash in. This is key to pre-rooting, because it allows us to flash in *only* the parts of the firmware that we want to flash in.

The firmware comprises multiple parts, namely: system, kernel, baseband, Fota, partition, Trim Area. Don't feel freaked out - you don't need to memorize them. :P

What we'll do is to extract system.sin from the FTF, then extract the ext4 image of the /system partition that is stored within it, after which we will further extract the actual files into a folder on the computer. Sounds complex? Picture a zip archive inside another zip archive, inside yet another zip archive - that's essentially what we're dealing with here, just that they have different names and appearances.

With direct access to the loose files of the /system partition, we can now add the two components regulating root access, the Superuser app (typically goes into the app folder) and the corresponding su binary (typically in the either bin or xbin folder, with a symbolic link added in the other folder). With that done, we can package it up again and flash it to the phone.

You're likely thinking, surely we can simply package it back into system.sin and use Flashtool to flash that into the phone, right? I wish it was that easy too. It appears that all .sin files of each FTF are digitally signed, so modifying them / repackaging them will cause the flashing to fail signature verification. This is where CWM comes in.

You can use CWM to flash in any update that is stored in a zip archive (note: CWM zip archives contain customized scripts to instruct CWM on the tasks to be executed). In this case, we'll package up the loose /system files into a zip with a ready made script (see percy_g2's post for the JB.zip) and use CWM to flash it into the phone.

However, it's still not yet complete after CWM finishes flashing in the /system files - we still have to update the kernel and baseband files, since those are still back on the ICS version. Flashtool needs to be used to flash in those remaining components,

excluding system

(or you'd have gone through the entire process for nothing!). It is only at this point that the phone has been completely flashed with the pre-rooted firmware.

The concept is probably still hard to grasp at this point, so take some time to carefully run through it in your mind before you do anything.

Correction: root does not mean you will be able to flash in any custom recovery system / ROM out there - you'll still have to unlock the bootloader first to be able to boot into them. Yes,

including CWM

. I know you're confused by now, so let me explain more.

First, you'll have to understand what happens when the phone boots up. When you power your phone up, the bootloader is executed. In the case of a locked bootloader, it checks the boot partition's signature (typically signed by the hardware manufacturer, i.e. Sony) and boots the system up only if the check passes. Unlocked bootloaders simply skip the signature verification process and continue starting the system. If you flash in a custom ROM or a custom recovery such as CWM on a phone with a locked bootloader, the phone will refuse to start since the boot partition signature check fails.

Pay special attention here to the distinction between rooting and bootloader unlocking - unlocking the bootloader allows you to gain root access by flashing a pre-rooted ROM (i.e. flashing a ROM that has not been pre-rooted means you will not have root access), while rooting

cannot

allow you to boot from a custom ROM or recovery without an

unlocked

bootloader. Rooting affects only the system that is

currently installed

, but an unlocked bootloader allows you to

change the entire system

that is installed - two very different things indeed. This is why flashing the stock firmware typically results in root access being revoked.

Now, about CWM. The version of CWM we use in this procedure is special - instead of hooking into the boot partition (which requires an unlocked bootloader), it piggybacks off the charging subsystem instead. The net result is that we get to reap the benefits of CWM, while retaining our locked bootloader (and warranty).

You're getting there, not bad - I took way longer at first. :P

Clarification: tick those options as per the screenshot I posted in the thread on Sony's forum and you'll be on the right track (gotta love how those pesky 'tick to exclude' style options get in the way of explanations every single time, eh?).

That's right - the CWM flash represents the first part of the flashing process, and the Flashtool flash represents the final part.

Sure, why not? I highly doubt that a failed rooting procedure will result in a hard brick anyway.