茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1664567 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
PIMG_00272.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

硬體園地 : [經驗]Google Pixel in China WiFi Captive Portal issue

發表者 討論內容
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15766
[經驗]Google Pixel in China WiFi Captive Portal issue

冷日回歸懷抱,入手了親兒子 Pixel6!
但很不幸的,冷日經常必須在中國出差!
導致常常要看到 WiFi 上面顯示了一個「已連上裝置,但無法提供網際網路連線」!
她不光是看了煩,重點是因為同時有電信的 5G 和 LTE 網路存在,所以 WiFi 的 Priority 就會被降下來!
那,為啥要 WiFi?Priority 降下來以後,『某些』網站(或網路服務)就不能使用,冷日一整個就毛起來了!!!

經過幾番努力,網路部門同仁提供了以下資訊:

Google pixel 原生安卓出現 WiFi 網絡受限、優化網速、網絡無法連接問題

版權聲明:本文為博主原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接和本聲明。

谷歌從 Android 5.0 開始就引入了「Captive Portal」機制,主要用來檢測 WiFI 網絡認證是否正常,默認檢測訪問的是谷歌服務器。

眾所周知谷歌服務器是需要404工具才能正常訪問,所以如果你沒有404工具的情況下,WiFi 就會出現網絡受限、WiFi圖標出現一個感歎號標誌,系統會以

為你網絡不好,導致網絡不穩定。


幸好谷歌對「Captive Portal」功能提供了參數變量設置,國內安卓手機系統都會修改成自家的服務器地址 或者 高通中國的地址。

已ROOT方法

已經 ROOT 的安卓機很簡單,可以用面具模塊、Scene、Captivemgr等工具來修改,這裡用的是 Captivemgr 因為可以自定義服務器地址。

默認提供了三個服務器,分別是小米、高通、V2EX,根據延遲選擇就行了,然後應用。手機切換飛行模式,再切換回來就OK了。

沒有ROOT情況 ( adb命令要自行安裝與配置)

沒有 ROOT 的安卓機可以借助 ADB 命令來修改,首先下載ADB工具包,然後手機開啟USB調試模式,接著運行 CMD 輸入下面的命令就可以了。

# 刪除默認的地址

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

# 修改新的地址

改完同樣把手機切換飛行模式,再切換回來就可以了。如果需要其它服務器地址,自行修改,如 MIUI 的是 http://connect.rom.miui.com/generate_204 地址

還有兩種方法如下:

1、可以自行刷機

2、 可以恢復手機默認配置


原文出處: Google pixel 原生安卓出现 WiFi 网络受限、优化网速、网络无法连接问题_JasonAndChen的博客-CSDN博客_pixel网络连接受限怎么处理


與此同時,冷日也做了一些功課,包括:



    # In `adb shell`
    $ settings get global captive_portal_http_url
    null
    $ settings get global captive_portal_https_url
    null
    $ settings put global captive_portal_http_url https://204.vercel.app/generate_204
    $ settings put global captive_portal_https_url https://204.vercel.app/generate_204
    $ settings
    Settings provider (settings) commands:
    help
    Print this help text.
    get [--user | current] [--lineage] NAMESPACE KEY
    Retrieve the current value of KEY.
    put [--user | current] [--lineage] NAMESPACE KEY VALUE [TAG] [default]
    Change the contents of KEY to VALUE.
    TAG to associate with the setting.
    {default} to set as the default, case-insensitive only for global/secure namespace
    delete [--lineage] NAMESPACE KEY
    Delete the entry for KEY.
    reset [--user | current] NAMESPACE {PACKAGE_NAME | RESET_MODE}
    Reset the global/secure table for a package with mode.
    RESET_MODE is one of {untrusted_defaults, untrusted_clear, trusted_defaults}, case-insensitive
    list [--lineage] NAMESPACE
    Print all defined keys.
    NAMESPACE is one of {system, secure, global}, case-insensitive

    # In `adb shell`
    $ settings get global captive_portal_http_url
    http://google.cn/generate_204
    $ settings get global captive_portal_https_url
    https://google.cn/generate_204
    $ settings put global captive_portal_http_url https://204.vercel.app/generate_204
    $ settings put global captive_portal_https_url https://204.vercel.app/generate_204
    $ settings
    usage: settings [--user | current] [--cm] get namespace key
    settings [--user | current] [--cm] put namespace key value
    settings [--user | current] [--cm] delete namespace key
    settings [--user | current] [--cm] list namespace
    'namespace' is one of {system, secure, global}, case-insensitive
    If '--user | current' is not given, the operations are performed on the system user.
    If '--cm' is given, the operations are performed on the CMSettings provider.

    Source: android-9.0.0_r8, android-7.1.2_r36


    原文出處: Android Captive Portal URL - Zero's Blog


    以及這個:

    關於 V2EX 提供的 Android Captive Portal Server 地址的更新

    Livid · 2016-09-04 21:58:42 +08:00 · 269591 次點擊

    最近,由於 V2EX 主站部署了全站 SSL ,所以導致了之前的 /generate_204 地址上出現了跳轉而無法使用。這是我們在部署這個更改之前沒有考慮周到的地方,造成的不便向大家道歉。


    因此,我們現在會提供一個專用的 Captive Portal Server 地址,這個地址會按照適合 Android 的方式進行配置,並且不會受到 V2EX 主站安全策略升級的影響。目前互聯網上已經有了很多 Captive Portal Server ,如果你已經在使用一個穩定的,那麼你是沒有必要更改的。我們提供的這個地址只是希望能夠讓大家可以有多一種選擇而已。


    captive.v2ex.co

    你可以使用 adb 命令行工具這樣設置:


    adb shell "settings put global captive_portal_server captive.v2ex.co"


    adb ( Android Debug Bridge )是一個功能強大的命令行工具,屬於 Google 官方的 Android 開發工具之一。你可以使用它來修改 Android 手機的一些核心設置。

    如果使用的是 OS X ,那麼你可以通過 Homebrew 獲取 adb :


    brew install android-platform-tools

    如果使用使用的是 Windows ,那麼可以使用下面這個帖子裡提到的快速安裝 adb 的工具:

    http://forum.xda-developers.com/showthread.php?p=48915118#post48915118

    如果你使用的是 Ubuntu/Debian ,那麼你可以在添加一個 PPA 包之後,通過 apt-get 獲得 adb :


    sudo add-apt-repository ppa:phablet-team/tools && sudo apt-get update
    sudo apt-get install android-tools-adb android-tools-fastboot

    如果你已經完整安裝了 Android Studio 的最新版本,那麼 adb 命令行工具也可以在 sdk/platform-tools 目錄下找到。

    你可以把下面的這個地址加入到 $PATH 中:


    ~/Library/Android/sdk/platform-tools

    如果你最近更新到了 Android 7.1.1,那么这个设置的语法稍有改变,请使用下面的指令重新设置:


    adb shell "settings put global captive_portal_https_url https://captive.v2ex.co/generate_204";

    在 Android 7.1.1 上需要执行两条指令:


    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";


    原文出處: 关于 V2EX 提供的 Android Captive Portal Server 地址的更新 - V2EX

    所以得出的結論是:
    1.Google Pixel 在台灣買的話,執行

    adb shell settings get global captive_portal_http_url
    拿到的是 null!(和這篇 Android Captive Portal URL - Zero's Blog 是一致的喔!)
    2.執行
    adb shell settings get global captive_portal_https_url
    的話,拿到的也是 null!(和這篇 Android Captive Portal URL - Zero's Blog 是一致的喔!)
    3.不要懷疑,Google 有 cn 的網址!!!所以冷日決定讓親兒子去跟老爹相認,將 captive_portal_http_url 設定為:
    adb shell settings put global captive_portal_http_url http://google.cn/generate_204


    4.但又考慮到 google 在 cn 境內只會越來越艱困,不容易更新 https 的憑證(雖然現在看起來是活著的),所以 https 冷日的設定為:
    adb shell settings put global captive_portal_https_url https://captive.v2ex.co/generate_204

    5.既然本來是 null,也就不應該 del,所以冷日並未執行
    adb shell settings delete global captive_portal_https_url adb shell settings delete global captive_portal_http_url

    6.其他的啥
    adb shell settings delete global captive_portal_https_mode
    或是啥
    set disable
    set enable=0
    都不建議服用!畢竟那都會影響到一些旅館、咖啡廳等的檢查機制!
    以上與大家分享,冷日實際服用有效,希望能幫上各位!

前一個主題 | 頁首 | | |



Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|