更新于

Fixing WiFi Network Restrictions on Stock Android and Modifying NTP Server


1. Fixing Network Restrictions

Using ADB Commands

First, delete the default addresses:

adb shell settings delete global captive_portal_https_url
adb shell settings delete global captive_portal_http_url

Then set the new addresses:

adb shell settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204
adb shell settings put global captive_portal_http_url http://connect.rom.miui.com/generate_204

2. Installing ADB (Windows)

ADB can be installed using winget or scoop.

Method 1: Using Winget

  1. Open Command Prompt or PowerShell
  2. Run the following command to install ADB and Fastboot:
winget install Google.PlatformTools
  1. Verify Installation

Check ADB version:

adb version

Check Fastboot version:

fastboot version

Method 2: Installing Google USB Driver (Optional)

You only need to follow this step if you connect your Android device in Fastboot mode and Windows doesn’t recognize it.

  1. Download the Driver

    Download the Google USB Driver. Click “Download the Google USB Driver ZIP file (ZIP)”. You don’t need to follow “Get it from the Android SDK Manager” unless you have Android Studio installed.

  2. Extract the downloaded zip file

  3. Update Driver in Device Manager

    • Connect your Android device in Fastboot mode to your PC
    • Open Device Manager
    • Locate your Android device (usually listed under “Unknown Devices”)
    • Right-click the device and select “Update driver”
    • Choose “Browse my computer for driver software”
    • Click “Let me pick from a list of available drivers on my computer”
    • Click “Have Disk…” and navigate to the folder where you extracted the driver
    • Select android_winusb.inf and follow the prompts (ignore any unsigned driver warnings if necessary)

You’re all set!