I'm afraid it's not very scientific.
First I purchased a new GoPro case so I didn't screw up the only one I had.
Then I put the camera in there and marked the outside with a Sharpie where I could see the USB connector through the side.
Then I took the camera out and drilled a hole that was about as big as the mark I made.
Then I tried to fit the USB cable up to it, and carved out the hole with a pocketknife slowly and clumsily until the USB cable fit in there, frequently putting the camera back in there to make sure it was still lining up.
the hole is about 3/8" by 1/2", roughly, and it is sort of a rounded rectangle. It's kind of ragged. My Dremel with a rasp bit would have a better choice, but I was too lazy to go get it from the garage.
Once I had a hole that the USB cable would fit through and line up with the USB port, I went looking for something to seal it up a little. I found a little rubber grommet in my garage on my workbench where a crapload of misc bolts, nuts, fasteners, washer, etc are jumbled together. I have no idea what size it is or where it came from. Note that USB cables have different sizes and shapes of plug, so find the cable you're going to end up using (test the fit) before you do this part.
I squeezed the rubber grommet onto the USB plug, which made it sort of squarish instead of round, and then plugged the USB cable into the camera through the case.
Then I applied some Super Glue Gel to the grommet and squished it up against the side of the GoPro case and held it there until the gel firmed up.
I gave it a good hour to fully cure up before pulling the USB cable out, and braced the grommet with my fingers when I did.
For power, I recommend this device:
Amazon.com: PowerGen 4.2Amps / 20W Dual USB Car charger Designed for Apple and Android Devices: Electronics
There are a plethora of USB chargers out there, and many of them suck. I have purchased at least a half-dozen of these units and every one has worked well and I have not yet had one fail.
Note that it has TWO ports. They are labeled "A" and "NA". A means compatible with Apple products. NA is for other products. I am not sure it matters which you use for a GoPro.
I ran the USB cable up the roll cage, fastened it with zip ties, and it hangs out where most people would put a rear view mirror, but you can put it anywhere your cable will reach.
Obviously it is not waterproof anymore, but it will protect the camera from an occasional stray droplet of water, and it will take a while for dust to build up.
Be careful when plugging in the cable. Be gentle and ease it in there and wiggle gently until it goes in. Don't cram and twist.
View attachment 2664
View attachment 2665
View attachment 2666
View attachment 2667