pymobiledevice3使用介绍(安装、常用命令、访问iOS沙盒目录)

news/2024/10/19 16:18:20/

项目地址:https://github.com/doronz88/pymobiledevice3

首先先介绍一下pymobiledevice3,

pymobiledevice3是用Python3 实现的,用于处理 iDevices(iPhone 等)。它可以跨平台使用,支持:windows、Linux、macOS。

【安装】

git clone git@github.com:doronz88/pymobiledevice3.git
cd pymobiledevice3
python3 -m pip install -U -e .

【常用命令】

pymobiledevice3提供的命令如下:

1、查看iOS设备的udid:pymobiledevice3 usbmux list

这个命令类似于idb的 idb list-targets和libimobiledevice的 idevice_id -l:

2、查看app的bundle id,通过输入命令:

pymobiledevice3 apps list --udid f89d929e8c45a81c0fe2d2xxxxxxxxxxxxxxxxxxxf

可以查看手机安装app的info.plist中的部分信息,如:

这个命令类似于idb的 list-apps,

idb list-apps --udid f89d929e8c45a81c0fe2d2xxxxxxxxxxxxxxxxf

类似于libimobiledevice的ideviceinstaller -u f89d929e8c45a81c0fe2d2xxxxxxxxxxxxxxxf -l

3、安装应用:

pymobiledevice3 apps install /Users/testmanzhang/Downloads/axxx_app_ios_internal_global_debug_3.x.x.xxxx.ipa

这个命令类似于idb的install,

idb install /Users/testmanzhang/Downloads/axxx_app_ios_internal_global_debug_x.x.x.xxxx.ipa

类似于libimobiledevice的ideviceinstaller,

ideviceinstaller -i /Users/testmanzhang/Downloads/axxx_app_ios_internal_global_debug_x.x.x.xxxx.ipa

4、卸载应用:

pymobiledevice3 apps uninstall com.xxxxxxx.ios

类似于idb的uninstall,idb uninstall com.xxxxxx.ios

类似于libimobiledevice的ideviceinstaller,

ideviceinstaller -U com.xxxxxxx.ios

5、查看系统日志:

pymobiledevice3 syslog collect /Users/testmanzhang/Downloads/11111.logarchive

生成的日志文件到达948M后收集停止,在mac上使用console.app打开查看

这个命令类似于idb log、libimobiledevice的idevicesyslog

6、重启设备命令:pymobiledevice3 diagnostics restart

7、截图命令:pymobiledevice3 developer screenshot /Users/testmanzhang/Downloads/2222.png

8、访问应用的沙盒目录:pymobiledevice3 apps afc com.xxxxxxx.ios

启动的是xonsh-afc shell,它是在xonsh的基础上增加了afc,即Apple File Conduit。

进入shell后界面如下:

它提供的命令有:

例如,ls,显示的就是iOS对应应用ios.glazero.ios的沙盒目录:

例如,cd进入Documents/Logs目录,可以将目录下的文件拉取到本地:

pull xxxxxx_app_ios_20241014.log /Users/testmanzhang/Downloads

也可以使用cat和grep查看该日志文件

cat xxxxxx_app_ios_20241014.log | grep "addDpUpdateDelegate"


http://www.ppmy.cn/news/1540285.html

相关文章

javaWeb项目-Springboot+vue-XX图书馆管理系统功能介绍

本项目源码(点击下方链接下载):java-springbootvue阿博图书馆管理系统源码(项目源码-说明文档)资源-CSDN文库 项目关键技术 开发工具:IDEA 、Eclipse 编程语言: Java 数据库: MySQL5.7 框架:ssm、Springboot 前端&…

JAVA基础-包装类

文章目录 包装类1 概述2 Integer类2.1 Integer类构造方法2.2 Integer类成员方法 3 基本类型与字符串之间的转换3.1 基本类型转换为String3.2 String转换成基本类型 4 底层原理 第六章:算法小题练习一:练习二:练习三:练习四&#x…

day-69 构成整天的下标对数目 II

思路 根据题意,每个元素可以重复使用,所以只需统计对24取余后值值相同的个数,如当前数字对24取余后是3,那么只需知道取余后为21的元素个数即可知道当前元素可与,多少个元素构成整天的下标的数目 解题过程 从左往右遍历…

计算机网络——CDN

空间编码例子:不是发送N个相同颜色值,而是仅发送2个值,颜色和重复个数 时间编码例子:不是发送i1帧的全部编码,而是仅发送帧i差别的地方 视频播放时,先下载manifest file文件——>解析(不…

深度解析服务级别协议(SLA):保障业务稳定性的关键承诺

前言: 在当今数字化时代,企业的业务连续性和稳定性至关重要。服务级别协议(SLA)作为服务提供商与客户之间的正式承诺,是确保服务质量、可用性、责任的重要工具。SLA不仅定义了服务提供商应达到的服务指标,还…

【ShuQiHere】智慧城市(Smart City)全面指南:AI如何重塑城市生活 ️

【ShuQiHere】🌍🏙️ 目录 什么是智慧城市?(What is a Smart City?)智慧城市的关键组成部分(Key Components of a Smart City)智慧城市的基础设施(Smart City Infrastructure&…

css 如何根据子元素给他的父元素设置样式

<div class"parent"> <div :class"{ flag ? active : unactive }">子元素啊根据一个变量来加样式</div> </div> 这个时候如何根据子元素来给这个parent加样式呢&#xff1f; 其中能马上想到的就是&#xff1a;这个class的判断…

【Spring相关技术】spring进阶-自定义请求报文转对象HttpMessageConverter

文章目录 类继承体系核心类与接口说明底层调用链完整示例步骤 1: 创建自定义的HttpMessageConverter步骤 2: 配置Spring MVC使用自定义转换器步骤 3: 使用自定义转换器 相关文献 类继承体系 默认转换器即springmvc默认的转换器&#xff0c; 用的比较多的是以下两种&#xff0c;…