iOS Jailbreak development (i)

Source: Internet
Author: User
Tags appsync

Jailbreak development also have some time, there are a lot of things to summarize, I hope to give others some reference, but also their own experience of the past development of some summary. Individuals do not recommend the use of piracy, mainly technical introduction here.

This series mainly introduces how to carry out jailbreak development, involving the following aspects:

(1) mainly involved in the establishment of the jailbreak market, in the app to implement the IPA installation and uninstallation and update. Refer to the object is 91 assistant, 25pp, synchronous push such an application. Build a pirated app Store. Of course, if through the 299-Knife Enterprise certificate, it is not necessary through the Cydia, directly through the web link can realize the promotion of the app, there is a certain risk. This involves some protocols, which are described later.

(2) Implement the replacement of wallpaper and ringtones within the app. This process involves a lot of things, especially the replacement of ringtones, the iphone inside very troublesome;

(3) Some jailbreak plug-in development, through the inside some plugins are very useful, reasonable, and very beautiful.

The first step is to start by installing the IPA package from inside the app, and then complete the 3 points mentioned above.

In general, the installation of 91 assistants, synchronous push such applications require mobile jailbreak, while installing Appsync, so as to use, so the necessary conditions for development is also the same.

Upload the demo project address to my GitHub link: https://github.com/easonoutlook/IPAInstaller

Before has been fork other's things, also did not make any contribution, from now on, for the development of Open source, do a bit of their own contribution.

Go to the Chase:

The tools and environments you need:

A. iPhone or ipad jailbreak, install Appsync

B. Xcode installation Command Line Tools

C. Download the latest version of Ldid Https://github.com/downloads/rpetrich/ldid/ldid.zip

1. Modify the Sdksettings.plist file

I am using the Xcode4.6.3 version, the iphone version is 6.1.2, the path is:/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/ iphoneos6.1.sdk/

Place the code_signing_required inside the sdksettings.plist in this directory as No

The execution commands are:

Go to the Directory

Cd/applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos6.1.sdk

Back up the original file

sudo cp sdksettings.plist SDKSettings.plist.orig

Editing a sdksettings.plist file

sudo vim sdksettings.plist

Change the corresponding field below to No<key>code_signing_required</key><string> YES</string>//default Yes, need to change to No

The path referenced by this operation is as follows: http://kqwd.blog.163.com/blog/static/4122344820117191351263/

2, to the project to add the appropriate permissions, iOS6 inside need to give permission to, iOS5 do not need this action

Create a new plist file, named entitlements.

Create a plist

Change the plist file to:

<?xml version= "1.0" encoding= "UTF-8"? ><! DOCTYPE plist Public "-//apple//dtd plist 1.0//en" "Http://www.apple.com/DTDs/PropertyList-1.0.dtd" ><plist Version= "1.0" >    <dict>        <key>com.apple.private.mobileinstall.allowedSPI</key>        <array>            <string>Install</string>            <string>Browse</string>            <string >Uninstall</string>            <string>Archive</string>            <string>removearchive</ string>        </array>    </dict></plist>

Set the code Signing entilements of code Signing to the Entitlements.plist file you just created

A procedure is required to sign the Production app file with Ldid. Introduced later.

3, the implementation of the jailbreak installation code:

typedef nsdictionary * (*pmobileinstallationlookup) (nsdictionary *params, id callback_unknown_usage); Nsdictionary *ipainstalledapps () {    void *lib = Dlopen ("/system/library/privateframeworks/ Mobileinstallation.framework/mobileinstallation ", rtld_lazy);    if (Lib)    {        Pmobileinstallationlookup pmobileinstallationlookup = (pmobileinstallationlookup) dlsym (Lib, " Mobileinstallationlookup ");        if (pmobileinstallationlookup)        {            Nsarray *wanted = Nil;//[nsarray arraywithobjects:@ "Com.celeware.IPADeploy ", @" com.celeware.celedial ", nil]; Lookup specified only            nsdictionary *params = [nsdictionary dictionarywithobjectsandkeys:@ "User", @ " Applicationtype ", Wanted, @" Bundleids ", nil];            Nsdictionary *dict = Pmobileinstallationlookup (params, NULL), #ifdef DEBUG            NSLog (@ "%@", dict); #endif            return dict;        }    }    return nil;}

All the code is in the previous GitHub directory and can be viewed on its own.

4. Compile and build the app file

Because the app needs to be signed and privileged, do not generate an IPA file, but instead generate an app file. After the signature and permission to add, and then manually use the app to make an IPA file.

Select the device (IOS device) in Xcode (Figure 3), compile (build) (Figure 4). After compiling, you can see the newly compiled app file in the project's Products folder , and right-click the Show in Finder (Figure 5) to display it in the folder. Copy the app to a different folder, anywhere, and you need it later.

5. Making IPA documents

After downloading the previously mentioned ldid, put the Ldid file in/usr/bin.

For example, under the Download directory, sudo-i

The CP ldid/usr/bin/then copies the files to the/usr/bin.

Then, the ldid signature of the previously generated file

There is a space between "ldid-s" in this command , "ldid" and "-S". There is no space between "-S" and "Entitlements.xml". "Entitlements.xml" is the XML file mentioned above, if your XML is not the name, please change the command to your XML file name.

There is a space between "-SENTITLEMENTS.XM" and "Ipainstall.app". "Ipainstall" is just the generated app file, if your name is not the same, please modify it for your name. Thename of the app is the same as the one behind the "/" . If there is no output error message or stuck (that is, no response after hitting enter), the permission is added successfully.

6. Generate IPA file, install

Create a new folder named "Payload". Put the app file that you just added permissions into this folder. Right-click "Compress Payload" to get a ". zip" file and change the suffix name of this zip file to ". IPA". Well, theIPA file is ready for production.

And then, through itools installation, test the files that were just generated

The integration of a lot of resources, some places are more messy, the latter to improve

Reference Resource Links:

Http://since2006.com/blog/240/ios6-mobileinstallationinstall

Http://blog.sina.com.cn/s/blog_9cd1705d0101l4bo.html

http://kqwd.blog.163.com/blog/static/4122344820117191351263/

http://blog.csdn.net/linkai5696/article/details/5924356

http://www.yonsm.net/post/553

Http://stackoverflow.com/questions/14871748/how-do-i-change-my-applications-entitlements-to-com-apple-backboard-client

http://stackoverflow.com/questions/13817569/how-to-programatically-install-a-ipa-file-in-ios-6/15062538#15062538

Http://since2006.com/blog/240/ios6-mobileinstallationinstall

http://hi.baidu.com/prognostic/item/831b622202b2dd0f72863e9c

http://www.vsyo.com/a/t/89895554d4043c5a

Http://mobile.dotblogs.com.tw/cmd4shell/archive/2013/03/26/98967.aspx

This article link: http://www.cnblogs.com/easonoutlook/p/3220429.html

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.