In order to reduce false positives of Trojan horse detection algorithms in smartphones, a voting algorithm based on multiple machine learning algorithms in wireless sensor networks was proposed. Through setting up the experiment, the preliminary preparations of the experiment, including sample set selection, feature set extraction method, and algorithm effect evaluation criteria, were described first. The K-nearest neighbors algorithm, random forests algorithm, support vector machine, and voting algorithm were compared. The experimental results showed that SVM and KNN algorithms took the shortest time, about 0.3 seconds. Judging by the test results, the voting algorithm still performed the best among the four algorithms as the voting algorithm was an extension of the three machine learning algorithms. In these randomly selected samples, malicious programs and nonmalicious programs were successfully distinguished by the voting algorithm. As the amount of test data increased, the test results would be closer to the actual situation. Namely, the voting algorithm would also have a small probability of false positives, which could meet the design requirements of the system. It was concluded that the method could effectively reduce false positives of the Trojan horse detection algorithm in smartphones.