Heat vegetable oil in a saucepan over medium-high heat. Add onion and garlic; cook and stir until browned, 5 to 7 minutes. Mix pork and egg together in a bowl. Stir mixture into the saucepan. Saute until starting to turn color, 3 to 5 minutes.
Stir chile bean sauce, black bean sauce, and chile oil into the pork mixture. Cover, reduce heat to medium-low, and simmer until pork is browned, 3 to 5 minutes. Add tofu; simmer until flavors are well blended, about 3 minutes. Season with salt and pepper and top with green onions.