欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 教育 > 培训 > 【windows】win10提示‘adb‘ 不是内部或外部命令,也不是可运行的程序或批处理文件。

【windows】win10提示‘adb‘ 不是内部或外部命令,也不是可运行的程序或批处理文件。

2024/10/25 19:19:58 来源:https://blog.csdn.net/wgl307293845/article/details/142939556  浏览:    关键词:【windows】win10提示‘adb‘ 不是内部或外部命令,也不是可运行的程序或批处理文件。

问题日志

adb devices
'adb' 不是内部或外部命令,也不是可运行的程序或批处理文件

解决方案

下载adb,将adb放到如下目录

adb.exe

AdbWinApi.dll

AdbWinUsbApi.dll

文件放到以下目录
C:\Windows\SysWOW64
C:\Windows\System32

测试验证

adb
Android Debug Bridge version 1.0.40
Version 4797878
Installed as C:\Windows\system32\adb.exeglobal options:-a         listen on all network interfaces, not just localhost-d         use USB device (error if multiple devices connected)-e         use TCP/IP device (error if multiple TCP/IP devices available)-s SERIAL  use device with given serial (overrides $ANDROID_SERIAL)-t ID      use device with given transport id-H         name of adb server host [default=localhost]-P         port of adb server [default=5037]-L SOCKET  listen on given socket for adb server [default=tcp:localhost:5037]general commands:devices [-l]             list connected devices (-l for long output)help                     show this help messageversion                  show version numnetworking:connect HOST[:PORT]      connect to a device via TCP/IP [default port=5555]disconnect [HOST[:PORT]]disconnect from given TCP/IP device [default port=5555], or allforward --list           list all forward socket connectionsforward [--no-rebind] LOCAL REMOTEforward socket connection using:tcp:<port> (<local> may be "tcp:0" to pick any open 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)forward --remove LOCAL   remove specific forward socket connectionforward --remove-all     remove all forward socket connectionsppp TTY [PARAMETER...]   run PPP over USBreverse --list           list all reverse socket connections from devicereverse [--no-rebind] REMOTE LOCALreverse socket connection using:tcp:<port> (<remote> may be "tcp:0" to pick any open port)localabstract:<unix domain socket name>localreserved:<unix domain socket name>localfilesystem:<unix domain socket name>reverse --remove REMOTE  remove specific reverse socket connectionreverse --remove-all     remove all reverse socket connections from devicefile transfer:push [--sync] LOCAL... REMOTEcopy local files/directories to device--sync: only push files that are newer on the host than the devicepull [-a] REMOTE... LOCALcopy files/dirs from device-a: preserve file timestamp and modesync [all|data|odm|oem|product|system|vendor]sync a local build from $ANDROID_PRODUCT_OUT to the device (default all)-l: list but don't copyshell:shell [-e ESCAPE] [-n] [-Tt] [-x] [COMMAND...]run remote shell command (interactive shell if no command given)-e: choose escape character, or "none"; default '~'-n: don't read from stdin-T: disable PTY allocation-t: force PTY allocation-x: disable remote exit codes and stdout/stderr separationemu COMMAND              run emulator console commandapp installation:install [-lrtsdg] [--instant] PACKAGEinstall-multiple [-lrtsdpg] [--instant] PACKAGE...push package(s) to the device and install them-l: forward lock application-r: replace existing application-t: allow test packages-s: install application on sdcard-d: allow version code downgrade (debuggable packages only)-p: partial application install (install-multiple only)-g: grant all runtime permissions--instant: cause the app to be installed as an ephemeral install appuninstall [-k] PACKAGEremove this app package from the device'-k': keep the data and cache directoriesbackup/restore:to show usage run "adb shell bu help"debugging:bugreport [PATH]write bugreport to given PATH [default=bugreport.zip];if PATH is a directory, the bug report is saved in that directory.devices that don't support zipped bug reports output to stdout.jdwp                     list pids of processes hosting a JDWP transportlogcat                   show device log (logcat --help for more)security:disable-verity           disable dm-verity checking on userdebug buildsenable-verity            re-enable dm-verity checking on userdebug buildskeygen FILEgenerate adb public/private key; private key stored in FILE,public key stored in FILE.pub (existing files overwritten)scripting:wait-for[-TRANSPORT]-STATEwait for device to be in the given stateState: device, recovery, sideload, or bootloaderTransport: usb, local, or any [default=any]get-state                print offline | bootloader | deviceget-serialno             print <serial-number>get-devpath              print <device-path>remount                  remount partitions read-writereboot [bootloader|recovery|sideload|sideload-auto-reboot]reboot the device; defaults to booting system image butsupports bootloader and recovery too. sideload rebootsinto recovery and automatically starts sideload mode,sideload-auto-reboot is the same but reboots after sideloading.sideload OTAPACKAGE      sideload the given full OTA packageroot                     restart adbd with root permissionsunroot                   restart adbd without root permissionsusb                      restart adb server listening on USBtcpip PORT               restart adb server listening on TCP on PORTinternal debugging:start-server             ensure that there is a server runningkill-server              kill the server if it is runningreconnect                kick connection from host side to force reconnectreconnect device         kick connection from device side to force reconnectreconnect offline        reset offline/unauthorized devices to force reconnectenvironment variables:$ADB_TRACEcomma-separated list of debug info to log:all,adb,sockets,packets,rwx,usb,sync,sysdeps,transport,jdwp$ADB_VENDOR_KEYS         colon-separated list of keys (files or directories)$ANDROID_SERIAL          serial number to connect to (see -s)$ANDROID_LOG_TAGS        tags to be used by logcat (see logcat --help)


 

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com