How to Fix WiFi Connection Issues on Google Phones/Nexus/LineageOS

How to Fix WiFi Connection Issues on Google Phones/Nexus/LineageOS

Have you ever noticed that after flashing foreign Android native systems, when connecting to all WiFi networks, it prompts “Connected, but no internet access”? This message appears, but you can still browse the internet normally. This is actually because the server used internally by the system to verify network connectivity is unreachable from China, hence the system prompts that there is no internet connection. So how can we solve this problem?

Method 1: ADB Replacement Method (requires a computer, no ROOT needed on the phone): Download the Android ADB + Fastboot toolkit: https://dl.google.com/android/repository/platform-tools-latest-windows.zip

First, delete the default verification addresses: adb shell settings delete global captive_portal_http_url adb shell settings delete global captive_portal_https_url

Then modify the new verification server address: 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

Update the clock synchronization server address: adb shell settings put global ntp_server ntp1.aliyun.com

After executing these commands, turn on airplane mode, then turn it off, or restart the phone to remove the cross mark or exclamation mark. If it remains the same after adjustment, check the phone’s timezone and time, adjusting them to the correct settings should resolve the issue.

Method 2: Software Replacement Method (requires ROOT on the phone): CaptiveMgr: search for it yourself.

Method 3: ROM Compilation Modification Method: For Android versions below 9, tutorial on modifying the 204 server: Source code location: frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java

Original code: private static final String DEFAULT_HTTPS_URL=”https://www.google.com/generate_204″; private static final String DEFAULT_HTTP_URL=”http://connectivitycheck.gstatic.com/generate_204″; private static final String DEFAULT_FALLBACK_URL=”http://www.google.com/gen_204″; private static final String DEFAULT_OTHER_FALLBACK_URLS=”http://play.googleapis.com/generate_204″;

Change to: private static final String DEFAULT_HTTPS_URL=”https://connect.rom.miui.com/generate_204″; private static final String DEFAULT_HTTP_URL=”http://connect.rom.miui.com/generate_204″; private static final String DEFAULT_FALLBACK_URL=”http://connect.rom.miui.com/generate_204″; private static final String DEFAULT_OTHER_FALLBACK_URLS=”http://connect.rom.miui.com/generate_204″;

Recompile to solve it.

For Android 10 and above, tutorial on modifying the 204 server: In Android 10, we find that there is no longer a NetworkMonitor under frameworks/base/services/core/java/com/android/server/connectivity/. Originally, from Android Q onwards, network status is determined by networkstack, and accordingly, we still solve this problem by modifying the 204 server.

Source code location: packages/modules/NetworkStack/res/config.xml Original code:

<!-- HTTP URL for network validation, to use for detecting captive portals. --><string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.com/generate_204</string><!-- HTTPS URL for network validation, to use for confirming internet connectivity. --><string name="default_captive_portal_https_url" translatable="false">https://www.google.com/generate_204</string><!-- List of fallback URLs to use for detecting captive portals. --><string-array name="default_captive_portal_fallback_urls" translatable="false">    <item>http://www.google.com/gen_204</item>    <item>http://play.googleapis.com/generate_204</item></string-array>

Change to:

<!-- HTTP URL for network validation, to use for detecting captive portals. --><string name="default_captive_portal_http_url" translatable="false">http://connect.rom.miui.com/generate_204</string><!-- HTTPS URL for network validation, to use for confirming internet connectivity. --><string name="default_captive_portal_https_url" translatable="false">https://connect.rom.miui.com/generate_204</string><!-- List of fallback URLs to use for detecting captive portals. --><string-array name="default_captive_portal_fallback_urls" translatable="false">    <item>http://connect.rom.miui.com/generate_204</item>    <item>http://connect.rom.miui.com/generate_204</item></string-array>

How to Fix WiFi Connection Issues on Google Phones/Nexus/LineageOS

Source of information:

How to Fix WiFi Connection Issues on Google Phones/Nexus/LineageOS

The National Center for Technical Supervision of Defective Products Recall under the State Administration for Market Regulation is a directly subordinate institution of the State Administration for Market Regulation, mainly responsible for the research on the recall system for defective products and food, information monitoring, technical investigation, and application services. The center has an office (personnel department), comprehensive business department, food department, consumer goods department, motor vehicle department, high-tech products and quality assurance department, technology department, condition assurance department, and party-mass work department (discipline inspection office).

How to Fix WiFi Connection Issues on Google Phones/Nexus/LineageOS

The National Highway Traffic Safety Administration (NHTSA) is the highest authority for automobile safety in the United States. It is an executive agency under the Department of Transportation, aimed at “saving lives, preventing injuries, and reducing vehicle-related crashes”.

How to Fix WiFi Connection Issues on Google Phones/Nexus/LineageOS

National Center for Technical Supervision of Defective Products Recall

How to Fix WiFi Connection Issues on Google Phones/Nexus/LineageOS

https://www.samrdprc.org.cn/qxts/

🚨⚠️ Actively report quality defects ⚠️🚨

How to Fix WiFi Connection Issues on Google Phones/Nexus/LineageOSHow to Fix WiFi Connection Issues on Google Phones/Nexus/LineageOS

How to Fix WiFi Connection Issues on Google Phones/Nexus/LineageOSHow to Fix WiFi Connection Issues on Google Phones/Nexus/LineageOS

How to Fix WiFi Connection Issues on Google Phones/Nexus/LineageOSHow to Fix WiFi Connection Issues on Google Phones/Nexus/LineageOS

Related Content

  1. How to Create a Bootable macOS USB Installer

  2. How to Completely Turn Off System Update Notifications on Mac?

  3. MAC Apple System Version Number

Leave a Comment

Your email address will not be published. Required fields are marked *