The extraction of macroscopic mobile context reflecting users' personal and social behavior patterns from smartphone sensor data (e.g., GPS/Bluetooth signals) is crucial in building intelligent pervasive systems. Hierarchical Dirichlet Processes (HDP), a well known Bayesian nonparametrics model for grouped data, is a promising option to achieve this objective due to its ability of discovering high-level semantics behind raw signals and establishing connections between individuals. However, applying HDP in a straightforward manner may not work as it does not take certain unique characteristics in mobile context into account. Particularly, while traditional HDP typically models a single aspect (e.g., Word), the characterization of a mobile context normally involves multiple heterogeneous aspects (e.g., Time, location, Bluetooth proximity). In addition, the presence of multiple aspects dictates a flexible way of clustering users and organizing mobile contexts in a hierarchical manner in serving different pervasive applications, a feature that traditional HDP lacks. Therefore, in this paper, we propose several extensions on traditional HDP to adapt it to the task of mobile context discovery. The key features in our extensions are: i) fusing multiple aspects naturally in HDP to achieve effective extraction of complex mobile context, ii) treating different aspects heterogeneously (globally or personally) in HDP to enable flexible user behavior clustering at various granularities in accordance with applications' needs, and iii) organizing mobile contexts in a hierarchical manner for natural behavior representation and overcoming data sparsity. Based on the experiments in a popular real-world mobile data set, we illustrate the ability of the framework in extracting useful mobile contexts such as characterizing personal life routines, discovering dominant temporal habits in a population, and inferring social group patterns, as well as its potential in improving individual mobility prediction under data sparsity.