This paper presents a social and personal context modeling method on mobile device. It infers userpsilas contexts, such as amity with others and emotional state, from uncertain logs stored in mobile devices using Bayesian networks. Proper services are then provided to the user based on the semantic compatibility between current and past contexts. Here, the contexts are hierarchically matched after each context is expanded to the context-tree using domain ontology. We have implemented a contact list recommendation application on mobile device that recommends phone numbers in a phonebook according to the user's situation. Experimental results on real-user data show that the method provides an efficient and accurate means for mobile based social networking applications.