All information can be found on www.usb.org.
The rate how fast a device charges itself depends on three factors:
What kind of charger signatures the device can understand, and
What kind of signature a USB port provides.
What is the charging limit for a particular battery embedded into design.
Not long ago the USB ports were meant to adhere to so-called Battery Charging Specification, latest BC1.2. If a port provides this BC1.2 signature, AND the device supports this signature, the charge can be up to 5A. But it usually never happen. And yes, the port can still transfer all USB data. This standard is pretty much dead.
Newer charging protocol uses various pull-ups on a dedicated CC in in Type-C connector, and can deliver up to 5A at 5V. But the device must use Type-C connector to make this determination.
Most recent charging specification is called "Power Delivery v2.0", which uses a serial protocol over the same CC pin. The protocol can negotiate VBUS voltage up to 20V at current up to 5A. First revision of PD tried to communicate the capabilities over VBUS, and now this method is abandoned. This solution is not quite on the market yet, and probably never will be.
For your particular case it is usual that the standard power delivery form a regular port (500mA) is not enough to maintain full-featured functionality of mobile processor and simultaneously charge its battery. So the battery drains out during development/communication process.
Now, the solution to your particular issue depends whether your mobile device is used in host, or in device mode.
If in device mode, there are hubs supporting BC1.2 specification on some USB ports. They should provide sufficient current capabilities IF your device understands BC1.2 protocol. It is likely that your device uses only USB2 port, so it can't understand USB3 capability, and draws only under 500mA.
If your device does not understand BC1.2 protocol, then you are in trouble, since it is the device who decides how much current to take, not the host port.
If your device operates in host mode, the solution is in so-called Accessory Charger Adapter.