USB in this rig was wired key on, meaning it's off when the ignition is off.
I used a standard 5 pin Bosch relay, a 4 pin will also work.
2 wires are run into the cab from the engine bay, 3 total wires are needed to be wired in the cab for this.
In the cab:
USB negative needs to be wired to a grounding location in the cab, shorter is better. Mine is about 12" to a bolt under the center console.
USB positive runs to the relay I mounted in the engine bay, pin 87
Pin 86 of the relay runs to a 12v switched source. Draw is very low as the relay has it's own power source. For this, I ran a wire and tapped into the 12v cigarette adapter.
Under the hood you should have the 2 wires from the cab to the relay.
Pin 85 runs to a ground - I like to make it short and use the bolt I'm mounting the relay to/with.
That leaves 1 more wire, which is 12v constant. Run it to the battery (or a good strong 12v source) with a fuse between to pin 30.
That's it.
Once you start to play with these relays you can make fun stuff happen...