Heat oil in a frying pan over medium-high heat. Add onions, and sauté until golden. Add cloves, cinnamon, fennel seeds and cardamom. Stir fry for a minute. Add coconut. Saute, stirring, for 4-5 minutes or until golden. Leave it to cool.
Place the cooled mixture in a food processor. Add a little water, and grind to a smooth paste. Set aside.
Malabar Chicken Curry:
Heat oil in a large pan over medium-high heat. Splutter mustard seeds. Add onions, curry leaves and green chilies. Saute, stirring occasionally, for 2-3 minutes or until the onions are golden brown. Add ginger and garlic. Saute again until aromatic.
Stir in turmeric, coriander, garam masala and red chili powder. Saute for a minute. Add tomatoes, and stir-fry for 2-3 minutes or until they are mushy. Stir in the ground paste. Stir-fry for few seconds.
Add in the chicken. Stir to coat the chicken pieces really well in the spices. Season with salt and black pepper. Add ¼ cup water. Cook, covered, for 10-12 minutes. Remove from heat. Garnish with curry leaves.