In a bowl, stir together the oil, salt, pepper, rosemary, a little soy sauce and garlic granules.
Halve the potatoes. Peel and quarter the onions and pull apart the individual layers. Put the potatoes and onions in the bowl with the oil and spice mixture and stir well so that everything is moistened with the oil.
Put the soy sauce, ketchup, honey, sweet and sour sauce and chilli flakes in a saucepan and heat briefly so that all components mix together.
Brush the chicken legs with the finished marinade and spread them with the potatoes and onions on a baking sheet. The potatoes peel down. Finally, distribute a few sprigs of thyme on the potatoes. Fry everything for about 40 minutes on the middle shelf.