一、簡單的單機機器解決:java
adb shell settings delete global captive_portal_server adb shell settings put global captive_portal_detection_enabled 0
二、系統源碼着手:android
路徑:frameworks/base/packages/SettingsProvider
/res/values/defaults.xml:shell
<integer name="def_captive_portal_detection_enabled">0</integer>
/src/com/android/providers/settings/DatabaseHelper.java:bash
@method:private void loadGlobalSettings(SQLiteStatement stmt) { loadIntegerSetting(stmt, Global.CAPTIVE_PORTAL_DETECTION_ENABLED, R.integer.def_captive_portal_detection_enabled);