pymobiledevice3 icon indicating copy to clipboard operation
pymobiledevice3 copied to clipboard

Install a Application like xcrun devicectl is doing

Open sk2212 opened this issue 1 year ago • 5 comments

Hello!

First of all -> really nice work to make it work with iOS 17!

Maybe I have missed something but is there a command to install applications like xcrun is doing?

xcrun devicectl device install app --device 00008110-001XXXXXXXXXX ./MyApp.app

This gives a really nice output

? installationURL: file:///private/var/containers/Bundle/Application/99A23981-947A-4FF3-B282-5DE6D633F3BB/QMLTest.app/
? launchServicesIdentifier: unknown
? databaseUUID: 82F0A8CD-F632-490A-AECE-6DCF20401F73
? databaseSequenceNumber: 2028
? options:

which can be used for lldb to launch and get debug logs from the process (which cannot be done with ios-deploy) anymore.

sk2212 avatar Jan 22 '24 13:01 sk2212

You can install applications just as you would on iOS 16:

pymobiledevice3 apps install /path/to/ipa

Then you may debug it using LLDB assuming you have a trusted tunnel:

pymobiledevice3 developer debugserver start-server --tunnel '' # assuming you have tunneld running

You will then be printed with the required actions to connect with LLDB

doronz88 avatar Jan 22 '24 15:01 doronz88

Understood.

But I have no ipa file but only an archive. Of course a can create an ipa file from that but I want to skip this step.

sk2212 avatar Jan 22 '24 16:01 sk2212

Isn't ipa just a ZIP archive?

doronz88 avatar Jan 22 '24 17:01 doronz88

Yes...but it cannot be created like a 'normal' zip archive.

However, the main problem is now that the connect command

lldb -o "process connect connect://[fd42:af35:2043::1]:50773"

result in a 'hanging' lldb process.

process connect connect://[fd42:af35:2043::1]:50773 on lldb console works.

sk2212 avatar Jan 23 '24 14:01 sk2212

I'm not familiar with the "archive" format of an application you are referring to - only familiar with the exported IPA format. If it's a standard format, please submit a PR that adds support for it also :).

Also, from my understanding you are missing some of the LLDB commands mentioned from pymobile CLI: https://github.com/doronz88/pymobiledevice3/blob/57aa99eceae7d4f2860ca2fbbe126c50f71d7ce4/pymobiledevice3/cli/developer.py#L56-L64

doronz88 avatar Jan 23 '24 16:01 doronz88