Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for listing running processes #575

Merged
merged 1 commit into from
Mar 6, 2023

Conversation

nisargjhaveri
Copy link

Add support --list_processes, which lists the running processes on the device, along with PIDs.
This PID can be useful to attaching an already running process. Related #525.

The ability to list processes is provided by the com.apple.instruments.remoteserver service. This service uses a different communication protocol. The details and the reference implementation is provided by troybowman/ios_instruments_client. I've also referred the implementations at FBInstrumentsClient.m in facebook/idb and remote_server.py at doronz88/pymobiledevice3.

Ability to talk to the instruments server can also bring more improvements for us in future.

  • Drastically improve speed for the --justlaunch argument by using the instruments server instead of launching via lldb and detaching.
  • Add a subcommand to kill a running process.

All of these improvements can help with a bunch of use-cases and eliminate the need to use other tools along with ios-deploy for common debugging or simple automations for installing/launching apps.

Currently tested on one device with iOS 15.6.1

@gabebear
Copy link

gabebear commented Mar 6, 2023

This is super interesting, it will likely need some time to get tested by various usecases before being cut into a main release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants