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)

相关推荐
fengye20716119 小时前
板凳-------Mysql cookbook学习 (十)
学习·mysql·adb
进击的CJR1 天前
MySQL 8.0 OCP 英文题库解析(十)
mysql·adb·开闭原则
VirusVIP2 天前
解决:如何在Windows adb使用dmesg | grep检查内核日志
linux·adb
睡觉待开机2 天前
4. 数据类型
android·adb
进击的CJR2 天前
MySQL 8.0 OCP 英文题库解析(十一)
mysql·adb·开闭原则
___波子 Pro Max.3 天前
ADB推送文件到指定路径解析
adb
湿物男4 天前
mysql核心知识点
数据库·mysql·adb
fengye2071615 天前
板凳-------Mysql cookbook学习 (九--2)
学习·mysql·adb
快去睡觉~6 天前
MySQL之数据库的内嵌函数和联合查询
数据库·mysql·adb
find_element_by_id6 天前
adb 常用命令笔记
笔记·adb