• Cycript is a scripting language developed by Saurik, the founder of Cydia. It combines objective-C, C++, JavaScript and other syntactic tools.

  • Allows developers to interact with the application from the command line, view and modify the application at runtime, and can be used to explore, modify, and debug running Mac or iOS apps.

A, install,Cycript

  • Install Cycript through Cydia

  • How do I obtain the process ID and process name?

  • Common Cycript commands (requiring commands to be executed on a mobile terminal, see the previous article on how to connect to a mobile terminal)

    • open

      $cycript -p $cycript -p $cycript -p $cycript Need not be changed frequently) $cycript -p process nameCopy the code

      After entering the start command, if you add the process ID or name, you will enter the mediation environment of the process ID or name software

    • Cancel the input: Control + C

    • Exit: Control + D

Second, the use ofCycript

  • I downloaded a netease cloud music for testing (since I didn’t download it before, I shut down the jailbreak environment, installed it through AppStore, and then returned to the jailbreak environment through CheckRa1n).

  • After installing the APP, you need to open the APP, enter the mobile terminal environment, and obtain the program name through the ps command.

    $ ps -A
    Copy the code
    iPhone:~ root# ps -A PID TTY TIME CMD ...... 515?? 0:00. 43 / private/var/containers/Bundle/Application/C32DF80E - 733 - a - 4426 - B915 - FD05A426E319 / neteasemusic app/PlugIns/music Notificat 528 ?? 0:15. 75 / var/containers/Bundle/Application/C32DF80E - 733 - a - 4426 - B915 - FD05A426E319 / neteasemusic app/neteasemusic...Copy the code

    Then you can find the desired process ID and process name: Neteasemusic. The top line is the auxiliary plug-in for the APP and the bottom line is the real process for the software.

  • Once the process name is found, you can monitor the process through Cycript for debugging.

    $ cycript -p neteasemusic
    Copy the code
  • Note: In the debugging phase, some commands will cause the APP to blink back, if the blink back, it will exit the debugging environment, you need to restart the APP and input the above commands for debugging.

Three,Introduction to Cycript syntax