华为荣耀手机 (HUAWEI HONOR V9) USB 调试 - ADB 调试
1. 开发者模式
Settings (设置) -> System (系统) -> About phone (关于手机) -> Build number (版本号)
连续点击 Build number (版本号) 7 次进入 开发者模式。
You are already a developer!
2. USB debugging (USB 调试)
Settings (设置) -> System (系统) -> Developer options (开发人员选项) -> USB debugging (USB 调试)
Microsoft Windows [版本 10.0.19041.450]
(c) 2020 Microsoft Corporation. 保留所有权利。
C:\Users\cheng>adb kill-server
C:\Users\cheng>adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully
C:\Users\cheng>adb devices
List of devices attached
FFKDU17A28006357 device
C:\Users\cheng>adb shell
HWDUK:/ $ exit
C:\Users\cheng>
devices [-l] - list connected devices (-l for long output)
列出链接的设备 (-l
for long output)
Microsoft Windows [版本 10.0.19041.450]
(c) 2020 Microsoft Corporation. 保留所有权利。
C:\Users\cheng>adb devices
List of devices attached
FFKDU17A28006357 device
C:\Users\cheng>
C:\Users\cheng>adb devices -l
List of devices attached
FFKDU17A28006357 device product:DUK-AL20 model:DUK_AL20 device:HWDUK transport_id:1
C:\Users\cheng>
kill-server - kill the server if it is running
Microsoft Windows [版本 10.0.19041.450]
(c) 2020 Microsoft Corporation. 保留所有权利。
C:\Users\cheng>adb kill-server
C:\Users\cheng>
C:\Users\cheng>adb kill-server
cannot connect to daemon at tcp:5037: cannot connect to 127.0.0.1:5037: 由于目标计算机积极拒绝,无法连接。 (10061)
C:\Users\cheng>
C:\Users\cheng>adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
FFKDU17A28006357 device
C:\Users\cheng>
C:\Users\cheng>adb kill-server
C:\Users\cheng>
-a - listen on all network interfaces, not just localhost
- 侦听所有网络接口,而不仅仅是本地主机
-H - name of adb server host [default=localhost]
adb -a nodaemon server
- 启动守护进程
adb -a nodaemon server
- 启动守护进程后,其他用户可以通过 adb -H 192.168.*.*** devices
和 adb -H 192.168.*.*** shell
访问 192.168.*.***
挂载的手机。
Microsoft Windows [版本 10.0.19041.450]
(c) 2020 Microsoft Corporation. 保留所有权利。
C:\Users\cheng>adb kill-server
C:\Users\cheng>adb -a nodaemon server
adb I 08-29 17:46:17 4356 15120 auth.cpp:417] adb_auth_init...
adb I 08-29 17:46:17 4356 15120 auth.cpp:152] loaded new key from 'C:\Users\cheng\.android\adbkey' with fingerprint C003CF5AD89F690A49BB31A1FB606378F31F0772F9ED77D67B67921478710B0E
adb I 08-29 17:46:17 4356 15816 transport.cpp:325] FFKDU17A28006357: read thread spawning
adb I 08-29 17:46:17 4356 11432 transport.cpp:297] FFKDU17A28006357: write thread spawning
adb I 08-29 17:46:17 4356 15120 transport.cpp:1527] fetching keys for transport FFKDU17A28006357
adb I 08-29 17:46:17 4356 15120 auth.cpp:469] Calling send_auth_response
adb I 08-29 17:46:17 4356 15120 adb.cpp:124] FFKDU17A28006357: offline
Microsoft Windows [版本 10.0.19041.450]
(c) 2020 Microsoft Corporation. 保留所有权利。
C:\Users\cheng>adb kill-server
C:\Users\cheng>adb -a nodaemon server
adb I 08-29 17:46:17 4356 15120 auth.cpp:417] adb_auth_init...
adb I 08-29 17:46:17 4356 15120 auth.cpp:152] loaded new key from 'C:\Users\cheng\.android\adbkey' with fingerprint C003CF5AD89F690A49BB31A1FB606378F31F0772F9ED77D67B67921478710B0E
adb I 08-29 17:46:17 4356 15816 transport.cpp:325] FFKDU17A28006357: read thread spawning
adb I 08-29 17:46:17 4356 11432 transport.cpp:297] FFKDU17A28006357: write thread spawning
adb I 08-29 17:46:17 4356 15120 transport.cpp:1527] fetching keys for transport FFKDU17A28006357
adb I 08-29 17:46:17 4356 15120 auth.cpp:469] Calling send_auth_response
adb I 08-29 17:46:17 4356 15120 adb.cpp:124] FFKDU17A28006357: offline
adb I 08-29 17:46:43 4356 15120 transport.cpp:1110] kicking transport 0150d1c0 FFKDU17A28006357
adb I 08-29 17:46:43 4356 15120 transport.cpp:400] BlockingConnectionAdapter(FFKDU17A28006357): stopping
adb I 08-29 17:46:43 4356 15816 transport.cpp:329] FFKDU17A28006357: read failed: Input/output error
adb I 08-29 17:46:43 4356 15816 transport.cpp:810] FFKDU17A28006357: connection terminated: read failed
adb I 08-29 17:46:43 4356 15120 transport.cpp:418] BlockingConnectionAdapter(FFKDU17A28006357): stopped
C:\Users\cheng>
adb -a nodaemon server
执行前,先执行 adb kill-server
。
Microsoft Windows [版本 10.0.19041.450]
(c) 2020 Microsoft Corporation. 保留所有权利。
C:\Users\cheng>adb devices
List of devices attached
FFKDU17A28006357 device
C:\Users\cheng>
C:\Users\cheng>adb -a nodaemon server
adb F 08-29 18:13:43 14532 12896 main.cpp:153] could not install *smartsocket* listener: cannot bind to 0.0.0.0:5037: 閫氬父姣忎釜濂楁帴瀛楀湴鍧€(鍗忚/缃戠粶鍦板潃/绔彛)鍙厑璁镐娇鐢ㄤ竴娆°€?(10048)
C:\Users\cheng>
C:\Users\cheng>adb kill-server
C:\Users\cheng>
C:\Users\cheng>adb -a nodaemon server
adb I 08-29 18:13:56 12056 9368 auth.cpp:417] adb_auth_init...
adb I 08-29 18:13:56 12056 9368 auth.cpp:152] loaded new key from 'C:\Users\cheng\.android\adbkey' with fingerprint C003CF5AD89F690A49BB31A1FB606378F31F0772F9ED77D67B67921478710B0E
adb I 08-29 18:13:56 12056 5288 transport.cpp:325] FFKDU17A28006357: read thread spawning
adb I 08-29 18:13:56 12056 13816 transport.cpp:297] FFKDU17A28006357: write thread spawning
adb I 08-29 18:13:56 12056 9368 transport.cpp:1527] fetching keys for transport FFKDU17A28006357
adb I 08-29 18:13:56 12056 9368 auth.cpp:469] Calling send_auth_response
adb I 08-29 18:13:56 12056 9368 adb.cpp:124] FFKDU17A28006357: offline
adb I 08-29 18:13:58 12056 9368 transport.cpp:1110] kicking transport 00ec2b88 FFKDU17A28006357
adb I 08-29 18:13:58 12056 9368 transport.cpp:400] BlockingConnectionAdapter(FFKDU17A28006357): stopping
adb I 08-29 18:13:58 12056 5288 transport.cpp:329] FFKDU17A28006357: read failed: Input/output error
adb I 08-29 18:13:58 12056 5288 transport.cpp:810] FFKDU17A28006357: connection terminated: read failed
adb I 08-29 18:13:58 12056 9368 transport.cpp:418] BlockingConnectionAdapter(FFKDU17A28006357): stopped
C:\Users\cheng>