tidevice can be used to communicate with iPhone device

Overview

tidevice

tidevice

PyPI PyPI - Downloads

English

该工具能够用于与iOS设备进行通信, 提供以下功能

  • 截图
  • 获取手机信息
  • ipa包的安装和卸载
  • 根据bundleID 启动和停止应用
  • 列出安装应用信息
  • 模拟Xcode运行XCTest,常用的如启动WebDriverAgent测试(此方法不依赖xcodebuild)
  • 获取指定应用性能(CPU,MEM,FPS)
  • 其他

支持运行在Mac,Linux,Windows上

安装

Python 3.7+

pip3 install -U tidevice

使用

查看版本号

$ tidevice version
0.1.0

列出连接设备

$ tidevice list
List of apple devices attached
00008030-001A35E40212345678 codeskyblue的iPhoneSE

$ tidevice list --json
[
    {
        "udid": "00008030-001A35E40212345678",
        "name": "codeskyblue的iPhoneSE"
    }
]

应用管理

# 安装应用
$ tidevice install example.ipa

# 指定设备安装
$ tidevice --udid $UDID install https://example.org/example.ipa

# 卸载应用
$ tidevice uninstall com.example.demo

# 启动应用
$ tidevice launch com.example.demo

# 停止应用
$ tidevice kill com.example.demo

# 查看已安装应用
$ tidevice applist

Run XCTest

请先确保手机上已经安装有WebDriverAgent应用

# 运行XCTEST
$ tidevice xctest -B com.facebook.wda.WebDriverAgent.Runner
[I 210127 11:40:23 _device:909] BundleID: com.facebook.wda.WebDriverAgent.Runner
[I 210127 11:40:23 _device:911] DeviceIdentifier: 12345678901234567890abcdefg
[I 210127 11:40:23 _device:773] SignIdentity: 'Apple Development: -Your-Developer-Name-'
[I 210127 11:40:23 _device:840] Launch 'com.facebook.wda.WebDriverAgent.Runner' pid: 239
[I 210127 11:40:23 _device:1003] ProductVersion: 12.4
[I 210127 11:40:24 _device:952] Start execute test plan with IDE version: 29
[I 210127 11:40:24 _device:875] WebDriverAgent start successfully

# 修改监听端口为8200
$ tidevice xctest -B com.facebook.wda.WebDriverAgent.Runner -e USB_PORT:8200

Relay

# 转发请求到手机,类似于iproxy
$ tidevice relay 8100 8100

# 转发并把传输的内容用hexdump的方法print出来
$ tidevice relay -x 8100 8100

运行WebDriverAgent

wdaproxy这个命令会同时调用xctest和relay,另外当wda退出时,会自动重新启动xctest

# 运行 XCTest 并在PC上监听8200端口转发到手机8100服务
$ tidevice wdaproxy -B com.facebook.wda.WebDriverAgent.Runner --port 8200
...logs...

启动后你就可以使用Appium 或者 facebook-wda 来运行iOS自动化了

facebook-wda example code

import wda
c = wda.Client("http://localhost:8200")
print(c.info)

挂载开发者镜像

这个步骤其实不太需要,因为如果tidevice的命令需要开发者镜像的时候,会自动去挂载的

# 先在本地路径查找 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
# 如果没有会去网站 https://github.com/iGhibli/iOS-DeviceSupport 下载,下载到路径 ~/.tidevice/device-support/
$ tidevice developer
[I 210127 11:37:52 _device:518] ProductVersion: 12.4
[I 210127 11:37:52 _imagemounter:81] Pushing DeveloperDiskImage.dmg
[I 210127 11:37:52 _imagemounter:94] Push complete
[I 210127 11:37:53 _device:589] DeveloperImage mounted successfully

其他常用

# 重启
$ tidevice reboot

# 截图
$ tidevice screenshot screenshot.jpg

# 性能采集 (TODO)
# $ tidevice perf -o fps,mem,cpu -B com.example.demo

# 输出日志 same as idevicesyslog
$ tidevice syslog

DEVELOP

See DEVELOP

Thanks

LICENSE

MIT

Comments
  • 求解connect to device error: UsbmuxReplyCode.ConnectionRefused

    求解connect to device error: UsbmuxReplyCode.ConnectionRefused

    wda装好了,连mac 执行iproxy 8100 8100 访问http://localhost:8100/status可以看到手机信息

    但是连windosw,执行tidevice xctest -B com.facebook.wda.WebDriverAgent.Runner -e USB_PORT:8200 提示WebDriverAgent start successfully,然后执行tidevice relay 8100 8100,访问http://localhost:8100/status 报错 handle stream from: ('::1', 59494, 0, 0) connect to device error: UsbmuxReplyCode.ConnectionRefused 请问怎么解呀

    opened by mp55 28
  • iOS15系统,启动wda时,报错

    iOS15系统,启动wda时,报错

    MacBook-Pro:~ $ tidevice xctest -B com.facebook.WebDriverAgentRunner.xctrunner
    [I 211027 10:32:48 _device:996] BundleID: com.facebook.WebDriverAgentRunner.xctrunner
    [I 211027 10:32:48 _device:998] DeviceIdentifier: 9941e2ce2018cd02c295b0108ee30b0c6e64b7f8
    [I 211027 10:32:48 _device:572] ProductVersion: 15.0
    [I 211027 10:32:48 _device:551] Download https://tool.appetizer.io/iGhibli/iOS-DeviceSupport/raw/master/DeviceSupport/15.0.zip -> /Users/hhh/.tidevice/device-support/15.0.zip
    [I 211027 10:32:49 _device:551] Download https://github.com/iGhibli/iOS-DeviceSupport/raw/master/DeviceSupport/15.0.zip -> /Users/hhh/.tidevice/device-support/15.0.zip
    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tidevice/_device.py", line 454, in start_service
        return self._unsafe_start_service(name)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tidevice/_device.py", line 471, in _unsafe_start_service
        "Remember that you have to mount the Developer disk image on your device"
    tidevice.exceptions.MuxServiceError: Could not start service: com.apple.testmanagerd.lockdown.secure! Remember that you have to mount the Developer disk image on your device
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tidevice/_device.py", line 607, in _request_developer_image_dir
        self._urlretrieve(mirror_url, image_zip_path)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tidevice/_device.py", line 556, in _urlretrieve
        r.raise_for_status()
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/models.py", line 941, in raise_for_status
        raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://tool.appetizer.io/iGhibli/iOS-DeviceSupport/raw/master/DeviceSupport/15.0.zip
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.7/bin/tidevice", line 8, in <module>
        sys.exit(main())
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tidevice/__main__.py", line 689, in main
        actions[args.subparser](args)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tidevice/__main__.py", line 231, in cmd_xctest
        env=env)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tidevice/_device.py", line 1008, in xctest
        x1 = self._connect_testmanagerd_lockdown()
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tidevice/_device.py", line 805, in _connect_testmanagerd_lockdown
        LockdownService.TestmanagerdLockdownSecure)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tidevice/_device.py", line 456, in start_service
        self.mount_developer_image()
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tidevice/_device.py", line 648, in mount_developer_image
        with self._request_developer_image_dir() as _dir: #, signature_path:
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 112, in __enter__
        return next(self.gen)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tidevice/_device.py", line 611, in _request_developer_image_dir
        self._urlretrieve(origin_url, image_zip_path)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tidevice/_device.py", line 556, in _urlretrieve
        r.raise_for_status()
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/models.py", line 941, in raise_for_status
        raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://github.com/iGhibli/iOS-DeviceSupport/raw/master/DeviceSupport/15.0.zip
    

    看提示好像是镜像链接的问题

    opened by lycfr 9
  • tidevice.exceptions.MuxReplyError: UsbmuxReplyCode.ConnectionRefused

    tidevice.exceptions.MuxReplyError: UsbmuxReplyCode.ConnectionRefused

    完整的报错如下,我和之前哪位老友一样,也是用着用着就这样了,啥都没干..就是突然怎么启动都启动不了服务了,到处没找到答案 希望能够解答一下 Traceback (most recent call last): File "d:\users\y7000\anaconda3\lib\runpy.py", line 194, in run_module_as_main return run_code(code, main_globals, None, File "d:\users\y7000\anaconda3\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "d:\Users\y7000\anaconda3\Scripts\tidevice.exe_main.py", line 7, in File "d:\users\y7000\anaconda3\lib\site-packages\tidevice_main.py", line 742, in main actionsargs.subparser File "d:\users\y7000\anaconda3\lib\site-packages\tidevice_main.py", line 237, in cmd_xctest d.xctest(args.bundle_id, File "d:\users\y7000\anaconda3\lib\site-packages\tidevice_device.py", line 973, in xctest x1 = self._connect_testmanagerd_lockdown() File "d:\users\y7000\anaconda3\lib\site-packages\tidevice_device.py", line 769, in _connect_testmanagerd_lockdown conn = self.start_service(LockdownService.TestmanagerdLockdown) File "d:\users\y7000\anaconda3\lib\site-packages\tidevice_device.py", line 447, in start_service return self._unsafe_start_service(name) File "d:\users\y7000\anaconda3\lib\site-packages\tidevice_device.py", line 476, in _unsafe_start_service conn = self.create_inner_connection(data['Port'], _ssl=_ssl) File "d:\users\y7000\anaconda3\lib\site-packages\tidevice_device.py", line 287, in create_inner_connection self._usbmux._check(data) File "d:\users\y7000\anaconda3\lib\site-packages\tidevice_usbmux.py", line 94, in _check raise MuxReplyError(data['Number']) tidevice.exceptions.MuxReplyError: UsbmuxReplyCode.ConnectionRefused

    opened by luxiaolan6373 9
  • tidevice.exceptions.MuxError: socket unix:/var/run/usbmuxd unable to connect

    tidevice.exceptions.MuxError: socket unix:/var/run/usbmuxd unable to connect

    在 Ubuntu 上执行 tidevice list 会报异常

    系统:5.4.0-60-generic #67~18.04.1-Ubuntu 具体日志: List of apple devices attached Traceback (most recent call last): File "/root/.pyenv/versions/3.8.0/bin/tidevice", line 10, in sys.exit(main()) File "/root/.pyenv/versions/3.8.0/lib/python3.8/site-packages/tidevice/main.py", line 407, in main actionsargs.subparser File "/root/.pyenv/versions/3.8.0/lib/python3.8/site-packages/tidevice/main.py", line 81, in cmd_list for dinfo in um.device_list(): File "/root/.pyenv/versions/3.8.0/lib/python3.8/site-packages/tidevice/_usbmux.py", line 72, in device_list data = self.send_recv(payload) File "/root/.pyenv/versions/3.8.0/lib/python3.8/site-packages/tidevice/_usbmux.py", line 45, in send_recv with self.create_connection() as s: File "/root/.pyenv/versions/3.8.0/lib/python3.8/site-packages/tidevice/_usbmux.py", line 42, in create_connection return PlistSocket(self.__address, self._next_tag()) File "/root/.pyenv/versions/3.8.0/lib/python3.8/site-packages/tidevice/_safe_socket.py", line 89, in init super().init(addr) File "/root/.pyenv/versions/3.8.0/lib/python3.8/site-packages/tidevice/_safe_socket.py", line 44, in init raise MuxError("socket unix:{} unable to connect".format(addr)) tidevice.exceptions.MuxError: socket unix:/var/run/usbmuxd unable to connect

    help wanted 
    opened by li8911255 9
  • 执行xctest报错超时退出

    执行xctest报错超时退出

    环境:Windows 10 设备:iPhone 12(15.4) Python版本:3.9.1 tidevice版本:0.7.6 执行命令:tidevice xctest -B com.xxx.xctrunner 报错内容

    C:\Users\user>tidevice xctest -B com.xxx.xctrunner
    [I 220412 10:54:58 _device:977] ProductVersion: 15.4
    [I 220412 10:54:58 _device:824] CFBundleExecutable: FastbotRunner-Runner
    [I 220412 10:54:59 _device:855] AppContainer: /private/var/mobile/Containers/Data/Application/EDB662B5-A0FF-40CF-8156-6C14B9F66D2F
    [I 220412 10:54:59 _device:895] Launch 'com.xxx.xctrunner' pid: 45661
    [I 220412 10:54:59 _device:1028] Test runner ready detected
    [I 220412 10:54:59 _device:1020] Start execute test plan with IDE version: 29
    [E 220412 10:56:59 _instruments:573] drain error
        Traceback (most recent call last):
          File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\tidevice\_instruments.py", line 563, in _drain
            self._drain_single_message()
          File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\tidevice\_instruments.py", line 586, in _drain_single_message
            mheader, payload = self.recv_dtx_message()
          File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\tidevice\_instruments.py", line 480, in recv_dtx_message
            data = self.psock.recvall(0x20)
          File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\tidevice\_safe_socket.py", line 88, in recvall
            chunk = self._sock.recv(size - len(buf))
          File "c:\users\user\appdata\local\programs\python\python39\lib\ssl.py", line 1226, in recv
            return self.read(buflen)
          File "c:\users\user\appdata\local\programs\python\python39\lib\ssl.py", line 1101, in read
            return self._sslobj.read(len)
        socket.timeout: The read operation timed out
    [I 220412 10:56:59 _device:1100] xctrunner quited
    

    补充内容:

    [D 220412 11:17:18 _instruments:597] DTXMessage: expects_reply:1 flags:2 ('_XCT_logDebugMessage:', ['11:17:17.925 FastbotRunner-Runner[381:9484] Returning result XCTWaiterResultCompleted for waiter <XCTWaiter: 0x281a290a0, state: XCTWaiterStateFinished>\n'])
    [E 220412 11:17:18 _instruments:573] drain error
        Traceback (most recent call last):
          File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\tidevice\_instruments.py", line 563, in _drain
            self._drain_single_message()
          File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\tidevice\_instruments.py", line 586, in _drain_single_message
            mheader, payload = self.recv_dtx_message()
          File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\tidevice\_instruments.py", line 480, in recv_dtx_message
            data = self.psock.recvall(0x20)
          File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\tidevice\_safe_socket.py", line 88, in recvall
            chunk = self._sock.recv(size - len(buf))
          File "c:\users\user\appdata\local\programs\python\python39\lib\ssl.py", line 1226, in recv
            return self.read(buflen)
          File "c:\users\user\appdata\local\programs\python\python39\lib\ssl.py", line 1101, in read
            return self._sslobj.read(len)
        socket.timeout: The read operation timed out
    [D 220412 11:17:18 _instruments:575] dtxm socket closed
    [I 220412 11:17:18 _device:1100] xctrunner quited
    
    opened by jongyu 8
  • pip install tidevice and prompts

    pip install tidevice and prompts "command not found: tidevice"

    Hello, after the installation, view the version "tidevice version" prompts "command not found: tidevice", is there something wrong with the configuration? Thanks very much!

    opened by cssshuang 8
  • wda重签名后运行tidevice xctest 报错 socket connection broken

    wda重签名后运行tidevice xctest 报错 socket connection broken

    python3.6&3.8 mac 10.15.5 log:

    [I 210201 21:10:10 _device:912] BundleID: com.xxxxxxxxxx.WebDriverAgentRunner-Runner
    [I 210201 21:10:10 _device:914] DeviceIdentifier: 00008030-xxxxxxxxxxxxE
    [I 210201 21:10:10 _device:775] SignIdentity: 'iPhone Distribution: xxxxxxxxx Co., Ltd.'
    Traceback (most recent call last):
      File "/Users/xx/.pyenv/versions/uiauto8/bin/tidevice", line 8, in <module>
        sys.exit(main())
      File "/Users/xx/.pyenv/versions/3.8.6/envs/uiauto8/lib/python3.8/site-packages/tidevice/__main__.py", line 429, in main
        actions[args.subparser](args)
      File "/Users/xx/.pyenv/versions/3.8.6/envs/uiauto8/lib/python3.8/site-packages/tidevice/__main__.py", line 209, in cmd_xctest
        d.xctest(args.bundle_id, logger=setup_logger(level=logging.INFO), env=env)
      File "/Users/xx/.pyenv/versions/3.8.6/envs/uiauto8/lib/python3.8/site-packages/tidevice/_device.py", line 985, in xctest
        pid = self._launch_wda(bundle_id, session_identifier, env=env, logger=logger)
      File "/Users/xx/.pyenv/versions/3.8.6/envs/uiauto8/lib/python3.8/site-packages/tidevice/_device.py", line 786, in _launch_wda
        for fname in fsync.listdir("/tmp"):
      File "/Users/xx/.pyenv/versions/3.8.6/envs/uiauto8/lib/python3.8/site-packages/tidevice/_sync.py", line 106, in listdir
        pkg = self._recv()
      File "/Users/xx/.pyenv/versions/3.8.6/envs/uiauto8/lib/python3.8/site-packages/tidevice/_sync.py", line 77, in _recv
        buf = buf + self.recvall(FHeader.size - len(buf))
      File "/Users/xx/.pyenv/versions/3.8.6/envs/uiauto8/lib/python3.8/site-packages/tidevice/_safe_socket.py", line 55, in recvall
        raise MuxError("socket connection broken")
    tidevice.exceptions.MuxError: socket connection broken
    
    opened by carrypink 8
  • 多设备使用relay代理给Appium跑自动化会出现xctrunner quited

    多设备使用relay代理给Appium跑自动化会出现xctrunner quited

    报错信息

    Exception in thread Thread-2:
    Traceback (most recent call last):
      File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    [W 210203 13:54:59 _device:1042] xctrunner quited
    

    启动代理的代码tidevice -u ${udid} relay ${extendPort} 8100 有在Appium中有设置webDriverAgentUrl

    opened by jongyu 7
  • 找不到iOS14.4.zip文件

    找不到iOS14.4.zip文件

    requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://tool.appetizer.io/iGhibli/iOS-DeviceSupport/raw/master/DeviceSupport/14.4.zip requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://github.com/iGhibli/iOS-DeviceSupport/raw/master/DeviceSupport/14.4.zip 自动webdriverrunner时报找不到文件,下载地址里面没有对应文件,但是里面的iOS14文件名包含其他的内容,我感觉你们时没有测iOS14的设备? https://tool.appetizer.io/iGhibli/iOS-DeviceSupport/tree/master/DeviceSupport

    opened by jongyu 7
  • IOS14.0以上手机使用tidevice fsync 查看应用数据目录报错:tidevice.exceptions.MuxError: socket connection broken

    IOS14.0以上手机使用tidevice fsync 查看应用数据目录报错:tidevice.exceptions.MuxError: socket connection broken

    cmd中运行命令:python37 -m tidevice fsync ls /Documents/PayLoad -B com.ksg.tako python版本:3.7.9 tidevice版本:0.4.8 ios版本: 14.0 报错堆栈如下: Traceback (most recent call last): File "E:\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "E:\Python\Python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "E:\Python\Python37\lib\site-packages\tidevice\__main__.py", line 694, in <module> main() File "E:\Python\Python37\lib\site-packages\tidevice\__main__.py", line 689, in main actions[args.subparser](args) File "E:\Python\Python37\lib\site-packages\tidevice\__main__.py", line 384, in cmd_fsync pprint(sync.listdir(arg0)) File "E:\Python\Python37\lib\site-packages\tidevice\_sync.py", line 106, in listdir pkg = self._recv() File "E:\Python\Python37\lib\site-packages\tidevice\_sync.py", line 75, in _recv self.recvall(plist_size) # Discard plist xml-content File "E:\Python\Python37\lib\site-packages\tidevice\_safe_socket.py", line 61, in recvall raise MuxError("socket connection broken") tidevice.exceptions.MuxError: socket connection broken

    opened by byteslrl 6
  • 运行tidevice list报错

    运行tidevice list报错

    Microsoft Windows [版本 10.0.19041.928] (c) Microsoft Corporation。保留所有权利。

    C:\Users\D1M>tidevice list List of apple devices attached Traceback (most recent call last): File "d:\python\lib\runpy.py", line 198, in run_module_as_main "main", mod_spec) File "d:\python\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "D:\python\Scripts\tidevice.exe_main.py", line 7, in File "d:\python\lib\site-packages\tidevice_main.py", line 687, in main actionsargs.subparser File "d:\python\lib\site-packages\tidevice_main_.py", line 82, in cmd_list for dinfo in um.device_list(): File "d:\python\lib\site-packages\tidevice_usbmux.py", line 75, in device_list data = self.send_recv(payload) File "d:\python\lib\site-packages\tidevice_usbmux.py", line 46, in send_recv with self.create_connection() as s: File "d:\python\lib\site-packages\tidevice_usbmux.py", line 43, in create_connection return PlistSocket(self.__address, self._next_tag()) File "d:\python\lib\site-packages\tidevice_safe_socket.py", line 95, in init super().init(addr) File "d:\python\lib\site-packages\tidevice_safe_socket.py", line 48, in init self._sock.connect(addr) ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

    opened by a805791737 6
  • iOS 15.7、iOS 16 及以上版本无法使用部分命令 报错InvalidService 、ImageMountFailed

    iOS 15.7、iOS 16 及以上版本无法使用部分命令 报错InvalidService 、ImageMountFailed

    caiyun@caiyundeMac-mini ~ % tidevice screenshot screenshot.jpg Screenshot saved to screenshot.jpg [I 221227 17:01:28 _device:602] ProductVersion: 16.0.3 [I 221227 17:01:28 _imagemounter:157] Pushing DeveloperDiskImage.dmg [I 221227 17:01:28 _imagemounter:170] Push complete Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tidevice/_device.py", line 484, in start_service return self._unsafe_start_service(name) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tidevice/_device.py", line 503, in _unsafe_start_service raise MuxServiceError(error) tidevice.exceptions.MuxServiceError: InvalidService

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/bin/tidevice", line 8, in sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tidevice/main.py", line 965, in main actionsargs.subparser File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tidevice/main.py", line 274, in cmd_screenshot d.screenshot().convert("RGB").save(filename) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tidevice/_device.py", line 528, in screenshot return next(self.iter_screenshot()) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tidevice/_device.py", line 533, in iter_screenshot conn = self.start_service(LockdownService.MobileScreenshotr) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tidevice/_device.py", line 486, in start_service self.mount_developer_image() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tidevice/_device.py", line 663, in mount_developer_image self.imagemounter.mount(image_path, signature_path) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tidevice/_imagemounter.py", line 139, in mount return self.mount_fileobj(image_reader, image_size, signature_content) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tidevice/_imagemounter.py", line 182, in mount_fileobj self._check_error(ret) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tidevice/_imagemounter.py", line 123, in _check_error raise MuxError(ret['Error']) tidevice.exceptions.MuxError: ImageMountFailed

    help wanted 
    opened by Vantermonde 1
  • 【0.9.12】 执行 tidevice ps 指令报错

    【0.9.12】 执行 tidevice ps 指令报错

    我们希望App一直处于启动状态,所以定时在检查App的运行状态tidevice ps。 每天都会出现批量报错。报错信息统计看基本每个设备每天都会出现2次报错。 怀疑过是设备连接过多造成的,之前链接18台设备,后来改到7台设备。但是还是会出现。

    报错信息1 运行中app,指令执行出现异常内容:Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/bin/tidevice", line 8, in sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/main.py", line 742, in main actionsargs.subparser File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/main.py", line 452, in cmd_ps ps = list(d.instruments.app_process_list(app_infos)) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 708, in app_process_list processes = self.app_running_processes() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 681, in app_running_processes retobj = self.call_message(identifier, "runningProcesses") File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 354, in call_message channel = self.make_channel(channel) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 315, in make_channel result = self.call_message(0, '_requestChannelWithCode:identifier:', aux) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 356, in call_message _id = self.send_dtx_message(channel, File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 392, in send_dtx_message self.sendall(data) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_safe_socket.py", line 66, in sendall return self._sock.sendall(data) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 1204, in sendall v = self.send(byte_view[count:]) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 1173, in send return self._sslobj.write(data)ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:2485)

    报错信息2 运行中app,指令执行出现异常内容:[E 221206 14:44:41 _instruments:594] drain error Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 580, in _drain self._drain_single_message() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 607, in _drain_single_message mheader, payload = self.recv_dtx_message() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 513, in recv_dtx_message message_id = self.recv_part_dtx_message() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 409, in recv_part_dtx_message data = self.psock.recvall(0x20) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_safe_socket.py", line 115, in recvall raise ConnectionError("socket connection broken") ConnectionError: socket connection brokenTraceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/bin/tidevice", line 8, in sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/main.py", line 965, in main actionsargs.subparser File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/main.py", line 582, in cmd_ps ps = list(ts.app_process_list(app_infos)) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 737, in app_process_list processes = self.app_running_processes() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 708, in app_running_processes retobj = self.call_message(identifier, "runningProcesses") File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 357, in call_message channel = self.make_channel(channel) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 318, in make_channel result = self.call_message(0, '_requestChannelWithCode:identifier:', aux) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 363, in call_message return self.wait_reply(_id).result File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tidevice/_instruments.py", line 568, in wait_reply raise ConnectionError("connection closed")ConnectionError: connection closed

    opened by wwwwsy 1
  • 实现类似adbkit的能力

    实现类似adbkit的能力

    目前iPhone设备比较昂贵,如果公司出现多个办公点,以目前的情况来说,则需要购买多个设备来进行开发和测试。是否可以在iPhone和Pc间加上一个代理服务,使得iPhone设备可以远程被用于xcode调试。

    目前我了解到可以模拟lockdown来进行模拟iPhone设备链接usbmuxd,如果我在这个模拟的lockdown提供服务,允许客户端链接这个代理服务,是否就可以完成代理能力实现跨物理设备连接和使用iPhone设备

    opened by zhangpeibisha 1
  • tidevice 启动 wda 失败

    tidevice 启动 wda 失败

    报错日志如下:

    [I 221107 19:40:17 init:245] WDA is not running, exec: /Library/Frameworks/Python.framework/Versions/3.10/bin/tidevice xctest [I 221107 19:40:18 _device:966] BundleID: com.facebook.WebDriverAgentRunner.xctrunner.xctrunner [I 221107 19:40:18 _device:982] ProductVersion: 15.7.1 [I 221107 19:40:18 _device:983] DeviceIdentifier: 00008110-001645A63698401E [I 221107 19:40:18 _device:819] SignIdentity: 'Apple Development: Chenxi Li (V6N3HHBYZS)' [I 221107 19:40:18 _device:825] CFBundleExecutable: WebDriverAgentRunner-Runner [I 221107 19:40:18 _device:856] AppContainer: /private/var/mobile/Containers/Data/Application/A9314134-F89A-4AEE-AC60-4E8E4F8C7508 [I 221107 19:40:18 _device:896] Launch 'com.facebook.WebDriverAgentRunner.xctrunner.xctrunner' pid: 53700 [I 221107 19:40:18 _device:1032] Test runner ready detected [I 221107 19:40:18 _device:1024] Start execute test plan with IDE version: 29 [E 221107 19:40:18 _instruments:594] drain error Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tidevice/_instruments.py", line 580, in _drain self._drain_single_message() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tidevice/_instruments.py", line 607, in _drain_single_message mheader, payload = self.recv_dtx_message() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tidevice/_instruments.py", line 513, in recv_dtx_message message_id = self.recv_part_dtx_message() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tidevice/_instruments.py", line 409, in recv_part_dtx_message data = self.psock.recvall(0x20) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tidevice/_safe_socket.py", line 113, in recvall raise ConnectionError("socket connection broken") ConnectionError: socket connection broken [I 221107 19:40:18 _device:1104] xctrunner quited [W 221107 19:40:18 _device:923] WebDriverAgentRunner quitted [W 221107 19:40:20 init:255] xctest launch failed

    想问一下编译 wda 对 MacOS 和 XCode 版本有要求吗? 手机ios 版本:15.7 MacOS:12.6 XCode:13.2

    p.s. 顺便问一下,之前git工程里那个打包好的ipa文件删掉了吗?

    opened by bqwwdsh 1
  • 能更新一个iPhone14系统及iPhoneSE3的MODELS信息吗

    能更新一个iPhone14系统及iPhoneSE3的MODELS信息吗

    "iPhone14,6": "iPhone SE3",
    "iPhone14,7": "iPhone 14",
    "iPhone14,8": "iPhone 14 Plus",
    "iPhone15,2": "iPhone 14 Pro",
    "iPhone15,3": "iPhone 14 Pro Max",
    
    opened by lycfr 0
Releases(0.3.1)
Owner
Alibaba
Alibaba Open Source
Alibaba
Originally used during Marketplace.tf's open period, this program was used to get the profit of items bought with keys and sold for dollars.

Originally used during Marketplace.tf's open period, this program was used to get the profit of items bought with keys and sold for dollars. Practically useless for me now, but can be used as an example of tkinter.

BoggoTV 1 Dec 11, 2021
Simple utlity for sniffing decrypted HTTP/HTTPS traffic on a jailbroken iOS device into an HAR format.

Description iOS devices contain a hidden feature for sniffing decrypted HTTP/HTTPS traffic from all processes using the CFNetwork framework into an HA

null 83 Dec 25, 2022
AndroidEnv is a Python library that exposes an Android device as a Reinforcement Learning (RL) environment.

AndroidEnv is a Python library that exposes an Android device as a Reinforcement Learning (RL) environment.

DeepMind 814 Dec 26, 2022
An AI-powered device to stop people from stealing my packages.

Package Theft Prevention Device An AI-powered device to stop people from stealing my packages. Installation To install on a raspberry pi, clone the re

rydercalmdown 157 Nov 24, 2022
Easily map device and application controls to a midi controller

pymidicontroller Introduction Easily map device and application controls to a midi controller

Tane Barriball 24 May 16, 2022
Simple Python-based web application to allow UGM students to fill their QR presence list without having another device in hand.

Praesentia Praesentia is a simple Python-based web application to allow UGM students to fill their QR presence list without having another device in h

loncat 20 Sep 29, 2022
This application demonstrates IoTVAS device discovery and security assessment API integration with the Rapid7 InsightVM.

Introduction This repository hosts a sample application that demonstrates integrating Firmalyzer's IoTVAS API with the Rapid7 InsightVM platform. This

Firmalyzer BV 4 Nov 9, 2022
Script for resizing MTD partitions on a QNAP device in order to be available to upgrade from buster to bullseye

QNAP partitions resize for kirkwood devices. As explained by Marin Michlmayr, Debian bullseye support on kirkwood QNAP devices was dropped due to [mai

Arnaud Mouiche 26 Jan 5, 2023
CDM Device Checker for python

CDM Device Checker for python

zackmark29 79 Dec 14, 2022
Easy installer for running Amazon AVS Device SDK on Raspberry Pi

avs-device-sdk-pi Scripts to enable Alexa voice activation using Picovoice Porcupine If you like the work, find it useful and if you would like to get

null 4 Nov 14, 2022
Turn a raspberry pi into a Bluetooth Midi device

PiBluetoothMidSetup This will change serveral system wide packages/configurations Do not run this on your primary machine or anything you don't know h

MyLab6 40 Sep 19, 2022
A web UI for managing your 351ELEC device ROMs.

351ELEC WebUI A web UI for managing your 351ELEC device ROMs. Requirements Python 3 or Python 2.7 are required. If the ftfy package is installed, it w

Ben Phelps 5 Sep 26, 2022
Plugin to manage site, circuit and device diagrams and documents in Netbox

Netbox Documents Plugin A plugin designed to faciliate the storage of site, circuit and device specific documents within NetBox Note: Netbox v3.2+ is

Jason Yates 38 Dec 24, 2022
Ikaros is a free financial library built in pure python that can be used to get information for single stocks, generate signals and build prortfolios

Ikaros is a free financial library built in pure python that can be used to get information for single stocks, generate signals and build prortfolios

Salma Saidane 64 Sep 28, 2022
Information about a signed UEFI Shell that can be used when Secure Boot is enabled.

SignedUEFIShell During our research of the BootHole vulnerability last year, we tried to find as many signed bootloaders as we could. We searched all

Mickey 61 Jan 3, 2023
vFuzzer is a tool developed for fuzzing buffer overflows, For now, It can be used for fuzzing plain vanilla stack based buffer overflows

vFuzzer vFuzzer is a tool developed for fuzzing buffer overflows, For now, It can be used for fuzzing plain vanilla stack based buffer overflows, The

Vedant Bhalgama 5 Nov 12, 2022
Identifies the faulty wafer before it can be used for the fabrication of integrated circuits and, in photovoltaics, to manufacture solar cells.

Identifies the faulty wafer before it can be used for the fabrication of integrated circuits and, in photovoltaics, to manufacture solar cells. The project retrains itself after every prediction, making it more robust and generalized over time.

Arun Singh Babal 2 Jul 1, 2022
This repo will have a small amount of Chrome tools that can be used for DFIR, Hacking, Deception, whatever your heart desires.

Chrome-Tools Overview Welcome to the repo. This repo will have a small amount of Chrome tools that can be used for DFIR, Hacking, Deception, whatever

null 5 Jun 8, 2022
Frappe app for authentication, can be used with FrappeVue-AdminLTE

Frappeauth App Frappe app for authentication, can be used with FrappeVue-AdminLTE

Anthony C. Emmanuel 9 Apr 13, 2022