Heat oil in a pan on medium flame. When hot, add cumin seeds and let them crackle.
Add chopped onions, green chilies, and curry leaves. Fry till the onions turn translucent.
Add ginger-garlic paste and saute till the raw smell goes away.
Turn the flame to low and add the spice powders turmeric powder, red chili powder, coriander powder, cumin powder, sambar masala, and salt. Saute for 10 seconds.
Add water and give a good mix. Check for seasoning and adjust accordingly. Turn the flame to high and let the water boil.
Add coriander leaves and give a good mix.
Cover the pan and cook the onion masala on a medium flame for 5-7 mins.
Add the fried eggs. Mix gently so that the eggs are coated with the masala.
Garnish with coriander leaves and serve hot.