DIY 24v to 5v usb phone charger
No you cannot just connect the wires direct from the power jack through a resistor to the phone.

You can find a specific resistor that would drop 24V to 5V at a specific current. However the voltage in a vehicle is not constant and the current drawn by a phone during charging is not constant. This means that a single resistor value is not going to deliver a constant 5V to the phone load over the range of operating conditions.

What you will need is a DC to DC converter that is designed to accept the 24V in and produce the 5V out at the current levels needed for charging the phone. These are readily available at low cost for 12V applications in autos and small trucks but for 24V you may have to do some research to find one or build your own.