Python模块ADB的, 已经 pyadb

Python模块ADB的使用指南_笔记大全_设计学院 (python100.com)

pip install adb

Python 调用ADB_python 调用adb命令_实相实相的博客-CSDN博客

Python ADB.shell_command Examples, pyadb.ADB.shell_command Python Examples - HotExamples

Gitee 极速下载/PyADB - 码云 - 开源中国

# creates the ADB object
    adb = ADB()
    # IMPORTANT: You should supply the absolute path to ADB binary
    if adb.set_adb_path('/usr/bin/adb') is True:
        print("Version: %s" % adb.get_version())
    else:
        print("Check ADB binary path")

    apps = adb.shell_command("pm list packages")
    for app in apps:
        path = adb.shell_command("pm path {}".format(app.split(':')[1]))
        print("{}: {}".format(app, path))

python在adb shell环境下执行命令 - wztshine - 博客园 (cnblogs.com)

import subprocess

obj = subprocess.Popen('adb -s 8BHX1B399 shell', stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,shell=True)
out,err = obj.communicate(input='cd /data/;ls;find . -type d'.encode())   # 通过communicate传递数据,返回(stdout,stderr)
print(out.decode())

import os
import subprocess

cmd = 'adb -s 8BHX1B399 shell "cd /data;ls"'   # 将你要执行的子命令用引号写出来,命令间以';'分割
result = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
output, error = result.communicate(timeout=600)
print(output.decode())

Python 在Python中使用subprocess的communicate函数实现多个输入和输出|极客教程 (geek-docs.com)

相关推荐
卓琢1 天前
(四)Mysql 数据库备份恢复全攻略
数据库·mysql·adb
დ旧言~3 天前
【MySQL】数据类型
android·数据库·mysql·adb
დ旧言~3 天前
【MySQL】MySQL库的操作
android·adb
猿~阿峰4 天前
MySQL
android·mysql·adb
新知图书4 天前
启动服务并登录MySQL9数据库
数据库·adb
在下村刘湘5 天前
MySQL本地安装步骤
数据库·mysql·adb
苏格拉真没有底7 天前
通过 IPv6 进行远程 ADB 调试
adb
亿林网络数据9 天前
MySQL安全加固
mysql·安全·adb
zhimingwen9 天前
在Mac电脑上安装adb环境
macos·adb
zhongwangwang9 天前
MongoDB bin目录没有mongo.exe命令的解决办法
adb