I also wanted to do a charger which can charge any device connected to it.
So bought a compact car charger, but it doesn't charge all the device via USB! It charged my old sony ericsson mobile, but failed to charge my samsung mobile.
Later found out after googling that there is more to it than just connecting the +ve and gnd wires. There are some combinations of pull up resistors and pull downs as shown below, on the D+ and D-.
These resistor combo, which is present in the charger need to be connected to the mobile phone or whatever which needs to be charged.
It is by this the charger advertise the power supply capacity to the to be charged device (i.e. mobile phones).