If you are planning to experiment with any Android phone/tablet, the first thing you would like to do is take a backup of it just in case things get messy. Typically in such situations you would like to take a backup of not only the user-data but also the operating system.
In this post I will be discussing on how to create a backup and restore the backup. You don't need to root your device for this since adb already has root access in HCL Me X1. But you will need fastboot which can be obtained by compiling the Android source code.
Remember that the source code can be built only on a Linux distribution, so make sure you have one (I would recommend Ubuntu 11.10). fastboot will be available at <source_code_dir>/out/host/linux-x86/bin/fastboot after the compilation. If you don't want to compile the source, you can try a compiled version of fastboot from the link specified at the end of the post; I built it on Ubuntu 11.10.
Replacing the Recovery Image
Before replacing the recovery image, create a backup of it in case you want to revert it back. Open the shell of the device using adb shell. Find the mount-point of the recovery image using cat /proc/mtd. There will be an entry like - mtd6: 00a00000 00200000 "recovery"
The recovery image can be created by reading the contents of the recovery mount-point and writing it into a file. This can be done using the following command - cat /dev/mtd/mtd6 > /sdcard/recovery.img
The recovery image is written to the sdcard in this case, you can redirect it anywhere you want to. The recovery image can be flashed back using fastboot. For this you have to boot the device into the bootloader using adb reboot-bootloader. The image can be flashed using the following command - fastboot flash recovery recovery.img
You can backup other mount points like system, userdata, etc. using this method but it's a lot easier to do so using the ClockworkMod's Recovery Image. You can download it from the link specified at the end of the post. Flash it using the same fastboot command as above.
Creating a Backup
Reboot the device into the ClockworkMod's recovery mode using adb reboot recovery. This console has options to backup and restore the operating system. However it does this using the sdcard, so make sure you have one in the device before you proceed.
From the recovery console, select Backup and Restore > Backup. After a series of messages the ROM will be backed up.
Restoring a Backup
From the recovery console, select Backup and Restore > Restore. Select the backup you want to restore. After a series of messages the ROM will be restored.
In case you are looking for the stock ROM you can find it here. It's not the exact stock ROM but an unrooted factory reseted ROM. And the original recovery image, ClockworkMod's recovery image and the compiled version of fastboot is available here.