IOS Platform Installation Package

Source: Internet
Author: User
Document directory
  • Deb
  • . IPA
  • . Pxl

Currently, there are three common installation packages on iOS: Deb, IPA, and pxl.

Deb format

Deb is the installation package for Unix systems (mainly Linux). Based on the TAR package, Deb records the file permissions (read/write/executable) and owner/user group. Because UNIX systems have strict requirements on permissions, owners, and groups, and Deb-format installation packages often involve underlying operations of the system, permission setting is particularly important.

The Deb package consists of three parts:

(1) data packets, including the actual installed program data, with the file name data.tar. xxx;

(2) installation information and control script package, including Deb installation instructions, identifiers, scripts, etc., file name: control.tar.gz;

(3) The last one is some binary data of the Deb file, including the file header information, which is generally invisible and can be seen in some software.

 

Deb itself can use different compression methods. Tar is not a compression format. Instead, it directly aggregates scattered files and directories, and records data information such as permissions. Previously mentioned data.tar. xxx, Here XXX is the suffix after compression. Deb uses the gzip compression format by default, so data.tar.gz is the most common one. Common compression formats include Bzip2 and lzma. the lzma has the highest compression rate, but the CPU resources and time required for compression are relatively long.

Data.tar.gz contains the actual installed program data. During the installation process, the data in this package is directly extracted to the root directory (I .e /), therefore, you need to set the corresponding file/directory tree according to the file location before packaging.

Control.tar.gz contains the control information required for Deb installation. Generally, there are five files:

1. Control: data such as software identification, version number, platform, and dependency information is recorded;

2. preinst: script run before data.tar.gz is unwrapped;

3. postinst: the script that runs after data is unwrapped;

4. prerm: the script run before the file is deleted during uninstallation;

5. postrm: the script that runs after the file is deleted;

In the cydia system, saurik, the author of cydia, adds another script, extrainst _, which is similar to postinst.

 

The Deb format is the exclusive installation package format of the Debian system (including Debian and UBUNTU). Combined with the apt software management system, Deb has become a popular installation package in Linux. After entering the 2.x era, cydia author Jay Freeman (saurik) was transplanted to the iPhone platform, along with the apt software management system.

 

IPA format

The IPA format is the exclusive Software Installation Package released by Apple on iOS platform. It is officially used only after firmware 2.0. It is currently the only official installation package on the iPhone/iPod Touch/iPad platform.

Users who have used Mac OS may know that most of the software on Mac has only one. app Directory, which contains all the resources and executable files of the program. Simply put, Mac software is like a green software in windows. It can be used after being decompressed without installation, to uninstall the SDK, you only need to delete the program file (the PKG installation package is not involved here ). The IPA format can be regarded as a derivative of the. app software.

The IPA file is actually a zip package (not a RAR or 7z package) and contains three components:

(1) The. app directory under the payload Directory, which is the main program of the software;

(2) itunesartwork, essentially a PNG image without a suffix, used to display icons in iTunes;

(3) itunesmetadata. plist, which records purchaser information, prices, and other data.

Because the zip package cannot record permissions and owner information, Apple specifies the IPA installation method, that is, all IPA will be unpackaged and installed in the/var/mobile/applications directory, the owner and user group of all files and directories are set to mobile (ID: 501), and the master program (executable files) permissions are set to 0755 (all files can be executed, but only the owner can modify it). The executable file is defined in plist. All directory permissions are set to 0755, while all other files are set to 0644 (only the owner can modify the permission, and others can only read the permission, but not all users can execute the permission ).

After IPA is unwrapped, it is not directly placed in the applications directory, but in a directory composed of random codes. The function is to allow the software to run only in a specific sandbox) and cannot interfere with other software. Therefore, in the random code directory, apart from the three components of IPA, there are three directories:

(1) Library, which generally uses data such as storage settings files;

(2) Documents, used to store data and archive;

(3) TMP, Temporary Folder.

Because this software can only run under this specific directory (of course, some programs will call the system's address book, camera, and other components, but it is still restricted ), this ensures the security and stability of the entire system.

Because the UNIX system has strict permission requirements, the "unauthorized" behavior is absolutely not allowed. For example, a mobile user does not have the permission to delete all root files because the root permission is higher than that of mobile. Therefore, some people cannot delete the software or save files after IPA installation, such as Chinese or archive modification. This is because the root files cannot be deleted, the program itself cannot write all the root archive files.

 

Pxl format

The pxl format originated from the PKG installation package on MAC systems and is widely used in the 1.x firmware era. It was once the only software installation package on the iPhone platform and is still used by software such as 91.

In the 1.x era, the pxl format was the only installation format on the iPhone platform because no apt management software such as cydia was available at that time, and Apple did not officially push the App Store. Because in 1. X has accumulated a lot of popularity. In the next app store era, pxl still occupies a large part of the market with its relatively simple packaging and installation methods. However, as the installer stops development and software such as ibrickr stops updating, there are currently only 91 software that are still in pxl format.

The pxl installation package usually contains three components:

(1) pxlpkg. plist records the storage location, owner, permissions, and software identification of program files;

(2) pkgscript file folder, which stores the installation and uninstallation scripts;

(3) program file.

The beginning of a pxlpkg. plist file is usually cfbundleidentifier, which records the unique identifier of the software and distinguishes it from other software. Rdpxlpackageversion records the software version. Rdpxlpackagefireware is used to record the firmware versions that can run. Other key values are used to record data such as the software introduction, URL, and author information.

In addition to the software identification, software version, and available firmware version, the core of pxlpkg. plist is rdpxlpackagefiles and rdpxlpackagepostflight. Rdpxlpackagefiles records the path to which the program file should be copied, and provides the overwrite parameter. Rdpxlpackagepostflight records the owner and permissions granted to the program file, which are implemented by chown and CHMOD commands respectively. In addition, for pxl containing the installation/uninstall script, the corresponding script postflight and preremove are also executed using the sh command.

Pkgscript usually contains two files: The postflight script executed after installation and the preremove script executed before uninstallation. These two scripts are standard Linux shell scripts executed with SH commands.

Features of the installation package Deb

A wide range of resources: cydia itself has a lot of resources, not to mention any format of the installation package can be converted to Deb.

Relatively convenient online purchase mode: cydia store, although there is no limit on the five devices of App Store, it is difficult for domestic users to make payment.

It is difficult to crack and does not use the App Store verification method. Therefore, verification and anti-cracking measures must be added to the program, which makes it more difficult to crack and is a good thing for software developers.

Comprehensive Unix File System Support: you do not need to use commands to set file permissions, owner, and user groups (of course, you can also set them with scripts)

Complete script support: five scripts are executed in the order of installation and uninstallation. More options are available. For example, you can back up files in preinst and Restore Files in postrm.

Strict dependency: Deb follows strict dependency (specified by depends and pre-depends) to ensure that the components necessary for running the software. During online installation, the dependent software package is automatically installed. It is also important to uninstall software package A. For example, if Software Package A depends on B, A is prompted to depend on B when B is uninstalled. If B is uninstalled, A cannot be used, this ensures system integrity and stability.

The existence of key values such as conflicts, replaces, and provides can cause a conflict or replace other software packages.

Full permission: because Deb must run as the root with the highest permission, Deb can operate on any system location. In other words, Deb has full control over the entire system, therefore, the Deb installation package software can implement many functions that IPA cannot implement.

It is relatively simple to obtain (online or offline) and install methods, and you do not have to worry about removing programs during synchronization on different machines.

Relatively simple installation: in fact, no matter which installation package is used, the installation method is not very complicated, but Deb is slightly more complicated.

 

Deb has five installation methods:

Cydia or similar apt management software is installed online. This is the best installation method, because dependencies are usually not considered, but the disadvantage is that the network requirements are relatively high;

Command Line to dpkg-I XXX. deb installation, the advantage is that you can install multiple Deb instances at a time with wildcards, and you can also directly see the script running status and prompt information about successful/failed installation, the disadvantage is the support of the command line software, such as the putty/winscp console/ISSH/mobileterminal. Many people are not familiar with the operation under the command line. In addition, no icon is displayed after installation;

Put it in the autoinstall directory and restart the installation. This method is actually a STARTUP script provided by cydia. During each system startup, run the dpkg command to install Deb under the autoinstall directory. The advantage is that no command line operation is required, the disadvantage is that the instance must be restarted. Some even need to be restarted twice, and the icon is not displayed;

The advantage of using ifile for installation is graphical operations. The desktop displays icons. The disadvantage is that multiple Debs cannot be installed at a time;

Cyder II and other software are used for installation. The principle is to simulate an apt software manager to download the corresponding Deb file and transmit it to the device. Then, install the software in the previous several ways.

 

In general, Deb installation depends on the dpkg-I command, but some commands are entered under the command line, and some provide a graphical interface. However, apart from cydia installation, other installation methods have some common problems:

Does not search for Dependencies by yourself. You must manually provide the dependent Deb;

Cydia reads some special statements in the installation script, such as executing the command only during the new installation instead of during the upgrade, and restarting the springboard or device after the installation is complete.

 

Of course, Deb software is also relatively simple to uninstall, there are two ways:

In cydia, the uninstallation process and prompt information are very detailed. The graphic interface is fully operated, and the re-installation option is also provided;

Run the dpkg-r package_id command or the dpkg-P package_id command to uninstall the package_id (as described later );

Cydelete to uninstall, the advantage is that you can directly uninstall the Graph Software on the desktop, but there is nothing to do with those without icons.

 

In fact, both installation and deletion can be done manually. That is, after Deb is unwrapped, place the file in the corresponding location, Set permissions, and execute the script. But is this necessary?

 

The Deb installation process is as follows:

 

Read and lock the database to avoid two installation programs running at the same time.

Read the package and version information in control and search for the database. If the database already exists, uninstall the package and install the package again;

Check depends, pre-depends, conflicts, and replaces. If a software already exists in conflicts, an error is reported and installation is terminated. If the software specified by pre-depends is not found, an error is reported and the installation is terminated. If the software specified in replaces is found, uninstall it;

Write Data to the/var/lib/dpkg/status file;

Execute the preinst script (if any );

Unpack data.tar.gz, place the file in the corresponding location, and write the file list to/var/lib/dpkg/INFO/xxx. List;

Run the postinst and extrainst _ scripts (if any );

If the installation is successful, status: Install OK installed will be written into the status file; otherwise, other status data will be written, for example, unpacked, failed-config, and half-installed );

Reload the database and unlock it.

 

The Deb uninstall process is as follows:

 

Read and lock the database;

Search for databases based on software IDs;

Check whether any software depends on the software to be detached. If any, the system prompts and disconnects the software;

Execute the prerm script (if any );

Read the/var/lib/dpkg/INFO/xxx. list file and delete all and non-empty folders recorded in the list file;

Run the postrm script;

If the uninstall command is dpkg-R, record in status is retained and changed to Status: Not Installed. If the uninstall command is dpkg-P, all data is deleted;

If the uninstallation process is correct, read the database again and unlock the database.

 

Because the software installed by Deb may put an archive file under/var/mobile/documents at runtime, or put the setting file under/var/mobile/library/preferences, these files are not recorded in the list file, so they will not be deleted during uninstallation.

 

. IPA

Rich resources: There are so many resources on the App Store, and many other websites such as apptrackr also provide cracked versions.

Comprehensive update and Post-service.

You can only use minimum permissions to ensure security.

System-level operations are not involved, so it is generally not easy to cause a crash or a white apple (some are stuck because the resource consumption is too large ).

A convenient installation method, whether it is directly installed on the device using App Store, or using iTunes for synchronization, or using third-party software such as installous and 91 for installation, is a convenient and fast installation method.

Super simple unmount method: What is easier to unmount than simply setting an X?

Completely deleted without leaving any junk files (such as archiving and setting files)

In general, cracking is still relatively easy, but more and more software is now involved in anti-cracking measures.

The premise is that the IPA software is installed in a sandbox-like environment, in addition to the/var/mobile/Media/dcim directory (photo and storage directory) do not interfere with the system by calling wallpaper, ringtones, cameras, and other components. This ensures the stable operation of the system to the maximum extent, it will not interfere with the normal use of other software. However, the problem is that the IPA software has low permissions and requires modifications to the system, especially when patches are applied.

 

There are two official installation methods for IPA software: download and install the software in App Store, and use iTunes for synchronization.

 

The first problems are mainly network problems, which may cause installation failures if the network speed is not good. The installation of GPRS and other online services consumes a lot of traffic. The latter's problem is that it cannot be used in different systems (including different computers and different systems on the same computer), and synchronization on other systems will erase the original software. Of course, iTunes is often criticized for its long synchronization time. Especially when many software are installed, it takes a long time for the backup before each synchronization. This is disgusting (but you can directly remove the backup operation ).

 

Because the above two methods have some problems, many people will choose to use installous or 91 to install IPA, which is indeed a good choice.

 

Installous does not have any problems, but it does not work well for IPA with strict validation. Although installous can basically replace iTunes, it is not exactly the same. The most typical example is that installous cannot run when installing Microsoft's official Live Messenger (genuine or non-Cracked. In fact, installous does not support many uncracked genuine software.

 

As of 9th, it was often criticized. 91 although IPA can be installed, apart from the support problems of genuine software in installous, due to the defects in the installation mechanism of 91, the software cannot be implemented in multiple languages and only uses the English interface, the zh_cn.lproj and zh_tw.lproj language packs are ignored. This is a tragedy for those who want to use the Chinese version. Therefore, you should avoid using 91 to install IPA.

 

There are three methods for detaching:

Hold down the icon on the device until it starts shaking. Click X in the upper left corner of the icon to unmount the device;

Cancel Selection in iTunes, and then synchronize

Find the corresponding directory under/var/mobile/applications and forcibly Delete the entire folder. This can be used in the previous two methods (sometimes uninstall software with a large volume, for example, exceeding 1 GB, because the deletion process is too long, resulting in a loss of response and deletion failure .), However, this method may cause system instability. Unless you have encountered a problem, we strongly recommend that you do not use it.

 

. Pxl

Strictly speaking, there are not many resources in the pxl format, but there are also many resources. Currently, most users in pxl format are 91 users.

In terms of timeliness, many software (mainly on the App Store) will be converted to pxl immediately after being cracked. In this way, the pxl format is well updated.

Because the 91 mobile assistant does not have the iTunes synchronization, it will erase the software. In addition to some other convenient features, many new users are familiar with iPhone/iPod Touch from 9th. The result is that the pxl format depends on 91.

The popularity of pxl format is not a historical relic, but a requirement that conforms to market rules. 91 assistant's convenient software management method (especially WiFi management), coupled with the free flag, makes pxl format very popular among new users.

 

In practice, pxl and Deb have the same functions. Although pxl cannot record file permissions and other data, it can be completely compensated by scripts. That is to say, the pxl format and Deb format are actually different. In addition, pxl format does not require a rare Unix environment, especially the Debian environment. It is superior to Deb format.

 

But why do many people often say that pxl is not used? In my opinion, the main reasons are as follows:

 

Resource limitations: Except for several software developed by company 91, all the other software is converted from Deb and IPA. If the original software is not cracked, pxl cannot do anything (for example, Live Messenger officially issued by Microsoft and a bunch of software not cracked on cydia );

Resource Timeliness: similar to the above, most of the pxl formats are converted from other formats, which is always slower than the original version. Especially when the pxl cannot be cracked, pxl cannot be cracked;

The number of contractors is limited: Many now use 91 assistants to package pxl directly. There is only one XXX for most of them. apps in the app directory generally do not have problems, but if you encounter software that has strict requirements on file permissions and other data (for example, executable files do not have executable permissions, or mobile users cannot rewrite all root files, etc.), or software that requires complicated scripts to run, pxl producers often do not have the ability to make a complete pxl, this also causes many installation and usage problems;

Security: Most people are used to using the CHMOD-R command to set the entire xxx When making pxl. the app directory and all its files and subdirectories are set to 755/775/777 permissions, which may cause certain security risks. Search for relevant information about the meanings of these numbers. Here is a brief description. The 644 attribute indicates that only all persons with this file can perform the rewrite operation. Others can only read the file, and no one can execute the file. 755 and 775 add executable permissions on the basis of 644, and 755 is accessible to all users in the user group where the file is located. The 777 permission indicates that anyone can rewrite and execute the code. Because mobile itself is a restricted account, if you use 777 permissions, you can use this vulnerability to gain control of the entire system. However, because the iPhone system is relatively closed, there is no chance to cause losses. However, 775 and 777 permissions should not be used;

Archiving of IPA to pxl: many people have had this experience. After game a archives game B, archive game B and archive game B before a. It is found that the archive of A is no longer available. The reason is that all files are archived under the/var/mobile/Documents directory of the pxl software converted from IPA, and there are exactly two files with the same file name (the most common one is data. sav or save. data. This problem also occurs on IPA to Deb and cannot be solved;

Incomplete deletion: When the pxl format is uninstalled, data such as archive files, configuration files, and temporary files will not be deleted. Long-term use will reduce the available space;

Compatibility problems exist in some models: some machines do not transfer the/applications directory in the system partition to the/var/stash user partition after jailbreak. Due to the small amount of available space in the system partition (500 mb by default, usually the available space does not exceed 50 MB), forced installation in/applications will cause the remaining space to be exhausted or installation failure.

 

From this we can see that pxl format is not a problem of pxl itself, but a problem of the packer and a defect in the installation method.

 

It should also be pointed out that the largest provider of pxl, 91, often reposted software released by others (including those purchased by netizens or directly downloaded from cydia) as a software released by myself, I don't care about copyright issues at all. This has also aroused the resentment of many people, especially the original publishers. This kind of naked plagiarism is really shameful. Because of this, many people are unhappy with pxl because of 91, which is really a waste of pxl format itself.

 

Install and uninstall:

 

91 mobile Assistant

91 treasure chest

 

Pxl to IPA http://bbs.weiphone.com/read-htm-tid-569364.html

Pxl to Deb http://bbs.weiphone.com/read-htm-tid-692225.html

 

The pxl format was once the only installation package format in the 1.x era, leaving us with too many memories. We should still remember and respect pxl's contributions. However, with the development of the times, pxl has become an old-fashioned model. Just like the exit of installer, pxl will eventually exit the market and be given to the temple.

 

The general software still tries its best to use the IPA format. Do not use the Deb or pxl format converted from IPA to ensure compatibility and security. In system-level programs (such as sbsettings and input methods), IPA is incapable, so the best choice is Deb. Pxl, as a format to be quickly eliminated, is better to give up decisively.

 

For IPA and Deb installation methods, the preferred choice for IPA installation is iTunes synchronization and app store online installation, and installous is selected for the next installation to ensure optimal compatibility. For Deb installation, cydia is preferred for online installation, and any installation method except 91 is selected.

 

In any case, 91 is not recommended for installation of IPA and Deb, because the 91 installation mechanism is not complete and is prone to problems.

 

Related Article

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.