I got this great recipe from a friend who comes from Sri Lanka, and I was able to coax the recipe from her!
Separate the chicken legs between the upper and lower legs. Then peel off the skin. (Incidentally, I always cook a tasty chicken broth from the removed skin.) Mix the spice mixture with a whisk in a large bowl and then roll the 16 parts in it. Then rest for 30 minutes.
Now heat the fat in a large pan or in the deep fryer (approx. 2 liters of rapeseed or sunflower oil in the pan) and then fry the chicken parts there for approx. 10-12 minutes, depending on the size and heat.
Then cut the onions into slices, then put them in the bowl in which the chicken legs were seasoned. Pour the flour over the onion slices and mix the onions with the rest of the spice broth. Then fry the onions in hot oil until they are firm and crispy. (That works better in the deep fryer than in the pan.) Then let both get cold.
Goes wonderfully with warm rice. Mix this with the cold onions and eat the cooled chicken legs out of hand.