If you are using fresh crabs, discard the main shell, then remove the claws and legs of the crabs. Clean the crabs well and season with salt and set aside. If using already steamed crabs, make sure they are clean and set aside.
Dry roast the coconut on medium-low heat until golden brown. Set aside in a plate.Next dry roast the red chillies, coriander-cumin seeds, peppercorns, cloves on medium-low heat for about 2 minutes or until fragrant. Be careful in roasting as the spices may burn and turn bitter. Remove from the heat and transfer to a bowl/plate. (If left in the hot pan they may continue roasting and turn dark and bitter).
Add 1 teaspoon of oil in the same pan, saute onions until slightly golden brown.
Transfer the roasted coconut, spices, onions, turmeric, tamarind, ginger and garlic in the food processor/grinder, add little water at a time to make a smooth paste ( Approx 1 cup water).
Heat oil in the pan, add the ground paste.
Saute for a couple of minutes on medium heat, until most of the moisture is lost, and the paste is cooked well. Rinse the blender jar with few more tablespoon of water and extract the remaining masala, add to the pan, and continue sauteing for another minute.
Add about 1 cup of water, bring to a boil. Add salt to season.
Add the crabs, mix well in the curry. Cover and let it simmer on low heat for about 10-15 minutes or until the crabs are cooked through. If the gravy is too thick, you can add some water.