1. ADB 安装
打开 Android 开发者中国,选择你的平台进行 ADB 的下载;


把 ADB 解压到一个你知道的路径:

win+r 运行 control.exe 打开控制面板,然后进入系统与安全 – 系统 – 高级系统设置。

点击”环境变量“;

找到”系统变量“下面的 Path,点击编辑;

点击”新建“,然后输入你刚刚解压 adb 的目录 platform-tools 的路径

一路确定,然后退出控制面板。win+r 打开 cmd,输入 adb –version,如果有弹出类似下图的信息说明安装成功。

重启电脑,然后手机进入开发者选项,设置-关于手机,最下面版本号连点7次,再到设置-系统-开发者选项-USB调试打开。然后手机连接电脑,出现下面的画面:

手机出现上图这个,勾上,点允许
然后电脑cmd输入 adb devices

出现上图这个,说明连接成功
然后就可以用命令来停用或者开启应用了
比如停用应用:
adb shell pm disable-user ‘包名’
#例如停用google play商店
adb shell pm disable-user com.android.vending
开启应用:
adb shell pm enable ‘包名’
#例如开启google play商店
adb shell pm enable com.android.vending
转载请注明:八度生活 » 安卓手机adb安装调试停用开启应用