"codec" has many meanings (see
http://en.wikipedia.org/wiki/Codec ),
so I'll assume you mean a lossy or lossless codec for audio/video
media such as MP3, AAC, H.264, etc. I don't have a step-by-step
checklist, but recommend reading this code in frameworks/base/media/
libstagefright/ : include/*Decoder.h, codecs/, omx/, and OMX* and
following the examples of the existing codecs. You should also skim
the files *Extractor.cpp and include/*Extractor.h as there is often a
close relationship between the container formats and the codecs that
can be in each container.