This paper addresses the trajectory tracking problem of a 2D caged flying robot in contact with a wall. To simplify the contact problem, the models are constructed on a vertical two-dimensional plane, and our objective is to let the quadrotor hover or move along the wall with arbitrary velocity and attitude. The control law is derived using the Lyapunov stability theory, applying backstepping techniques to achieve exponential stability under mild assumptions. To overcome the unknown friction force between robot and wall, we design estimators for the friction coefficient, which include a projection operator that provides an upper bound for the obtained estimates. Realistic simulation results are provided to validate the proposed methodology.