共码科技,懂软件、懂安全的科技公司,公司承接Android系统产品定制、Android、iOS等APP开发、前后端网站开发、小程序开发、安全检测、渗透测试、溯源取证、安全服务等项目!
公司官网:www.bincodesec.com
Google系列手机使用adb命令解决无法联网问题的解决方法
目录
一、通用解决方案 2
二、Android手机使用的通用方法(简洁版) 8
三、Android手机已ROOT方法 12
四、Android手机未ROOT方法(方法一) 13
五、Android手机未ROOT方法(方法二) 13
六、Android7.0及以上系统连接WIFI显示网络连接受限(定制ROM方案) 14
Google系列Android手机使用adb命令解决无法联网问题
一、通用解决方案
第1步:
手机通过USB线连接上电脑,如果电脑没有安装adb驱动,此时可以安装"驱动人生"或"驱动精灵",然后在"驱动人生"或"驱动精灵"上安装adb驱动,最后才可以通过adb shell去连接手机,也可以通过下面的URL链接去下载adb驱动和adb文件
http://adbdownload.com/

https://adbdriver.com/downloads/

https://adbshell.com/upload/adb.ziphttps://adbshell.com/downloads
ADB和Fastboot for Windows
https://dl.google.com/android/repository/platform-tools-latest-windows.zip
ADB和Fastboot for Mac
https://dl.google.com/android/repository/platform-tools-latest-darwin.zip
ADB和Fastboot for Linux
https://dl.google.com/android/repository/platform-tools-latest-linux.zip
第2步:
打开手机,在手机屏幕上找到"设置"--->"关于手机"--->"版本号"
**多次点击"版本号"**会提示"您已处于开发者模式,无需进行此操作"
第3步:
返回上一步
或者
找到"设置"--->打开"开发人员选项"或"开发者选项"--->打开"USB调试"

第4步:
下载adb,然后把adb文件夹存放在D盘,如下所示:
找到E:\Android手机打开USB调试模式\adb所在的文件夹,然后在adb文件夹的上方输入cmd命令,然后按电脑键盘的"Enter"键盘回车就可以弹出命令行的终端



或者
电脑鼠标按快捷键
Windows图标+R


第5步:
执行adb shell命令,然后按电脑键盘的"Enter"键盘回车,此时如果没有进入adb shell,那就需要在执行adb shell命令后手机会弹出一个提示框 ,只需要点击"确定"就可以了



第6步:
执行
adb shell

第7步:
(1).访问google等国外资源,依次执行以下4条adb命令
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

(2).访问百度等国内资源,依次执行以下4条adb命令
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

二、Android手机使用的通用方法(简洁版)
adb和fastboot工具
链接:https://pan.baidu.com/s/12N0wKuqGjkuZEZnnGJVEkw提取码:tdcs
usb驱动
链接:https://pan.baidu.com/s/1asVIizUZtxm8gRdsdoTSiQ提取码:dak9
adb驱动
链接:https://pan.baidu.com/s/1DcN638GhNcX-PgYo9wVFGA提取码:g9q0
小米、华为、OPPO、VIVO、TCL、三星、联想、中兴、Google等手机都通用的操作方法
1.打开Android手机的开发者模式
(1)."设置"--->"关于手机"--->"版本号"
(2).连续点击"版本号"

2.打开Android手机的USB调试
(1)."设置"--->"开发人员选项"或"开发者选项"--->"USB调试"

3.使用adb连接Android手机
(1).电脑上安装adb驱动
(2).Android手机通过USB线连接到电脑
(3).Android手机上会弹出提示对话框"USB连接方式",选择"文件传输"

(4).adb连接Android
adb shell





视频教程和PDF下载地址
https://download.csdn.net/download/u011426115/86811216https://download.csdn.net/download/u011426115/86811203https://download.csdn.net/download/u011426115/86811192https://download.csdn.net/download/u011426115/86811177https://blog.csdn.net/u011426115/article/details/127506004https://m.weishi100.com/mweb/single/1666650236443/?id=8960958https://m.weishi100.com/mweb/series/?id=1372437https://m.weishi100.com/mweb/series/?id=1373351
三、Android手机已ROOT方法
利用CaptiveMgr自定义服务器地址
https://www.coolapk.com/apk/tech.evlsoc.captivemgr

可以用面具模块、Scene、Captivemgr等工具来修改,用的是Captivemgr因为可以自定义服务器地址。
默认提供了三个服务器,分别是小米、高通、V2EX,根据延迟选择就行了,然后应用。手机切换飞行模式,再切换回来就OK了。

四、Android手机未ROOT方法(方法一)
https://shizuku.rikka.app/zh-hans/

五、Android手机未ROOT方法(方法二)
(1).删除默认的地址
adb shell settings delete global captive_portal_https_urladb 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
修改后把手机切换到飞行模式,再切换回来就可以了。如果需要其它服务器地址,也可以修改
例如:
MIUI的地址
http://connect.rom.miui.com/generate_204https://connect.rom.miui.com/generate_204
华为的地址
http://connectivitycheck.platform.hicloud.com/generate_204https://connectivitycheck.platform.hicloud.com/generate_204
Google地址
http://clients3.google.com/generate_204https://clients3.google.com/generate_204或http://www.google.com/generate_204https://www.google.com/generate_204
国内地址
http://204.ustclug.orghttps://204.ustclug.org
**六、Android7.0及以上系统连接WIFI显示网络连接受限(定制ROM方案)**
captive_portal_use_httpscaptive_portal_http_urlcaptive_portal_https_urlcaptive_portal_mode


(1).修改默认访问服务器的URL地址
def_captive_portal_https_url

frameworks\base\packages\SettingsProvider/res/values/defaults.xml
<string name="def_captive_portal_https_url">https://www.google.com/generate_204</string>
frameworks\base\packages\SettingsProvider\src\com\android\providers\settings\DatabaseHelper.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

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
推荐阅读
AOSP Android10导入BurpSuite CA证书抓包