How to Replace a BMW Camshaft Sensor
1. The sensor is located on the left side of the oil filter. Remove the air filter and air filter box.
2. Disconnect the wiring harness to the mass air flow sensor and the air box temperature sensor.
3. Remove the tube that leads to the idle control valve.
4. Unscrew the 6-mm nut with a socket that holds the hose clamp that downstream of the mass airflow sensor. You should now be able to see the camshaft position sensor.
5. Remove the air intake silencer with a 10-mm socket.
6. Using a 5-mm Allen key, remove the nut that holds the camshaft sensor in place. Remove the engine cover and disconnect the sensor electrical connection at the top of the motor. Clearance around the dipstick is tight, but it is possible to remove the connector.
7. Install the new camshaft sensor with an oiled O-ring. Ensure that the sensor seals properly, and then reassemble everything in the order of removal.