C/C++获取安卓手机IMEI编号demo
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37#include <stdlib.h> #include <exception> #include <fstream> #include <iostream> #include <sstream> #include <string> using namespace std; int main() { try { system("service call iphonesubinfo 1 >/sdcard/imei.txt"); ifstream imei_file("/sdcard/imei.txt"); ostringstream imei_file_out; char buf; while (imei_file_out && imei_file.get(buf)) { imei_file_out.put(buf); } string imei_origin = imei_file_out.str(); cout << imei_origin << endl; int indexes[] = {75, 77, 79, 81, 136, 138, 140, 142, 144, 146, 148, 150, 205, 207, 209}; std::string imei; for (int i = 0; i < 15; i++) { imei += imei_origin[indexes[i]]; } std::cout << imei << std::endl; system("rm /sdcard/imei.txt"); } catch (exception& e) { cout << e.what(); exit(1); } return 0; }
最后
以上就是娇气小天鹅最近收集整理的关于C/C++获取安卓手机IMEI编号demo的全部内容,更多相关C/C++获取安卓手机IMEI编号demo内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复