wear-os – 无法通过蓝牙连接Android Wear设备

wear-os – 无法通过蓝牙连接Android Wear设备,第1张

概述我有USB调试,我显示目标已连接但我无法连接主机. 当我在PC上运行以下命令时,我得到输出,表明命令未完成. adb forward tcp:4444 localabstract:/adb-hub; adb connect localhost:4444 输出: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Android Studio>a 我有USB调试,我显示目标已连接但我无法连接主机.

当我在PC上运行以下命令时,我得到输出,表明命令未完成.

adb forward tcp:4444 localabstract:/adb-hub; adb connect localhost:4444

输出:

C:\ProgramData\Microsoft\windows\Start Menu\Programs\AndroID Studio>adb forwardtcp: 4444 localabstract:/adb-hub;adb connect localhost:4444AndroID DeBUG BrIDge version 1.0.31 -a                            - directs adb to Listen on all interfaces for a connection -d                            - directs command to the only connected USB device                                 returns an error if more than one USB device is present. -e                            - directs command to the only running emulator.                                 returns an error if more than one emulator is running. -s <specific device>          - directs command to the device or emulator withthe given                                 serial number or qualifIEr. OverrIDes ANDROID_SERIAL                                 environment variable. -p <product name or path>     - simple product name like 'sooner',or                                 a relative/absolute path to a product                                 out directory like 'out/target/product/sooner'.                                 If -p is not specifIEd,the ANDROID_PRODUCT_OUT                                 environment variable is used,which must                                 be an absolute path. -H                            - name of adb server host (default: localhost) -P                            - Port of adb server (default: 5037) devices [-l]                  - List all connected devices                                 ('-l' will also List device qualifIErs) connect <host>[:<port>]       - connect to a device via TCP/IP                                 Port 5555 is used by default if no port numberis specifIEd. disconnect [<host>[:<port>]]  - disconnect from a TCP/IP device.                                 Port 5555 is used by default if no port numberis specifIEd.                                 Using this command with no additional arguments                                 will disconnect from all connected TCP/IP devices.device commands:  adb push <local> <remote>    - copy file/dir to device  adb pull <remote> [<local>]  - copy file/dir from device  adb sync [ <directory> ]     - copy host->device only if changed                                 (-l means List but don't copy)                                 (see 'adb help all')  adb shell                    - run remote shell interactively  adb shell <command>          - run remote shell command  adb emu <command>            - run emulator console command  adb logcat [ <filter-spec> ] - VIEw device log  adb forward --List           - List all forward socket connections.                                 the format is a List of lines with the following format:                                    <serial> " " <local> " " <remote> "\n"  adb forward <local> <remote> - forward socket connections                                 forward specs are one of:                                   tcp:<port>                                   localabstract:<unix domain socket name>                                   localreserved:<unix domain socket name>                                   localfilesystem:<unix domain socket name>                                   dev:<character device name>                                   jDWp:<process pID> (remote only)  adb forward --no-rebind <local> <remote>                               - same as 'adb forward <local> <remote>' but fails                                 if <local> is already forwarded  adb forward --remove <local> - remove a specific forward socket connection  adb forward --remove-all     - remove all forward socket connections  adb jDWp                     - List PIDs of processes hosting a JDWP transport  adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> --iv <hex-encoded iv>] <file>                               - push this package file to the device and install it                                 ('-l' means forward-lock the app)                                 ('-r' means reinstall the app,keePing its data)                                 ('-s' means install on SD card instead of internal storage)                                 ('--algo','--key',and '--iv' mean the file is encrypted already)  adb uninstall [-k] <package> - remove this app package from the device                                 ('-k' means keep the data and cache directorIEs)  adb BUGreport                - return all information from the device                                 that should be included in a BUG report.  adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all][-system|-nosystem] [<packages...>]                               - write an archive of the device's data to <file>.                                 If no -f option is supplIEd then the data is written                                 to "backup.ab" in the current directory.                                 (-apk|-noapk enable/disable backup of the .apks themselves                                    in the archive; the default is noapk.)                                 (-obb|-noobb enable/disable backup of any installed apk expansion                                    (aka .obb) files associated with each application; the default                                    is noobb.)                                 (-shared|-noshared enable/disable backup of the device's                                    shared storage / SD card contents; the default is noshared.)                                 (-all means to back up all installed applications)                                 (-system|-nosystem toggles whether -all automatically includes                                    system applications; the default is to include system apps)                                 (<packages...> is the List of applications to be backed up.  If                                    the -all or -shared flags are passed,then the package                                    List is optional.  Applications explicitly given on the                                    command line will be included even if -nosystem would                                    ordinarily cause them to be omitted.)  adb restore <file>           - restore device contents from the <file> backuparchive  adb help                     - show this help message  adb version                  - show version numscripting:  adb wait-for-device          - block until device is online  adb start-server             - ensure that there is a server running  adb kill-server              - kill the server if it is running  adb get-state                - prints: offline | bootloader | device  adb get-serialno             - prints: <serial-number>  adb get-devpath              - prints: <device-path>  adb status-window            - continuously print device status for a specifIEd device  adb remount                  - remounts the /system partition on the device read-write  adb reboot [bootloader|recovery] - reboots the device,optionally into the bootloader or recovery program  adb reboot-bootloader        - reboots the device into the bootloader  adb root                     - restarts the adbd daemon with root permissions  adb usb                      - restarts the adbd daemon Listening on USB  adb tcpip <port>             - restarts the adbd daemon Listening on TCP on the specifIEd portnetworking:  adb ppp <tty> [parameters]   - Run PPP over USB. Note: you should not automatically start a PPP connection. <tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1 [parameters] - Eg. defaultroute deBUG dump local notty usepeerdnsadb sync notes: adb sync [ <directory> ]  <localdir> can be interpreted in several ways:  - If <directory> is not specifIEd,both /system and /data partitions will be updated.  - If it is "system" or "data",only the corresponding partition    is updated.environmental variables:  ADB_TRACE                    - Print deBUG information. A comma separated List of the following values                                 1 or all,adb,sockets,packets,rwx,usb,sync,sysdeps,transport,jDWp  ANDROID_SERIAL               - The serial number to connect to. -s takes priority over this if given.  ANDROID_LOG_Tags             - When used with the logcat option,only these deBUG Tags are printed.
解决方法 为了您的信息,我终于通过将端口4444替换为5601解决了同样的问题.

2个电话是:

adb forward tcp:5601 localabstract:/adb-hub

adb connect localhost:5601

(我的AndroID Wear设备是LG G Watch,我的AndroID平板电脑是华硕Nexus 7)

总结

以上是内存溢出为你收集整理的wear-os – 无法通过蓝牙连接Android Wear设备全部内容,希望文章能够帮你解决wear-os – 无法通过蓝牙连接Android Wear设备所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1135075.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存