In a kadai/wok, fry half of the chopped onions and when they turn pinkish, add the dry masala consisting of coriander seeds, fenugreek seeds, peppercorns and cloves. Roast for 5 minutes on low heat.
Add garlic and fry till the raw smell of garlic goes away.
Add grated coconut and fry till it becomes brownish.
Add tamarind and switch off the gas/heat.
After cooling, grind this by adding 1 cup or sufficient water needed to grind it into a thick smooth gravy.
To a kadai/wok, add 1 teaspoon oil and fry chopped onions. When they turn pinkish add chopped tomato and sauté till tomatoes turn mushy.
Add the marinated crabs and fry for some time (2-3 minutes).
Pour the ground masala curry over the crabs and mix the gravy with the crabs.
Let the crabs get cooked nicely for 15 minutes in the gravy.
Adjust salt and switch off the heat.