I´m using the Flashtool and other provided tools here in the Forum for a long time (thanks to all people who are involved in the developing)
Now I want to give something back.
I´m not a developer but I understand (hopefully) basic things.
I have also some phones which does not support the flashmode so I am reliant to the fastboot mode and CWM.
At this point my goal was to flash the stock ROM to the Xperia Z.
I found a tuturial how to make a flashable zip file for CWM but it was for old devices with yaffs2 filesystem and the new ones have ext4.
After some search I found everything what is needed and I want to share it with you.
The Tutorial covers basic things but maybe it will help some people who will try it.
Download the Stock-FW you want (FTF-File)
Rename the .ftf File to .zip
Extract the system.sin (with 7zip or WinRar for example)
Open Flashtool go to "Tools" -> "Sin Editor" -> Choose the extracted system.sin and push "extract" Data
You will get an system.ext4 file
We have to extract the files which are in the system.ext4 file - for this I used the DiskInternal Linux Reader
After extracting the files you have to put all the files in a folder named "system" (low letters)
Create a folder named for example "Firmware"
Put the "system" folder in the "Firmware" folder
Download the Attached META-INF File - extract it and copy the META-INF Folder in the "Firmware" folder
Now you have in your "Firmware" folder two sub-folders
"system" and "META-INF"
Now you only have to zip the both folders for example with 7zip or WinRar
Important: You have to set the compression to "Store"
Copy the zip File to your SD-Card and flash it with CWM
If you want you can now add files to the system folder - like busy box - and or modify things and flash it over CWM.
Special thanks to Bin4ry