Charging ports with their flex cable or board. If it only charges when you move the cable, this is usually the cause.