ADB和Fastboot for Windows
ADB和Fastboot for Mac
ADB和Fastboot for Linux
第2步:打开手机,在手机屏幕上找到"设置"--->"关于手机"--->"版本号"多次点击"版本号"会提示"您已处于开发者模式,无需进行此操作"
adb shell
adb shell settings put global captive_portal_use_https 1
adb shell settings put global captive_portal_http_url http://clients3.google.com/generate_204
adb shell settings put global captive_portal_https_url https://clients3.google.com/generate_204
adb shell settings put global captive_portal_mode 0
adb shell settings put global captive_portal_use_https 1
adb shell settings put global captive_portal_http_url http://204.ustclug.org
adb shell settings put global captive_portal_https_url https://204.ustclug.org
adb shell settings put global captive_portal_mode 0
usb驱动
adb驱动
小米、华为、OPPO、VIVO、TCL、三星、联想、中兴、Google等手机都通用的操作方法1.打开Android手机的开发者模式
adb shell
adb shell settings delete global captive_portal_https_url
adb shell settings delete global captive_portal_http_url
(2).修改新的地址
adb shell settings put global captive_portal_http_url http://captive.v2ex.co/generate_204
adb shell settings put global captive_portal_https_url https://captive.v2ex.co/generate_204
修改后把手机切换到飞行模式,再切换回来就可以了。如果需要其它服务器地址,也可以修改 华为的地址
Google地址
国内地址
六、Android7.0及以上系统连接WIFI显示网络连接受限(定制ROM方案)
captive_portal_use_https
captive_portal_http_url
captive_portal_https_url
captive_portal_mode
def_captive_portal_https_url
frameworksbasepackagesSettingsProvider/res/values/defaults.xml
<string name="def_captive_portal_https_url">https://www.google.com/generate_204
frameworksbasepackagesSettingsProvidersrccomandroidproviderssettingsDatabaseHelper.java
private void loadGlobalSettings(SQLiteDatabase db) {
loadBooleanSetting(stmt, Settings.Global.WIFI_DISPLAY_ON, R.bool.def_wifi_display_on);
loadStringSetting(stmt, Settings.Global.CAPTIVE_PORTAL_HTTPS_URL, R.string.def_captive_portal_https_url);
loadStringSetting(stmt, Settings.Global.LOCK_SOUND, R.string.def_lock_sound);
}
Android10及以上无NetworkMonitor.java
frameworks/base/core/java/android/net/NetworkCapabilities.java
frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java
frameworks/base/packages/SetttinsProvider/res/values/defaults.xml
def_captive_portal_detection_enabled属性初始值改为0
审核编辑:汤梓红
全部0条评论
快来发表一下你的评论吧 !