I recently upload a video that explain how to make it but here I explain the working the idea ...
When you connect photo/video camera to the USB port for charge, the camera try to charge internal battery but if the camera not find a battery, the camera disable charge process.
This check happens very quickly .. the result is a positive impulse on camera contacts when you connect USB cable.
After I use a simple NPN transistor to convert this impulse into command to power on the camera.
This hack/mod is useful if you want use your camera in fixed way and control it by wi-fi whit smartphone. Obviously not use it with battery.
Below the video of build and video to show the possibility of controls by wi-fi of a xiaomi yi sport camera.