当前位置: 首页 > news >正文

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

项目地址: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.lryc.cn/news/460164.html

相关文章:

  • python 爬虫模拟登录
  • AOP基础、快速入门、进阶
  • 哪款宠物空净运行吸毛好、噪音小?希喂、霍尼韦尔、安德迈测评!
  • 新兴的安全职业挑战
  • 代码随想录算法训练营Day32 | 122.买卖股票的最佳时机Ⅱ、55.跳跃游戏、45.跳跃游戏Ⅱ、1005.K次取反后最大化的数组和
  • 3D Slicer 教程一
  • github pages + hugo 搭建静态博客网站
  • Python爬虫如何爬取并解析JSON数据
  • 【C++】精妙的哈希算法
  • 智慧链动青春:国家区块链中心接待北京市十一学校青少年访学探索
  • 利用C++封装鼠标轨迹算法为DLL:游戏行为检测的利器
  • Qt- QSS风格选择器常用属性选择器样式表盒子
  • 粤智助自助一体机大厂浮出水面 OBOO鸥柏已成服务终端中坚力量
  • SpringBoot-application.properties配置
  • STM32-ADC模数转换
  • lspci | grep VGA
  • 智慧厂区车辆导航解决方案;智慧工厂电子地图应用解决方案;大型工厂内部导航解决方案;智慧工厂可视化地图应用方案
  • 决策树C4.5算法详解及实现
  • prompt learning
  • 适用于 Windows 11 的 5 大数据恢复软件 [免费和付费]
  • vue实现获取当前时间并实时显示
  • 【论文阅读】SRCNN
  • 数据结构与算法——Java实现 32.堆
  • 深度学习 .dot()
  • idea2024 git merge 时丢失 Merge remote-tracking branch问题
  • pdf怎么删除多余不想要的页面?删除pdf多余页面的多个方法
  • 树莓派应用--AI项目实战篇来啦-3.OpenCV 读取写入和显示图像
  • 一句话就把HTTPS工作原理讲明白了
  • CPU 和处理核心(Core)中间有3个缓存
  • 前后分离项目记录