But then he saw an argument by Johann Joseph Loschmidt that given the time reversibility of classical mechanics, and because they were thinking of atoms as classical balls as in the kinetic theory of gases, then there always exist a valid physical state where entropy decreases, by just reversing the direction of time and all particle speeds.
So from this he understood that the second law can only be probabilistic, and not a fundamental law of physics, which he published clearly in 1877.
Considering e.g. Newton's laws of motion, you take a system that is a function of time , e.g. the position of many point particles, and then you reverse the speeds of all particles, then is a solution to that.
I guess you also have to change the sign of the gravitational constant?