In addition to the factors mentioned by other users, another factor which protects the ports is the fact that they don’t need to be highly energized when there’s nothing in the port. Unless you’re charging, the voltages on the power in pin can be left low, and any sensing pins do not have to be powered (or, if connected to a reference voltage [pullup], have high internal resistance and can’t push much current), so as long as there aren’t any gaps from the port into the phone, the port itself won’t short.
Latest Answers