I have a couple of SanDisk/Sansa Clip+ MP3 players. Both of these have suffered the same fault: the headphone socket becomes intermittent after a couple of years' use. It's easy — if a bit fiddly — to repair.
The first step is to open the plastic case of the player:
Push a guitar pick (or credit card, or similar thin plastic tool) straight into the crack between the two halves on the opposite side from the USB socket. Work gently around the outside, releasing the clips. Go especially carefully around the volume control and USB socket, where the case is very thin.
You can now see the main PCB, covered by the battery:
The battery's held on to the flash chip with a sticky rubber pad. Use your guitar pick to peel the pad away from the chip; the battery is quite fragile, so don't squeeze or bend it. You can then lay the battery down beside the main PCB, without disconnecting its wires:
The square chip with the triangular sticker on it is the CPU. The rectangular one with pins on two sides is the flash memory. The little square chip at the bottom is the radio receiver.
Right, so here's the problem. The headphone jack is only held on to the PCB with three solder joints — so any force applied to it (e.g. if you pick the player up by the headphone cable, which is easy since it's so light) stresses those joints. When one of them gives way, you'll have an intermittent connection. Here I'm pulling the headphone socket upwards gently — you can see that the right-hand leg of the socket lifts completely free of the pad that it's meant to be soldered to:
To fix this, resolder all three joints on the socket. You will need a soldering iron with a fairly fine tip to avoid hitting any of the tiny surface-mount components around the socket. I find it useful to apply a tiny bit more solder than was originally used, in order to get a nice strong joint.
Check that the player works and the socket isn't intermittent any more, then reassemble it: stick the battery back into place (making sure the wires are tucked in neatly), then clip the back of the case into place again, starting with the USB socket and working your way around.
I've done this fix on two players now — but I've had to do one of them twice, since it failed again after about six months. Next time I'll try adding a couple of blobs of epoxy to provide some additional mechanical support to the socket, as has been done with the timekeeping crystal on the right-hand side of the board.