Installer 3 Property List Documentation

  • Hello Guest, in order to download Installer, you need to add https://apptapp.me/repo as a repository to Cydia, Sileo or Zebra! Visiting that webpage from your phone's browser will result in an error!

Sammy Guichelaar

Administrator
Staff member
Administrator
Premium Member
Developer
2 May 2018
40
13
8
The Netherlands
apptapp.me
Github
https://github.com/sammyguichelaar
User Role
Developer
Repository
http://samguichelaar.com
Support Email
[email protected]
AppTapp Installer 3
for iPhoneOS 1.x


Property List (plist) information.
Last updated: 8th of October 2018
This documentation was written for Installer 3, but is applicable to Installer 2 (with exceptions) and Installer 4 too)

Note: I uploaded an example Install.plist below, which was used for all these examples. Please use this example as a reference for the more advanced scripts such as dependency checking, if and ifnot statements.

More information will be added later on.

Installer 3 used plists where cydia uses the control file. Installer however used to have some additional information in this plist, and did not have any additional files for scipts unlike Cydia. Everything that was needed to manage the package is centralized in the Install.plist.

One of the biggest issues with Installer back in the day was the complete lack of proper documentation. Sometimes the developers of Installer themselves even got confused about their implementation. Installer also suffered from an incredibly fast and again undocumented upgrade path. Within 1.5 years, 4 versions of Installer were released, 3 of which for iPhoneOS 1 alone.

The basics of the plist:

As said before, the plist contains all information for a package needs to be Installed. It contains the metadata (Like Cydia's control file) but also contains the scripts, install locations (As Installer 3 did not use the fake subsystem in it's packages to automatically move files)


File Management

Installer 3 uses Lua commands (Such as CopyPath) specified in the property list to manage files, execute commands, and do other tasks.

The commands are Lua Scrips, which in the plist is a dictionary with 5 possible tasks, which each are a child array of the Scripts Dictionary.
Scripts [Dictionary]
---- Preflight [Array]
---- Install [Array]
---- Upgrade [Array]
---- Uninstall [Array]
---- Postflight [Array]


Installer 3 Plist 1.png

Preflight: As the name suggests, the commands specified under preflight get executed before after the package has been downloaded, but before the package is Installed.

Install: The commands here are are executed after preflight, during Installation. Usually contains a CopyPath command.

Uninstall: The commands here are are executed during Uninstall. Note that the preflight and postflight commands The commands here are are executed after preflight, during Installation. Usually contains a CopyPath commands DO NOT APPLY to Uninstall. During Uninstall operations only the commands in Uninstall are executed.
Usually contains a RemovePath command.

Upgrade: The commands under this array are only executed if the package is being upgraded (if the user has version 0.1 installed and is now downloading 0.2) Normally not used unless there are changes in the new version.

Postflight: The commands here are executed after Preflight and Installation. Normally not used. If used it's usually for chmod or chown operations.


The basic file management commands.



CopyPath

CopyPath is the most essential command in Installer 2 through 4. It copies a file or directory from the package zip to a specified destination on the iPhoneOS file system.

Installer 3 Plist 2.png

Example: In this example, we are using CopyPath during Installation. Under Install a new child array is created. This array is called Item 1 if it's the first command you want to execute, Item 2 for the second, etc.

In this example, we are using Item 2. (This means there another command which is executed before this one; Item 1). Item 2 is an array. Since we want to use CopyPath here, we need to specify this.
1. Create a child string under Item 2, and give it the value 'CopyPath'.

2. Create another child string under Item 2. The value of this string is the file or directory inside the .zip package you want to move over to the iPhoneOS File System.
In this example: ioreg

3. Create a third String. (This string will automatically be called Item 3). It's value should be where you want the file to be placed, INCLUDING it's file name. So in this example, we want to copy the file ioreg from the zip package to /usr/bin/ioreg





RemovePath

RemovePath is used to remove a file or directory on the iPhoneOS Filesystem.


Installer 3 Plist 4.png

Example: In this example we are removing 2 files during the upgrade process of this package.
We are removing libncurses.5.dylib & ioreg, both located in /usr/bin/.

In this example, we are using Item 1, and Item 2. It should go without saying that Item 1 gets executed before Item 2.
Item 1 & Item 2 are an array. Since we want to use RemovePath here, we need to specify this.

1. Create a child string under Item 1, and give it the value 'MovePath'.

2. Create another child string under Item 1. The value of this string is the file or directory On the iPhoneOS filesystem we want to removemove.
In this example we first remove the file called /usr/lib/libncurses.5.dylib
If successful, Installer moves to Item 2, we remove /usr/lib/ioreg



MovePath

MovePath is used to move a file on the iPhoneOS Filesystem to another location. Additionally, it can be used to rename a file too.


Installer 3 Plist 3.png

Example: In this example, we are moving (actually renaming) a file called Other.artwork located in /System/Library/UIKit.framework/Other.artwork
to the new location /System/Library/UIKit.framework/Other.artwork_old.
As you can see, the actual location of the file didn't change, the name did. However you can specify any location and Installer will move the file there.

In this example, we are using Item 1. (This means it is the first command which is executed during Installation). Item 1 is an array. Since we want to use Movepath here, we need to specify this.

1. Create a child string under Item 1, and give it the value 'MovePath'.

2. Create another child string under Item 1. The value of this string is the file or directory On the iPhoneOS filesystem we want to move.
In this example: /System/Library/UIKit.framework/Other.artwork

3. Create a third String. (This string will automatically be called Item 3). It's value should be where you want the file to be placed, INCLUDING it's file name. So in this example, we are moving the file
Other.artwork located in /System/Library/UIKit.framework/Other.artwork to
to the new location /System/Library/UIKit.framework/Other.artwork_old.




Notice

Notice is a UIAlertView that developers can call.


Installer 3 Plist 5.png

Example: In this example, we are showing the user a notice (An ActionSheet) during preflight (after the package has been downloaded but before it's installed)
with the text: "Visit AppTapp.me and please donate if you like this"

In this example, we are using Item 1. (This means it is the first command which is executed during Preflight). Item 1 is an array. Since we want to use a Notice here, we need to specify this.

1. Create a child string under Item 1, and give it the value 'Notice'.

2. Create another child string under Item 1. The value of this string is the text you want the user to see. In this example "Visit AppTapp.me and please donate if you like this".





IfNot (InstalledPackage)
Dependency Checking

IfNot can be used to check if a package is installed or if the user has a specific firmware. Based on the response, the operation will be aborted and a notice will be shown.
This is a quite complicated script, so please use the example plist provided as a reference point.

Installer 3 Plist 6 PNG.png


Example: In this example, Installer checks during preflight if the dependencies, in this case com.natetrue.iphone.iphone_binkit is not Installed. In case it is not, it aborts the operation and shows a UIActionSheet with the text
"Please install BSD Subsystem first"


In this example, we are using Item 1. (This means it is the first command which is executed during Preflight). Item 1 is an array. Since we want to use a Notice here, we need to specify this.

1. Create a child String under Item 1, and give it the value 'IfNot'.
2. Create a child Array under Item 1.
3. Under the array you just created, create another array.
4. Under the last array you created, create a string with the value 'InstalledPackage'
5. Create another string under the last array you created with the value being the bundleID of the package you want to know if it's installed or not.
6. Under the main array we are working in, create another child array.
7. Under this array, create a string with the value 'AbortOperation'
8. Under the same array, create another string with the value being the text you want the user to see, in this example: "Please install BSD Subsystem first"





IfNot (ExistsPath)
Checking is a directory exists


IfNot can be used to check if a directory exists. In this example IfNot is used as a simple statement. The child array in this example is ExistsPath. If it matches the criteria (So IfNot ExistsPath = If a path does not exists at the specified location, in this case /usr/local/arm-apple-darwin/lib, then execute the CopyPath command.

<string>IfNot</string>
<array>
<array>
<string>ExistsPath</string>
<string>/usr/local/arm-apple-darwin/lib</string>
</array>
</array>
<array>
<array>
<string>CopyPath</string>
<string>arm-apple-darwin</string>
<string>/usr/local/arm-apple-darwin</string>
</array>





IfNot (FirmwareVersionIs)
Checking if the users firmware matches a list of firmware

IfNot can be used to check if the user is running a certain, or multiple possible firmware versions. This is generally used to white-list firmwares where as the If FirmwareVersionIs option is used to blacklist firmwares.

In this example we check during preflight if the firmware version matches known firmwares BiteSMS is known to work on. If the user's firmware is not the same as the whitelisted firmwares, we show a notice telling the user the product may not be stable.

<key>preflight</key>
<array>
<array>
<string>IfNot</string>
<array>
<array>
<string>FirmwareVersionIs</string>
<array>
<string>1.1.1</string>
<string>1.1.2</string>
<string>1.1.3</string>
<string>1.1.4</string>
</array>
</array>
</array>
<array>
<array>
<string>Notice</string>
<string>biteSMS has not been tested on this version of the iPhone, but may still work.</string>
</array>
</array>
</array>
</array>



If
FirmwareVerison Equals

If is a simple if statement, which can be used to detect firmware versions and do actions accordingly.

Installer 3 Plist 7.png



Example: In this example, Installer checks during Installation if the firmware version of the users device equals 1.1.1, 1.1.2, 1.1.3, or 1.1.4. If it does, it will execute 2 commands (exec) on the iPhone Filesystem. If the current firmware is not either of the specified versions, Installer will continue without doing these actions.


In this example, we are using Item 1. (This means it is the first command which is executed during Installation). Item 1 is an array. We want to use an If statement here, we need to specify this.

1. Create a child String under Item 1, and give it the value 'If'.
2. Create a child Array under Item 1. This array will be called Item 2 since the string 'If' is Item 1.
3. Under the array you just created, create another array.
4. Under the last array you created, create a string with the value 'FirmwareVersionIs'
5. Create another array under the last array you created.
6. Under this array create child strings with the value being the iPhoneOS version you want to match.
7. Under the main array, called Item 1, create a new array. This array will be called Item 3 since Item 1 is the string with value 'If', and Item 2 is the array with the firmware versions.
8. Under the array you just created, create another array.
9. Under the last array you created, you can put the commands you want to execute. In this example it is exec, which executes a binary on the iPhone FileSystem. It can be any command though, CopyPath, MovePath, Exec, and more.

Exec
Execute binaries with arguments

Installer 3 Plist 8 PNG.png

In this example, we are chmodding ioreg in /usr/bin/ioreg to 755.

We are using Item 1. (This means it is the first command which is executed during preflight). Item 1 is an array. We want to use an exec command here, we need to specify this.

1. Create a child String under Item 1, and give it the value 'Exec'.
2. Create another string Item 1. This string will be called Item 2. It's value should be the directory of the binary, in this example /bin/chmod. Then, give the arguments for the command. In this case we're going to chmod the destination 755. Then finally, separated by a space, enter the directory and the file you need to chmod. In this case it's /usr/bin/ioreg

The end result becomes /bin/chmod 755 /usr/bin/ioreg

Other examples:
Chown: /usr/bin/chown mobile:mobile /Applications/iSlsk.app/
Chmod: /bin/chmod 755 /usr/bin/ioreg
Mkdir: /bin/mkdir -p /var/mobile/Media/Downloads

I'm sure the object here is clear. You can call any binary, give it arguments and specify the destination. Again, it can be called in any of the 5 operations, preflight, install, upgrade, uninstall, postflight.


Respring Required
Sets weather the package requires a respiring after installation.

Installer 3 Plist 9.png


1. In the root of the plist, create a boolean called RestartSpringBoard. Set to TRUE or FALSE.
This will only be executed upon successful installation.



Obviously, The If and IfNot statements can be used for more purposes than the examples given here.



SetStatus

Notice is a small description on the installation page or a UIAlertView (depending on Installer version) that developers can call to show the user a message


Installer 3 Plist 10.png


Example: In this example, we are showing the user a installation status during Installation
with the text: "Generating host key (5-10 mins)..."

In this example, we are using Item 1. (This means it is the first command which is executed during Install). Item 1 is an array. Since we want to use a Notice here, we need to specify this.

1. Create a child string under Item 1, and give it the value 'SetStatus'.

2. Create another child string under Item 1. The value of this string is the text you want the user to see. In this example "Generating host key (5-10 mins)..."





InstallApp & UninstallApp
Checking is a directory exists

InstallApp & UninstallApp can be used to Install applications with Installer. Below shows an example of both, which is common in a update task. As can be seen, the package is being updated. Installer first removed the App, and replaces it with the new app (which is inside the zip package). CopyPath & RemovePath can technically be used for this too, but that does not reload the icon cache and may cause other issues.

<key>update</key>
<array>
<array>
<string>UninstallApp</string>
<string>mobileJuhu.app</string>
</array>
<array>
<string>InstallApp</string>
<string>mobileJuhu.app</string>
</array>




The post will be updated with more content later on.



 

Attachments

Last edited:

Avimo

New Member
2 May 2018
5
1
3
14
Long Island ,NY
How do you install installer 4 on a jailbroken 4s running 7.1.2? The one on the infini dev and hack your iPhone sources don’t have any packages. And why did you upload zip files of installer 1-4 to install with ssh or filza or iFile when there are jailbreak tools that install them automatically?
 

Sammy Guichelaar

Administrator
Staff member
Administrator
Premium Member
Developer
2 May 2018
40
13
8
The Netherlands
apptapp.me
Github
https://github.com/sammyguichelaar
User Role
Developer
Repository
http://samguichelaar.com
Support Email
[email protected]
How do you install installer 4 on a jailbroken 4s running 7.1.2? The one on the infini dev and hack your iPhone sources don’t have any packages. And why did you upload zip files of installer 1-4 to install with ssh or filza or iFile when there are jailbreak tools that install them automatically?
I will soon reopen a old repository for Installer 4, but this will be posted in the relevant section. And the second become some people want to mess with the files directly instead of extracting them from the jailbreaks.