Comments (15)
@rahul-1485
Try to use USB to start sysmontap.py
if __name__ == '__main__':
rpc = InstrumentServer().init()
sysmontap(rpc)
rpc.stop()
from py-ios-device.
Thanks for the reply @YueChen-C after doing the changes you have suggested sudo python3 sysmontap.py is running now. I am facing one more issue the sudo python3 sysmontap.py command works for IOS 14.2 device but not for IOS 12 devices.
Error i am getting is -
apple@Apples-MBP-2 instrument_demo % sudo python3 sysmontap.py
2021-04-17 01:10:49,478 - lockdown.py[line:94] - WARNING: [Errno 1] Operation not permitted: '/var/db/lockdown/caf07925fafe65912231d022bcb889d9c38503d5.plist'
Traceback (most recent call last):
File "/Users/Rahul/Downloads/py-ios-device-main/demo/instrument_demo/sysmontap.py", line 52, in
rpc = InstrumentServer().init()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ios_device/servers/Instrument.py", line 14, in init
self.lockdown = lockdown if lockdown else LockdownClient(udid=udid)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ios_device/util/lockdown.py", line 61, in init
self.paired = self._pair()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ios_device/util/lockdown.py", line 79, in _pair
self._pair_full()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ios_device/util/lockdown.py", line 140, in _pair_full
'DevicePublicKey': plistlib.Data(device_public_key),
AttributeError: module 'plistlib' has no attribute 'Data'
Also i have tested sudo python3 applictionListing.py it is also not working working for IOS 12
Can you please suggest any other changes required for running commands on devices lower than IOS 14.
from py-ios-device.
Python3.9 plistlib removed plistlib.data.
I need some time to test
In addition, you can try using execute the command: sudo chmod 777 /var/ db/lockdown.
Use iTunes pair instead of private pair
from py-ios-device.
hi @YueChen-C the command sudo chmod 777 /var/ db/lockdown showing error - chmod: Unable to change file mode on /var/db/lockdown: Operation not permitted.
from py-ios-device.
@rahul-1485
This issue has been fixed on python 3.9.Try to pull the main branch test sysmontap.py
from py-ios-device.
Hi @YueChen-C i have tried the latest code but it is still not working for IOS devices less than 14.0 Version. Getting same error
apple@Apples-MBP-2 instrument_demo % sudo python3 sysmontap.py
2021-04-28 23:16:00,470 - lockdown.py[line:94] - WARNING: [Errno 1] Operation not permitted: '/var/db/lockdown/caf07925fafe65912231d022bcb889d9c38503d5.plist'
Traceback (most recent call last):
File "/Users/Rahul/Desktop/pCloud/py-ios-device/demo/instrument_demo/sysmontap.py", line 56, in
rpc = InstrumentServer().init()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ios_device/servers/Instrument.py", line 14, in init
self.lockdown = lockdown if lockdown else LockdownClient(udid=udid)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ios_device/util/lockdown.py", line 61, in init
self.paired = self._pair()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ios_device/util/lockdown.py", line 79, in _pair
self._pair_full()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ios_device/util/lockdown.py", line 140, in _pair_full
'DevicePublicKey': plistlib.Data(device_public_key),
AttributeError: module 'plistlib' has no attribute 'Data'
Please check.
from py-ios-device.
This error is unrelated to the iOS version, but rather the python version and was already fixed as @YueChen-C said. It seems you haven't pulled the latest version.
Python had a really wierd way to deprecate this API (no deprecation warnings on older versions then 3.9). Its now replaced simply with bytes
so the call to plistlib.Data
was just removed.
from py-ios-device.
hi @doronz88 i am currently on Python 3.9 version and the and taken the latest code it works fine for IOS 14 devices. But on devices lower than 14.0 the error is same for all Python scripts.
apple@Apples-MBP-2 instrument_demo % sudo python3.9 applictionListing.py
2021-04-29 01:19:05,492 - lockdown.py[line:94] - WARNING: [Errno 1] Operation not permitted: '/var/db/lockdown/caf07925fafe65912231d022bcb889d9c38503d5.plist'
Traceback (most recent call last):
File "/Users/Rahul/Downloads/py-ios-device-main/demo/instrument_demo/applictionListing.py", line 20, in
rpc = InstrumentServer().init()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ios_device/servers/Instrument.py", line 14, in init
self.lockdown = lockdown if lockdown else LockdownClient(udid=udid)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ios_device/util/lockdown.py", line 61, in init
self.paired = self._pair()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ios_device/util/lockdown.py", line 79, in _pair
self._pair_full()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ios_device/util/lockdown.py", line 140, in _pair_full
'DevicePublicKey': plistlib.Data(device_public_key),
AttributeError: module 'plistlib' has no attribute 'Data'
Also tried to change permission for lockdown folder it says "chmod: Unable to change file mode on /var/db/lockdown: Operation not permitted"
from py-ios-device.
Latest revision contains a different content on the error line from your backtrace so it seems you aren't on latest version. Try to install it as follows:
python3 -m pip install --user -U -e .
The -e
is for local installation so you don't need to pip install every time.
from py-ios-device.
hi @doronz88 i got below error with your command -
apple@Apples-MBP-2 ~ % python3 -m pip install --user -U -e
Usage:
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip install [options] [package-index-options] ...
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip install [options] -r [package-index-options] ...
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip install [options] [-e] ...
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip install [options] [-e] ...
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip install [options] <archive url/path> ...
-e option requires 1 argument
from py-ios-device.
You forgot the .
after the -e
flag.
from py-ios-device.
hi @doronz88 thanks for help it is working now i have one query when we run python3 applictionListing.py it shows app list and then when we run python3 sysmontap.py it shows the process and it's data. But how do we know the data belongs to particular app. Let suppose i want my know about data of safari app "python3 sysmontap.py" command shows listing but it not shows for which app data belongs too. Can you please suggest how to associate particular app process with data. Is there any parameter for it.
from py-ios-device.
You can trigger the selector named processIdentifierForBundleIdentifier:
for each given pid to have a pid/bundle/app-data relation. This selector is not implemented in this repo but can be easily done.
from py-ios-device.
Hi @doronz88 when we run "sudo python3 sysmontap.py" we get data of all the process is there any command to get data only for the particular process id. Let suppose if we want to see the data of a particular process only associated with an app.
from py-ios-device.
This script doesn't allow this. I've implemented this feature in my own tool:
https://github.com/doronz88/pymobiledevice3
You can run:
pymobiledevice3 developer sysmon processes -a pid=some_pid
You can filter on any field you desire.
from py-ios-device.
Related Issues (20)
- Get real-time cpu usage on iPhone 6 HOT 3
- 使用pyidevice instruments monitor 时,拿到的memory 数据是负数,free memory甚至越用越大。 HOT 1
- 请问从com.apple.instruments.server.services.sysmontap拿到得数据是否有统一处理方法 HOT 1
- python 3.10.3 安装 py_ios_device报错 HOT 4
- pyidevice instruments fps does not show fps above 60. HOT 1
- start_get_fps: code == 830472984 HOT 3
- iOS16(A16) GPU Counters error HOT 1
- iOS17设备支持问题 HOT 4
- 大佬,readme手册里的命令执行的参数有问题
- start_get_fps 您好我问一下,为什么我在 iPhone12 系统iOS14.5.1 拿到的FPS和游戏内出入比较大
- Cannot launch app on ios 16 HOT 5
- Get issue when execute command pyidevice crash list --udid HOT 1
- iOS17的屏幕帧数获取在windows上存在延迟。 HOT 2
- iOS 17 Device Not Supporting HOT 3
- requests.exceptions.HTTPError: 404 Client Error: Not Found for url HOT 1
- 通过perfdog 与 tidevice 获取到的游戏应用CPU使用都是10%左右,而通过instruments appmonitor 获取到的cpuUsge 60%
- 截图问题: windows 上的截图太慢 长达10s 请问怎么解决 HOT 2
- ios 17.4.1 无法获取性能数据 ,另一个低版本的ios 17.2.1 一切正常
- ios17 截图不太稳定 经常提示报错 HOT 5
- socket 连接好像不稳定
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-ios-device.