Tool to automate the process of embedding dynamic libraries into iOS applications from GNU/Linux. The tool should work for non-jailbroken iOS devices running iOS 9 or higher.
This command line tool takes as an input an iOS application (.ipa) file and a dynamic library file (.dylib). It then implements the executable modification, code signing, and application deployment in an automated fashion.
- IPA files without encryption nor Fairplay protection
- libimobiledevice / ideviceinstaller
- Valid provisioning profile - See Helper Scripts for more info.
libimobiledevice / ideviceinstaller
#From Source https://github.com/libimobiledevice/libimobiledevice
$ sudo dnf install libimobiledevice libimobiledevice-utils
$ sudo apt install libimobiledevice libimobiledevice-utils
More info @ http://www.libimobiledevice.org/
Since the master repository (https://github.com/Tyilo/insert_dylib) does not support Linux directly, we have forked it and made the modifications needed in order to port it to Linux. Our version of insert_dylib can be found in https://github.com/LeanVel/insert_dylib.
$ git https://github.com/LeanVel/insert_dylib $ cd insert_dylib $ ./Install.sh
To successfully sign the iOS binaries after inserting the dylib, the signer needs to support signing from scrach. Since the master repository for iSign (https://github.com/saucelabs/isign) does not support this feature, iInject uses the version implemented by ryu2 (https://github.com/ryu2/isign).
$ git clone https://github.com/ryu2/isign $ cd isign $ sudo python setup.py install
iInject was tested using the version of iSign backed up in this repository https://github.com/LeanVel/isign
$ ./iInject.sh <IPA File> <Dylib File>
In this project we also include two scripts that automates the generation of the provisioning profile required in the code signing step. These helper scripts require the AppleID and password of the user, in combination with the UUID of the device. Depending on the type of account one of these scripts should be used.
Individual/Enterprise Developer Accounts
For this type of account, the script genProvisioningProfileDev.rb should be used. This script uses the library spaceship provided by the project Fastlane to contact the Apple Developer Portal API and generate a provisioning profile.
Ruby and Gem installation
$ sudo dnf install ruby gem
$ sudo apt install ruby gem
$ sudo gem install fastlane
$ ./genProvisioningProfileDev.rb <user> <password> <iDevice UUID>
Free Apple Accounts
For this type of account, the script ./genProvisioningProfileFree.sh should be used. This script uses the curl and xmllint to contact the Apple Developer Portal API and generate a provisioning profile.
Curl and xmllint installation
$ sudo dnf install curl xmllint
$sudo apt install curl xmllint
$ ./genProvisioningProfileFree.sh <AppleID> <Password> <Device UUID>