Managing context-dependent behavior in devices that are constantly on the move is a laborious task, especially when it comes to situations users (and therefore devices) are unfamiliar with. Due to the impossibility of using predefined rules or previous training, static and machine-learning context-awareness methods are impractical. Although collaboration with nearby peers represents a promising alternative, research on this area has been scarce. In this paper we propose a distributed consensus protocol, specifically designed to enable device cooperation with adaptation purposes. The protocol has been designed and implemented and its performance has been demonstrated through simulation.