For anyone who will come to this thread henceforth,
I am attaching the Toyota repair manual instruction set.
Basically you have to take care of 2 sensors, the throttle position sensor, and engine idle sensor.
The throttle position sensor does what it's name suggests, it tells the computer how much the driver is pushing on the accelerator and accordingly the computer allows that much fuels, and adjusts timing of the engine (VVTI).
The IVC sensor is a little bit tricky, it waits until the engine is hot enough, then it allows a certain amount of choke ( for lack of better term ) that keeps the engine running at correct RPMs.
This sensor is critical in case of AC, steering pump load, and general idle conditions.
The last thing one needs to learn is the EGR, which dictates how much of the exhaust gas gets recirculated. The higher the RPM the more gas may be mixed with new air/fuel mixture to increase efficiency. It is very common for the EGR to get stuck, as it is a dirty valve.
@rajaatta
repair guide.pdf (769.5 KB)