赞
踩
- #include <stdio.h>
- #include <windows.h>
- #include <stdlib.h>
- #include <conio.h>
- #include <string.h>
-
- void s1() {
- system("adb devices");
- }
-
- void s101() {
- system("adb kill-server");
- printf("ADB服务已停止,程序即将关闭,可重新打开程序\n\n");
- Sleep(2800);
- exit(0);
- }
-
- void s2() {
- printf("ADB执行重启");
- printf("\n");
- system("adb shell reboot \\\"dm-verity enforcing\\\"");
- system("adb reboot \"dm-verity enforcing\"");
- system("adb reboot");
- }
-
- void s102() {
- printf("FASTBOOT执行重启");
- printf("\n");
- system("fastboot reboot");
- }
-
- void s3() {
- system("adb shell pm enable com.miui.powerkeeper");
- system("adb shell pm install-existing --user 0 com.xiaomi.joyose");
- system("adb shell pm enable com.xiaomi.joyose");
-
- }
-
- void s103() {
- system("adb shell pm disable-user com.miui.powerkeeper");
- system("adb shell pm disable-user com.xiaomi.joyose");//关闭joyose
- system("adb shell pm uninstall --user 0 com.xiaomi.joyose");//卸载joyose
- }
-
- void s4() {
- system("adb shell pm disable-user com.xiaomi.joyose");
- system("adb shell pm uninstall --user 0 com.xiaomi.joyose");
- system("adb shell pm enable com.miui.powerkeeper");
- }
-
- void s104() {
- system("adb shell pm install-existing --user 0 com.xiaomi.joyose");
- system("adb shell pm enable com.xiaomi.joyose");
- system("adb shell pm disable-user com.miui.powerkeeper");
- }
-
- void s5() {
- system("adb shell pm uninstall --user 0 com.miui.systemAdSolution");
- system("adb shell pm uninstall --user 0 com.miui.hybrid");
- printf("\n如果提示FAILURE可能本身不存在或者已卸载\n\n");
- }
-
- void s105() {
- system("adb shell pm install-existing --user 0 com.miui.systemAdSolution");
- system("adb shell pm install-existing --user 0 com.miui.hybrid");
- system("adb shell pm enable com.miui.systemAdSolution");
- system("adb shell pm enable com.miui.hybrid");
- }
-
- void s6() {
- system("fastboot reboot fastboot");
- system("fastboot gsi wipe");
- system("fastboot reboot");
- }
-
- void s106() {
- system("cls");
- system("adb shell appops get com.miui.securitycenter");
- }
-
- void s7() {
- printf("若想解决骁龙平台DSU英文问题,复制以下这段话,然后按回车\n\n");
- printf("reboot \"dm-verity enforcing\"\n\n");
- system("adb shell");
- }
-
- void s107() {
- system("color ef");
- system("adb shell pm pm uninstall --user 0 com.android.dynsystem");
- system("cls");
- system("adb shell pm uninstall --user 0 com.android.emergency");
- system("adb shell appops set com.miui.securitycenter WRITE_SMS deny");
- system("adb shell appops set com.miui.securitycenter SEND_SMS deny");
- system("cls");
- system("color 0a");
- system("adb shell appops get com.miui.securitycenter");
- }
-
- void s8() {
- system("fastboot oem cdms");
- system("fastboot reboot");
- }
-
- void s9() {
- system("adb reboot bootloader");
- }
-
- void s109() {
- system("adb reboot fastboot");
- }
-
- void s10() {
- system("adb reboot recovery");
- }
-
- void s110() {
- printf("若想退出,请不要长按电源键,拔下数据线(也可充电)稍等片刻自动重启\n\n");
- system("adb reboot sideload");
- }
-
- void s11() {
- system("adb shell dumpsys battery set level 100");
- system("adb shell dumpsys battery set status 1");
- }
-
- void s111() {
- system("adb shell dumpsys battery reset");
- }
-
- void s12() {
- s103();
- s5();
- system("pause");
- s107();
- printf("优化成功,5秒后重启\n");
- Sleep(5000);
- s2();
- system("adb shell settings put Secure speed_mode_enable 1");
- }
-
- void s112() {
- system("cls");
- s3();
- s105();
- printf("恢复成功,5秒后重启\n");
- Sleep(5000);
- s2();
- system("adb shell settings put Secure speed_mode_enable 0");
- }
-
- void s13() {
- system("fastboot oem enable-charger-screen");
- system("fastboot oem off-mode-charge 1");
- system("fastboot oem poweroff");
- }
-
- void s113() {
- system("fastboot oem disable-charger-screen");
- system("fastboot oem off-mode-charge 0");
- system("fastboot oem poweroff");
- }
-
- void s14() {
- system("fastboot set_active other");
- printf("如果无限重启请再次进入FASTBOOT运行此选项\n\n");
- }
-
- void s114() {
- system("cls");
- printf("请复制这段网址,然后打开\n\n");
- printf("https://www.bilibili.com/read/cv27279331/\n\n");
- }
-
- void s15() {
- system("adb shell settings put Secure speed_mode_enable 1");
- }
-
- void s115() {
- system("adb shell settings put Secure speed_mode_enable 0");
- }
-
- void s16() {
- char a16[20];
- printf("只有澎湃系统才能卸载电量与性能,MIUI卸了会卡米!输入XiaomiHyperOS后方可确认\n");
- scanf("%s", &a16);
- if (strcmp(a16, "XiaomiHyperOS") == 0) {
- system("adb shell pm uninstall --user 0 com.miui.powerkeeper");
- } else {
- printf("输入错误\n\n");
- }
-
- }
-
- void s116() {
- system("adb shell pm install-existing --user 0 com.miui.powerkeeper");
- system("adb shell pm enable com.miui.powerkeeper");
- }
-
- int main(void) {
- printf("正在启动ADB服务...\n\n");
- system("adb start-server");
- system("cls");
- system("color 0a");
- while (1) {
- printf("<小米工具箱>\n\n");
- printf("1-检测ADB设备,101-停止服务并关闭程序\t");
- printf("2-ADB重启设备,102-FASTBOOT重启设备\n\n");
- printf("3-恢复默认设置(电量与性能和joyose全部解冻,最省电)\t");
- printf(" 103-电量与性能和joyose全部冻结(耗电快)\n");
- printf("4-只冻结joyose,但不冻结电量与性能\t");
- printf(" 104-只冻结电量与性能,不冻结joyose(全局高刷)\n");
- printf("5-卸载广告程序和快应用,105-重装\n\n");
- printf("6-清除DATA分区中的DSU安装程序(需要进FASTBOOT,无需解锁),其他品牌通用,常用于使用DSU Sideloader安第三方装损坏zip包导致卡\n logo且长按重启无效\t");
- printf(" 106-查看手机管家权限\n");
- printf("7-解决小米13,K60Pro不解锁安装DSU导致开机上方英文(按电源键进系统,使用USB调试)\n");
- printf(" 如果你想进入手动命令行也可以选择此项,107-禁用危险组件\n");
- printf("8-解决联发科(天玑1200之前会出现)不解锁安装DSU导致开机左侧英文(进FASTBOOT)\n\n");
- printf("9-进入FASTBOOT,109-进入FASTBOOTD\t");
- printf("10-进入Recovery,110-进入小米助手模式\n");
- printf("11-把电量改到满格,111-恢复电量\n");
- printf("12-系统极致优化并重启(一流的体验,耗电),112-全部恢复原样并重启(省电,不启用危险组件)\n");
- printf("13-启用关机充电(默认),113-禁用关机充电(插上自动开机)-需要进FASTBOOT,该项仅对小米MTK机型有效\n");
- printf("14-FASTBOOT切换AB分区(高通需解锁,MTK不用解锁),114-了解不同小米机型不解锁安装DSU的后果\n");
- printf("15-显示极致模式选项,115-隐藏极致模式选项(不一定有效,需打开USB调试-安全设置)\n");
- printf("16-澎湃系统卸载电量与性能(不卡米),116-重装电量与性能\n");
- int a = 0;
- printf("\n");
- printf("输入你想要的操作:");
- scanf("%d", &a);
- switch (a) {
- default:
- printf("输入有误\n\n");
- break;
- case 1:
- s1();
- break;
- case 101:
- s101();
- break;
- case 2:
- s2();
- break;
- case 102:
- s102();
- break;
- case 3:
- s3();
- break;
- case 103:
- s103();
- break;
- case 4:
- s4();
- break;
- case 104:
- s104();
- break;
- case 5:
- s5();
- break;
- case 105:
- s105();
- break;
- case 6:
- s6();
- break;
- case 106:
- s106();
- break;
- case 7:
- s7();
- break;
- case 107:
- s107();
- break;
- case 8:
- s8();
- break;
- case 9:
- s9();
- break;
- case 109:
- s109();
- break;
- case 10:
- s10();
- break;
- case 110:
- s110();
- break;
- case 11:
- s11();
- break;
- case 111:
- s111();
- break;
- case 12:
- s12();
- break;
- case 112:
- s112();
- break;
- case 13:
- s13();
- break;
- case 113:
- s113();
- break;
- case 14:
- s14();
- break;
- case 114:
- s114();
- break;
- case 15:
- s15();
- break;
- case 115:
- s115();
- break;
- case 16:
- s16();
- break;
- case 116:
- s116();
- break;
- }
- system("pause");
- system("cls");
- }
-
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。