此电脑(右击)→ 属性 → 高级系统设置 → 高级 → 环境变量 → 系统变量 → Path(双击)
→新建添加 adb.exe路径
2. adb常用指令adb devices 当前连接了几个设备以及每个连接的状态
shell [ adb shell pm list packages 列出手机装的所有app的包名 adb push 运行远程shell命令 (如果没有给出命令,则使用交互式shell) adb emu the format is a list of lines with the following format: adb forward forward specs are one of: adb forward --no-rebind - same as 'adb forward adb forward --remove reverse specs are one of: adb reverse --no-rebind - same as 'adb reverse adb reverse --remove - remove a specific reversed socket connection adb reverse --remove-all - remove all reversed socket connections from device adb jdwp - list PIDs of processes hosting a JDWP transport adb install [-lrtsdg] 把安装包发送到设备并安装 adb install-multiple [-lrtsdpg] - push this package file to the device and install it adb uninstall [-k] (“K”意味着保持数据和缓存目录) adb bugreport [ If adb restore and the public key is stored in adb help - show this help message adb version - show version num
欢迎分享,转载请注明来源:内存溢出
device commands
(-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 separation)
tcp:
localabstract:
localreserved:
localfilesystem:
dev:
jdwp:
if
tcp:
localabstract:
localreserved:
localfilesystem:
if
(-l: “L”意味着锁的应用程序)
(-r: “R”意味着重新安装应用程序,保持其数据)
(-t: allow test packages)
(-s: “S”是指安装在SD卡代替内部存储)
(-d: allow version code downgrade (debuggable packages only))
(-g: grant all runtime permissions)
(-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)
(-g: grant all runtime permissions)
If
e device.
If
the device.
NOTE: if the device does not support zipped bug reports, the bug report will be output on stdout.
adb backup [-f
- write an archive of the device's data to
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)
(
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.)
are overwritten.
评论列表(0条)