IOS runtime tool-cy.pdf

Source: Internet
Author: User

Cyborg is a powerful tool developed by saurik. It allows developers to interact with applications under the command line and view and modify applications at runtime. It does help you crack some applications, but I think this tool is mainly used to learn the design of other applications (mainly the UI design and implementation ).

This tool uses a mix of Objective-C and Javascript to interact with and even modify applications in real time. Click here for its URL. You can download the complete software package from the official website. There are two methods to use. One is to install MobileSubstrate on a jailbroken device, so that it can be used in all applications; another method is to integrate cylinder into your own applications through static libraries. In this way, jailbreak is not required. Of course, cylinder can only be used in your own applications.

In jailbreak mode:

1. install openSSH in cydia to ensure that you can log on to the iOS device using SSH. If you have already installed openSSH, you do not need to continue the installation.

2. Use sftp to upload downloaded cycript_0.9.501_iphoneos-arm.deb and libffi_1-3.0.10-5_iphoneos-arm.deb installation packages to iOS devices


3. Use dpkg-I to install the deb package


4. Run cycript. If the cy # symbol appears, the installation is complete.

VcC01L2436Osy/weight + weight/ydLUu/G1w2FwcKOsu/weight/cilu/weight + weight/K + zcrH1eLR + weight + Weight = "http://www.2cto.com/uploadfile/Collfiles/20140612/2014061209163495.jpg" alt = "\">


In the above example, cyborg is installed on a jailbreaking machine and can be used in any application.

Another method is to integrate the cycript framework into the application during the development process. This can be used to adjust the UI parameters in real time without requiring machine jailbreak. The following is a simple example:

1. Download The cycript package from the official website. It is a compressed file, which contains three cycript. framework, cycript. lib and cycript.

2. Create a new target in xcode and use the simplest singleViewApplication to create a blank application. The interface should be pure at this time.

3. add the cycript framework and dependencies and cycript. the framework should have its meaning, but it also needs to rely on the support of libraries, including JavaScriptCore and libstdc ++. Note that libstdc ++ has version requirements, it must be libstdc ++. 6.0.9.dylib, as shown in

4. Set compilation options

To solve the libstdc ++ compatibility problem, you also need to set "Other Linker Flags" on the BuildSetting page, add-lstdc ++, and "C ++ Standard Library ", make sure that "Compiler Default" is selected ". If the libstdc ++ version is not selected and the compiler options are correctly configured, The Link under iOS7 fails.

5. modify the code and open the cyberlistener port.

We recommend that you use a macro, for example, CYCRIPT_ENABLE.

#ifdef CYCRIPT_ENABLE    CYListenServer(8888);#endif

Here, 8888 is the listening port of cycompute. To make this Code take effect, add CYCRIPT_ENABLE to the preset macro.

6. run the simulator. Here is another example. Currently, only 64-bit simulators are supported. You cannot use a 32-bit simulator. You also need to configure the simulator and select the correct one to run the simulator. Then the application can run, still a pure UI

7. Go to the cmd interface, switch to the decompressed directory of the cylinder package, and run./cyline-r 127.0.0.1: 8888.

Among them, 127.0.0.1 is your simulator or device address, and 8888 is the listening interface configured in your code. If it is normal, it will go to cylines' REPL, then you can modify some UIS on site, for example, change the white background to Red:

At this time, the UI should be changed to a red background.

This is the basic way to use cylinder. The rest is how to use it. On the one hand, you need to have a good understanding of the iOS framework, and on the other hand, you need to accumulate experience.





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.