A cylinder rolls up an inclined plane, reaches some height, and then rolls down (without slipping throughout these motions). The directions of the frictional force acting on the cylinder are
When it rolls up it push the ground downward , friction is upward whereas while rolling down applied force is downward, friction is a upward.