[Sony Xperia M] alvinhochun:
I just built a new CWM recovery from source and have it combined with stock kernel and ramdisk.

This image contains the kernel from Build 15.1.C.2.8 (dumped from C1905), the stock ramdisk, the CWM ramdisk and a custom root to select which system to boot.

Please backup your data before proceeding! I am not responsible for any data loss!

I've tried on my own Xperia M (C1905) and it can boot, but I haven't tried to restore a backup. You are warned! Not tested on C1904, but it should work though I cannot guarantee anything.

** You need unlocked bootloader to use this. Before you unlock the bootloader, you need to backup all your data and remove the SD card because everything will be deleted! **

Known problems:

If you mount /data, you cannot unmount it from the interface (the CWM code is designed to not allow unmounting it). You can, though, execute `adb shell umount /data` to unmount it if you really do need to.

(Only applicable to CWM 6.0.3.7) There is no "mount USB storage" (connect SD card to computer) function.

Install instructions (skip to step 5 if you already unlocked bootloader, rooted and installed busybox):

Install the latest Android SDK platform tools on your computer.

Root: http://xdaforums.com/showthread.php?t=2457174

Backup TA partition: http://xdaforums.com/showthread.php?t=2292598 (do this if you want to relock in the far future)

Unlock bootloader: All data will be lost! SD card will be formatted!

Download the attached zip and extract the boot image.

Power off your Xperia M, hold the Volume Up button and connect USB cable, release button when blue LED is on.

Execute:

fastboot flash boot combined-xperia-m-boot.img

Wait for it to show finished.

Disconnect USB cable.

Boot instructions:

Power off your Xperia M.

Power on by holding the power button. Your Xperia M should vibrate once like normal boot

Note that when the LED turns pink, press Volume Up once (no need to hold down).

LED should then turn cyan

You have booted into CWM!

Report bugs here!

Thanks:

CyanogenMod and ClockworkMod for obvious reasons[/url]

Also: Pack any Xperia M kernel with CWM

Check this tool: http://xdaforums.com/showthread.php?t=2481864

Technical information:

The Xperia M doesn't have a recovery partition, therefore the recovery is packed into a boot image. There is an init script which checks whether it should boot into recovery, and if it should, the script will extract the recovery ramdisk and boot it. Otherwise it will extract the boot ramdisk and boot Android normally. The packer linked above is designed to pack the boot image.

Changelog:

Source code:

Device files: https://github.com/alvinhochun/cyanogenmod_device_sony_nicki (Note: CWM 6.0.4.4 is built using the `cm-10.2` branch)

cm-10.1 branch only tested on cm-10.1, cm-10.2 branch only tested on cm-10.2

Also, I don't update the cm-10.1 branch anymore...

Prebuilt kernel is extracted from stock ROM.

Kernel source: https://github.com/alvinhochun/sony-xperia-m-kernel

To build, use `lunch cm_nicki-eng` and then `make combinedimage`. Boot image is output as `combined.img`.

If you want to use your custom kernel and ramdisk, simply replace `kernel` and `stock-boot-ramdisk.gz`.

Extra notes:

***: as obvious as the filename

combined-xperia-m-boot-2013-10-19.img.zip is the newer CWM 6.0.4.4 version, with kernel/ramdisk from 15.1.C.2.8.

combined-xperia-m-boot-2013-10-15b.img.zip is the older CWM 6.0.3.7 version.