We investigate the sliding of objects on an inclined granular surface close to the avalanche threshold. Our experiments show that the stability is driven by the surface deformations. Heavy objects generate footprintlike deformations which stabilize the objects on the slopes. Light objects do not disturb the sandy surfaces and are also stable. For intermediate weights, the deformations of the surface generate a sliding of the objects. The solid friction coefficient does not follow the Amontons-Coulomb laws, but is found minimal for a characteristic pressure. Applications to the locomotion of devices and animals on sandy slopes as a function of their mass are proposed.