I've already solved the problem; just buying a new cable fixed it. What I don't understand is that the first cable I bought was from the official flagship store, but the one I received today from another shop doesn't work. It seems like there might be something wrong with my device.