You can use a high-impedance volt-meter to tweak the values or the resistors. The diodes are essential to prevent the 5v and 12v rails from interfering with each other.
With no volts applied to the solenoid, the signal-pin is 1k5 to ground, and 3k5 to the 5v rail, which gives a voltage back to the ECU of around 1.5 volts on pin B.
With volts applied to the solenoid, the signal-pin is 3k5 to ground, and 1k5 to the 5v rail, which gives a voltage back to the ECU of around 3.5 volts on pin B.
The circuit required will put a high-impedance voltage of around 1.5 volts onto pin B when pin E is not powered, which rises to 3.5 volts when it is powered.
If they use a power-transistor to drive the valve-solenoid then we might need to load up the 12v rail a bit - in which case we can redesign using your relay...
Steve