[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] chouck:
Here is a Easy guide to restore your Xperia RAY ST18i or ST18a back to live or revert to stock kernel and ROM.

0. Before moving feather or even if you have no problems with your RAY Back up as much as you can in your situation!

a) if you have CWM or other recovery to your backup there.

b) if your phone is still works install CWM recovery using this tool http://xdaforums.com/showthread.php?t=1346190 , reboot , press VOLUME DOWN button while SE or mod logo, create backup.

c) do Titanium, MyBackup or other tools full backup.

d) I even strongly recommend to copy all valuable data including just created backups (CWM backups are stored at [sd]\clockworkmod\backup) from SD card to PC as sometimes corrupted firmware or creogen and other mods can destroy data on SD card. I personally experienced it.

1. If your phone doesn't boot and get stuck on SE or your mod logo this is most probably caused by locked bootloader. You might see it in FlashTool

as VER="R9A021" if R is capital bootloader is locked if VER="r9A021" you have another problem and you can proceed to next steps to reflashing.

So if bootloader is locked you can follow this guide to unlock it in the safest way possible http://androidflip.com/unlock-xperia-phones-bootloader-without-losing-drm-data-track-id-working/

If your phone is booting now you are done and you need to proceed only if you need to reflash it to stock, but before proceeding don't forget to do all BACKUPS as shown in step 0 and only after it proceed with next steps.

2. If you have Xperia RAY international (not American) version ST18i with 3G / WCDMA / UMTS / HSPA 900 Mhz (Band VIII), 2100 Mhz (Band I) bands you are lucky to have an option of using FlashTool http://xdaforums.com/showthread.php?t=1351324 and stock firmware from here http://xdaforums.com/showthread.php?p=10885406#post10885406 to reflash it. In order to turn your RAY in flash mode hold VOLUME DOWN button while prugging in USB. If the tool can't flash it or is not booting after successful flashing check if your bootloader is locked or not (see step 1). It might be locked after reflashing or even 100% legal factory reset in the phone (as it happened to me).

If your phone is booting now you are done and there is no need to proceed with next steps.

3. If you have Xperia RAY American version ST18i with 3G / WCDMA / UMTS / HSPA 800 Mhz (Band VI), 850 Mhz (Band V), 1900 Mhz (Band II), 2100 Mhz (Band I) bands you are in minority and as nobody posted ST18a firmware files for FlashTool yet we will have to use other options:

a) go to wotanserver (dot) com: register there, download there drivers and WotanClient flashing tool, in WotanClient choose the latest ST18a firmware and flash it (you have one free reflash with them). In order to turn your RAY in

flash mode hold VOLUME DOWN button while plugging in USB. If the tool can't flash it or is not booting after successful flashing check if your bootloader is locked or not (see step 1). It might be locked after reflashing or even 100%

legal factory reset in the phone (as it happened to me).

If your phone is booting now you are done and there is no need to proceed with next steps.

b) if you don't like idea of 3P flash tools flash your ST18a with ST18i firmware as in step 2. Then install CWM recovery per step 0. Download http://www.megaupload.com/?d=BHS16NEE and put to [sd]\clockworkmod\backup folder. reboot pressing VOLUME DOWN button while SE or mod logo, restore this backup "just_flashed". after reboot you will have ST18a 4.0.2.A.0.42 Generic Trade US (2.3.4) to stock kernel and ROM.