I have Arch linux installed and have installed android-tools(so fastboot and adb commands are available).
Because I had a problem with kingroot I needed to flash the phone to stock.
I had stock firmware downloaded and extracted it to see the sin files inside it.
I flashed partitions using these commands :
fastboot flash system system.sin
fastboot flash userdata userdata.sin
fastboot flash cache cache.sin
fastboot reboot
Now the first two succeeded but the third one failed saying partition not found(guess I don't have cache partition for some reason).
After that I got stuck in a boot loop.
Normally sony Xperia P boots with Sony word and then to Xperia word(which blinks) and then to android but it's stuck in the Sony word.
I tried powering off the phone and flashing the boot partition using this command :
fastboot flash boot kernel.sin
rebooted, the same problem.
I tried to flash FOTAKernel but I don't seem to have this partition.
I tried also fastboot reboot-bootloader
and then reboot but the same.
I've read the boot-loop wiki, both Safe mode and recovery mode are unreachable.
I would try to flash the other .sin files But I don't know to what partition they belong and google didn't help me to get this information :3 .
So what to do ?
Update
I forgot to mention that I tried to flash .ftf file using FlashTool 0.9.19.10, this tool didn't work, I click the lightning bolt, I chose the Flash mode, I choose the .ftf file(after putting it in ~/.flashtool/firmwares), after clicking ok it tells me to plug my device in fastboot mode.
I click Volumne Up while plugging the device and I see the blue(somewhat purple) Led light on.
I wait and wait and even when Flashtool said "Device connected in fastboot mode" it doesn't do anything but telling me to plug my device :3 .
Device
Sony xperia P runing android 4.0.4, bootloader is unlocked but the phone is not rooted nor has custom recovery(so no CWM or TWRP here).
.ftf
file using Flashtool? You can select the partitions that you wish to flash in that tool. Also, if you're on Unlocked bootloader, you can flash custom recovery withfastboot flash recovery recovery.img
command