How to generate genuine quantum randomness from untrusted devices is an important problem in quantum information processing. Inspired by the previous work on self-testing quantum random number generator[Phys. Rev. Lett. 114, 150501], we present a new method to generate quantum randomness from a prepare-and-measure scenario with independent devices. In existing protocols, the quantum randomness only depends on a witness value (e.g., CHSH value ), which is calculated with the observed probabilities. Differently, here all the observed probabilities are directly used to calculate the min-entropy in our method. Through numerical simulation, we find that the minentropy of our proposed scheme is higher than the previous work, when a typical untrusted BB84 setup is used. Consequently, thanks to the proposed method, more genuine quantum random numbers may be obtained than before.