Can I replace a usb micro b connector with JST xh connector?
A lot of USB devices such as keyboards or mice have a captive cable which either has a custom connector is directly soldered to board.
The Micro USB connector itself plays no role in the data transfer.