Heat the oil in a frying pan over a medium heat. Add the sliced onion, and fry for 3-5 minutes until softened. Remove the onion from the pan and set to one side.
Add the block of tofu to the pan and break up into large chunks. Increase the heat to medium-high and cook for 5 minutes, stirring and tuning the tofu every so often. After 5 minutes the tofu should have stopped releasing water and be golden brown.
Add the chickpea flour, black salt, onion and garlic granules and turmeric powder to the pan. Stir well, breaking up the tofu into a small scramble as you go. Cook, stirring, for 2 minutes until the spices are evenly distributed.
Add the spinach and fried onion into the pan, mix, and wait for the spinach to wilt.