As the mobile computing environment emerges, people can use different mobile devices to access information ubiquitously. This has shifted the researchers' sights to Mobile P2P (MP2P) systems, where the membership among peers is more dynamic and ad hoc. In the ubiquitous environments, the mobile devices generally are heterogeneous. In this paper, we consider the MP2P systems where the mobile peers are heterogeneous and propose a mechanism, named Heterogeneity-aware Overlay Technique (HOT), to build up an unstructured overlay. The proposed mechanism considers the overall ability, including power, network, CPU, and memory to set up the overlay. An ability equation is thus defined and the resulting overlay can ensure a good quality of service while the topology mismatching problem is alleviated. Last, we present our simulation for the proposed mechanism and compare the results with other related approaches. The simulation result shows that our proposed mechanism can effectively achieve a better service quality and mitigate the topology mismatching problem.