Slice tomatoes and pineapple finely. Grind dry chillies, asafoetida and salt together.
Heat oil and season mustard and white gram dal. Sauté ginger. Add split dry chillies and the ground masala. When it is done, add tomato and pineapple pieces and sauté till the oil separates. Remove from fire and when cool, store in a dry container.