How to assemble male USB A connector?
No need to buy a connector, pick up another male USB cable then:


Cut the head off the broken one.
Cut the tail off the replacement (leaving some excess wire underneath the connector).
Strip about 1/2" both sides of insulation (including the 4 wires).
(Optional) Add heatshrink to one side of the wire (but don't heat).
Solder them together.
Wrap each wire in electrical tape or position and heat the heatshrink.
Wrap the whole join in electrical tape to reinforce.