Locating the nodes in wireless sensor networks (WSNs) is currently a very active area of research due to their increasing number of potential applications. Wireless networks composed of smartphones have gained particular interest, mainly due to the high availability of such devices. This paper presents a novel algorithm for blind localization of commercial off-the-shelf smartphones in a WSN. The algorithm uses acoustic signals and inertial sensors to estimate the sensor positions simultaneously. Estimates of range and direction-of-arrival (DOA) locally obtained in each node are combined with a maximum likelihood estimator. A tailored optimization algorithm is also proposed to solve the DOA uncertainty problem. Our proposal obtains low localization errors without considering any reference node nor any prior synchronization between nodes.