Heat the oil in a pan, fry the onions until golden. Remove and drain the fried onions.
In the same pan, with the oil still hot, add the chicken marinated with ginger and garlic pastes and half tsp. salt. Fry the chicken on high heat until the meat changes color, about 5 minutes.
Add half of the fried onions and 1 tbsp from the powdered spices. Give everything a stir and then add 1 cup of water. Lower the heat and let the chicken simmer gently, covered on low heat until the chicken is tender.
In the meantime, prepare the rice. Soak the rice for at least 30 minutes. In a big pan of water, add some salt and the vinegar plus the green chilli. Once the water comes to a boil, drain the pre-soaked rice and cook it in the boiling water until it is about three-quarters done. Drain away the excess water from the rice.
take a big pan, pour in half the cooked rice. Then layer the chicken with its masala over the rice, sprinkle the reserved half of the fried onions and the remaining powdered spices. Layer the remaining rice on top of the chicken. Cover the pan with a tight lid. Place on low heat and steam for about 15 minutes