-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy path一键恢复2.2.cpp
92 lines (91 loc) · 3.54 KB
/
一键恢复2.2.cpp
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#include<iostream>
#include<stdio.h>
using namespace std;
void jingjian()
{
system("adb shell pm able-user com.miui.BookmarkProvider");//谷歌浏览器收藏插件,接口已废除
system("adb shell pm able-user com.miui.AiAsstVision");//小爱相关,删除不影响小爱
system("adb shell pm able-user com.miui.BasicDreams");//屏保,接口已废除
system("adb shell pm able-user com.miui.BookmarkProvider");//谷歌浏览器收藏插件,接口已废除
system("adb shell pm able-user com.miui.CatcherPatch");
system("adb shell pm able-user com.miui.CatchLog");//收集日志
system("adb shell pm able-user com.miui.KeyChain");//密钥链,中国用不到
system("adb shell pm able-user com.xiaomi.powerchecker");//耗电检测
system("adb shell pm able-user com.xiaomi.payment");//米币支付
system("adb shell pm able-user com.miui.yellowpage");//生活黄页
system("adb shell pm able-user com.xiaomi.youpin");//小米有品
system("adb shell pm able-user com.mfashiongallery.emag");//小米画报
cout<<"恢复成功,重启生效"<<endl;
}
void youhua()
{
system("adb shell pm able-user com.miui.systemAdSolution");//禁用智能服务
system("adb shell pm able-user com.xiaomi.ab"); //禁用小米电商
system("adb shell pm able-user com.miui.bugreport");//禁用用户反馈
system("adb shell pm able-user com.miui.analytics");//禁用系统毒瘤
system("adb shell rm -f -r /sdcard/Android/data/com.miui.systemAdSolution/files");//删除开屏广告
cout<<"恢复成功,重启生效"<<endl;
}
int main()
{
int YN;
cout<<"您现在是否可以进入系统"<<endl<<"输入1 = 可以 输入0 = 不可以"<<endl;
cin>>YN;
if(YN==1)
{
cout<<"是否恢复优化"<<endl<<"输入1 = 恢复 输入0 = 不恢复"<<endl;
cin>>YN;
if(YN==1)
{
youhua();
}
cout<<"是否恢复系统更新"<<endl<<"输入1 = 恢复 输入0 = 不恢复"<<endl;
cin>>YN;
if(YN==1)
{
system("adb shell rm -f -r /sdcard/Download/downloaded_rom");
cout<<"恢复成功,重启生效"<<endl;
}
cout<<"是否恢复快应用"<<endl<<"输入1 = 恢复 输入0 = 不恢复"<<endl;
cin>>YN;
if(YN==1)
{
system("adb shell pm disable-user com.miui.hybrid");//快应用服务框架
cout<<"恢复成功"<<endl;
}
cout<<"是否恢复系统精简"<<endl<<"输入1 = 恢复 输入0 = 不恢复"<<endl;
cin>>YN;
if(YN==1)
{
jingjian();
}
cout<<"是否恢复小爱同学"<<endl<<"输入1 = 恢复 输入0 = 不恢复"<<endl;
cin>>YN;
if(YN==1)
{
system("adb shell pm able-user com.miui.voiceassist");//小爱同学
system("adb shell pm able-user com.miui.voicetrigger");//语音唤醒
cout<<"恢复完毕";
}
cout<<"恢复完毕 程序将于30s自动关闭 您也可以手动关闭";
_sleep(30000);
return 0;
}
if(YN==0)
{
cout<<"请按住您的手机音量下键+开机键 直到出现FastBoot界面"<<endl<<"出现后请按回车键"<<endl;
getchar();
system("adb shell pm able-user com.miui.KeyChain");//密钥链,中国用不到
system("fastboot reboot");
cout<<"请问是否成功开机 请等待约三分钟"<<endl<<"如未开机请重复上方操作 并按下回车"<<endl;
getchar();
jingjian();
system("fastboot reboot");
cout<<"请问是否成功开机 请等待约三分钟"<<endl<<"如未开机请重复上方操作 并按下回车"<<endl;
getchar();
youhua();
system("fastboot reboot");
cout<<"已恢复完毕 请开机重试 为您带来了不好的体验 我深感抱歉"<<endl<<"程序将于30s后自动关闭 您也可以手动关闭";
_sleep(30000);
}
}