The use of smartphones with the Android operating system has been high in the last decade, with the transformation of works and services from traditional shape to mechanized and digitally, the percentage of use of smart devices will remain high. In such a situation, malware with malicious purposes will appear among the useful applications that will create insecure conditions for users of smart devices with the Android operating system. In this regard, to deal with malware and to improve malware detection, the simulated annealing algorithm has been used in the feature selection stage along with fuzzy logic in the neighbor generation stage to detect Android malware through machine learning algorithms. The proposed method has been tested in ten feature sets with 410 samples from the DREBIN dataset, 328 of which are benign apps and the rest are malware. The experimental results of this study show that the best result in feature selection with the proposed method with the KNN classifier and the set of permission features, with the number of features 1908, has been achieved 99.02% in the accuracy criterion. The results of the paper are better than many recent studies results are done.