The Adaptive User Interface (AUI) adapts to the changes in the context of use and provides improved interaction abilities for different users. The adaptivity in the user interfaces requires in depth knowledge of context. There is a need to enrich user profiles to achieve the personalized services with the ability to adapt the user's context. The context can be reflected in a particular kind of knowledge and hence modeled as ontology. Ontology based context models are effective means to handle complex situations that support the sharing or integration of context information. This paper presents ontology based context model using OWL for adaptive mobile devices. It models the context over its four major elements including device, user, environment (location and time) and activity. The proposed ontology was derived in different classes, relationships, associations, dependencies and constraints to model dynamic context. Ontologies present a standardized, consistent and shareable context model. The context model and consequent context snapshots can be acknowledged by AUI to present a suitable user interface. The ontology was developed using Protégé on the basis of each context type having different values. Semantic querying (SPARQL) was used for knowledge acquisition. Moreover, the Pellet and HermiT Reasoner were used to verify the rules, relations and constraints to avoid the inconsistency between classes. Comparative to other context models for adaptive interfaces, ontological model provides more of scalability and growth with learning new context in to the shared context knowledge.