To make the five spice powder, lightly toast the spices in a dry pan on low heat till fragrant. Cool and grind to a fine powder in a spice grinder.
To marinate the tofu, mix all the ingredients into a smooth mixture, toss the tofu cubes in it and set aside for 30 mins.
Heat a tbsp of oil in a pan (or wok) on medium high heat. fry the tofu cubes, in a single layer (take care not to overcrowd the pan or the tofu will stem instead of frying), turning them after a few seconds to brown on all sides. Do this in a couple of batches till all the tofu is fried. remove and set aside. You can flash fry the tofu if you're using a wok, since it is wider and has a larger surface area.
Heat the remaining oil in the same pan or wok till hot. Add the vegetables and fry for 4-5 minutes, stirring to prevent them from burning. The vegetables should be cooked yet crunchy without changing colour.
Now drop in the garlic, ginger, chilli and white parts of the spring onion. Fry for a minute till aromatic .
Add the rice, breaking up and lumps and fry for 2 minutes, stirring vigorously till the rice is lightly fried.
Add the sauces and sesame oil, followed by the fried tofu. Combine everything till it's mixed evenly. check and correct the seasoning and add the spring onion. Serve hot.