Start by cooking the chicken, Heat oil in a pressure cooker. Add in sliced onions and fry till golden.
Add in ginger garlic paste and saute for a min. Add in all the spice powders and salt, mix well.
Now add in chopped tomatoes and cook for 5 mins.
Add in chicken piece and toss well. Add in water. Cover the cooker and pressure cook it for 2 whistle, simmer the flame and let it simmer for 10 mins. Turn off the heat and let the steam go all by itself. Chicken is cooked now.
When the chicken is cooking make the masala. Heat oil in a heavy bottom kadai. Add in all the whole spices and fry it for a min.
Add in shallots, ginger, garlic, cook this for 5 mins or so.
Add in coconut and fry it for 8 to 10 mins till it turns golden. Now let this cool down.
Take it in a blender and make it into a smooth puree by adding some water.
Now add this to the cooked chicken, add more water if needed.