Growing needs for the indoor location based service (ILBS) bring newer and higher requirements for indoor localization systems, such as high accuracy, hardware compatibility, low cost for commercial application, instantaneity and fast data update rate etc. In order to meet those requirements with commercial smartphone platform, we design an indoor localization system named LinLoc, which includes a new self-calibrating approach and a new localization method. Based on TPSN ranging, LinLoc applies time-of-arrival (TOA) method with acoustic signals to achieve real-time users' localization on normal commercial smartphone platform. With no extra time synchronization need, it can achieve centimeter-level accuracy. Furthermore, we propose a new self-calibrating approach based on acoustic TPSN ranging and semidefinite programming (SDP) algorithm. Through the interaction of every anchor nodes in the network, the new approach helps to solve the problem of self-calibrating in large-scale anchor network, and also helps to remove the heavy maintenance requirements afterwards. Then, LinLoc system which consists of a special-designed anchor network, smartphones installed with real-time app inside, and a backend server for processing is implemented. Simulations and experiments have been performed. The results show that LinLoc has nice indoor localization performance and its accuracy can be 0.05~0.3m, which provides accurate ILBS for users.