1、首先打开手机的开发这模式,并且打开USB调试以及OEM引导解锁 2、下载ADB工具,并且解压到单独的文件夹里 3、在该文件夹里,按住Shift+鼠标右键,点击在此处打开Powershell窗口 4、使用数据线连接手机和电脑 5、在打开的cmd页面,输入
adb devices
并在手机上点击允许该电脑调试 如果显示(其他机型会显示其他代码) List of devices attached PM1LHMA781401142     unauthorized 则说明连接成功,可以执行ADB命令 6、依次输入以下代码
adb shell settings delete global captive_portal_http_url
adb shell settings delete global captive_portal_https_url
adb shell settings put global captive_portal_http_url http://connect.rom.miui.com/generate_204
adb shell settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204
每次输入完代码都点击下回车,执行完成后,打开飞行模式,并且关闭,或者直接重启手机再次连接WiFi即可。 如果无法连接,需要修改NTP时间服务器(非必须)
adb shell settings put global ntp_server ntp.aliyun.com
之后重启手机即可