GithubHelp home page GithubHelp logo

Comments (4)

YueChen-C avatar YueChen-C commented on July 28, 2024 1
    print(rpc.call('com.apple.instruments.server.services.processcontrol', 'launchSuspendedProcessWithDevicePath:bundleIdentifier:environment:arguments:options:',
                   '',
                   'com.alipay.iphoneclient',
                   {'OS_ACTIVITY_DT_MODE': '1', 'HIPreventRefEncoding': '1', 'DYLD_PRINT_TO_STDERR': '1'},
                   [],
                   {'StartSuspendedKey': True, 'iODestinationKey': 0}).selector)

When "StartSuspendedKey" is True and the pid is returned successfully, the app is in debug mode

from py-ios-device.

YueChen-C avatar YueChen-C commented on July 28, 2024 1
if HouseArrestService().send_command('com.xxxx'):

You can try using house_arrest. I don't know any other way

from py-ios-device.

fbaptista avatar fbaptista commented on July 28, 2024

Hello Yue Chen, thanks a lot for sharing your approach.
I found two issues taking this mechanism:

  • It tries to launch the app, but app get frozen with a black screen. No sure about how to end this launching process.
  • The device need to be unlocked.

Do you think there is a way to get this information without having those issues?

Update: Even using this mechanism with an unlocked device, if the app is on debug mode, the device got stuck.
To reproduce you can try running the code first with a debug app, and then with a release one.

Example:

pid_1 = _rpc_channel.call(
        'com.apple.instruments.server.services.processcontrol',
        'launchSuspendedProcessWithDevicePath:bundleIdentifier:environment:arguments:options:',
        '',
        'com.mydebug-app',
       {'OS_ACTIVITY_DT_MODE': '1', 'HIPreventRefEncoding': '1', 'DYLD_PRINT_TO_STDERR': '1'},[],
       {'StartSuspendedKey': True}).selector

pid_2 = _rpc_channel.call(
        'com.apple.instruments.server.services.processcontrol',
        'launchSuspendedProcessWithDevicePath:bundleIdentifier:environment:arguments:options:',
        '',
        'com.any-app',
       {'OS_ACTIVITY_DT_MODE': '1', 'HIPreventRefEncoding': '1', 'DYLD_PRINT_TO_STDERR': '1'},[],
       {'StartSuspendedKey': True}).selector

After running the first launch, device got stuck until you manually kill the starting app.
It is like the instrument server is expecting another command 🤷🏽‍♂️

from py-ios-device.

fbaptista avatar fbaptista commented on July 28, 2024

This definitively works fast and without issues!
You rock !

from py-ios-device.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.