Tools selection
The method I present here relies on CyanogenMod’s Android source code.
While Google’s AOSP only provides to the tool to build the boot.img
file,
CyanogenMod also adds the unpackbootimg
tool allowing you to unpack it.
This tool does not seem specifically designed for CyanogenMod in any way, so
most chances are that it will work for other ROMs as well.
There are however a relatively large number of alternatives to unpack the
boot.img
file which all work more-or-less the same.
Basically, such unpack tool will extract the content of the boot.img
file and
display a set of parameters you will have to pass to Google’s mkbootimg
tool
to build a file whose configuration (mainly kernel parameters and memory
addresses) will match the original one.
Here are a few examples, I did not test them personally so cannot recommend any and I present …