diff options
| -rw-r--r-- | README.md | 183 |
1 files changed, 161 insertions, 22 deletions
| @@ -5,6 +5,21 @@ via USB.* | |||
| 5 | 5 | ||
| 6 |  | 6 |  |
| 7 | 7 | ||
| 8 | ## Table of Contents | ||
| 9 | - [Features](#features) | ||
| 10 | - [Building](#building) | ||
| 11 | - [Prerequisites](#prerequisites) | ||
| 12 | - [Linux (Debian/Ubuntu based)](#linux-debianubuntu-based) | ||
| 13 | - [macOS](#macos) | ||
| 14 | - [Windows](#windows) | ||
| 15 | - [Configuring the source tree](#configuring-the-source-tree) | ||
| 16 | - [Building and installation](#building-and-installation) | ||
| 17 | - [Usage](#usage) | ||
| 18 | - [Contributing](#contributing) | ||
| 19 | - [Links](#links) | ||
| 20 | - [License](#license) | ||
| 21 | - [Credits](#credits) | ||
| 22 | |||
| 8 | ## Features | 23 | ## Features |
| 9 | 24 | ||
| 10 | libirecovery is a cross-platform library which implements communication to | 25 | libirecovery is a cross-platform library which implements communication to |
| @@ -14,38 +29,164 @@ iBoot/iBSS found on Apple's iOS devices via USB. A command-line utility named | |||
| 14 | This is a fork of an older version from former openjailbreak.org and is meant to | 29 | This is a fork of an older version from former openjailbreak.org and is meant to |
| 15 | be used with [idevicerestore](https://github.com/libimobiledevice/idevicerestore.git/) from the [libimobiledevice](https://github.com/libimobiledevice/) project. | 30 | be used with [idevicerestore](https://github.com/libimobiledevice/idevicerestore.git/) from the [libimobiledevice](https://github.com/libimobiledevice/) project. |
| 16 | 31 | ||
| 17 | ## Installation / Getting started | 32 | ## Building |
| 33 | |||
| 34 | ### Prerequisites | ||
| 35 | |||
| 36 | You need to have a working compiler (gcc/clang) and development environent | ||
| 37 | available. This project uses autotools for the build process, allowing to | ||
| 38 | have common build steps across different platforms. | ||
| 39 | Only the prerequisites differ and they are described in this section. | ||
| 40 | |||
| 41 | libirecovery requires [libimobiledevice-glue](https://github.com/libimobiledevice/libimobiledevice-glue). | ||
| 42 | Check the [Building](https://github.com/libimobiledevice/libimobiledevice-glue?tab=readme-ov-file#building) | ||
| 43 | section of the README on how to build it. Note that some platforms might have it as a package. | ||
| 44 | |||
| 45 | #### Linux (Debian/Ubuntu based) | ||
| 46 | |||
| 47 | * Install all required dependencies and build tools: | ||
| 48 | ```shell | ||
| 49 | sudo apt-get install \ | ||
| 50 | build-essential \ | ||
| 51 | pkg-config \ | ||
| 52 | checkinstall \ | ||
| 53 | git \ | ||
| 54 | autoconf \ | ||
| 55 | automake \ | ||
| 56 | libtool-bin \ | ||
| 57 | libimobiledevice-glue-dev \ | ||
| 58 | libreadline-dev \ | ||
| 59 | libusb-1.0-0-dev | ||
| 60 | ``` | ||
| 61 | |||
| 62 | In case libimobiledevice-glue-dev is not available, you can manually build and install it. See note above. | ||
| 63 | |||
| 64 | #### macOS | ||
| 65 | |||
| 66 | * Make sure the Xcode command line tools are installed. Then, use either [MacPorts](https://www.macports.org/) | ||
| 67 | or [Homebrew](https://brew.sh/) to install `automake`, `autoconf`, `libtool`, etc. | ||
| 68 | |||
| 69 | Using MacPorts: | ||
| 70 | ```shell | ||
| 71 | sudo port install libtool autoconf automake pkgconfig | ||
| 72 | ``` | ||
| 73 | |||
| 74 | Using Homebrew: | ||
| 75 | ```shell | ||
| 76 | brew install libtool autoconf automake pkg-config | ||
| 77 | ``` | ||
| 18 | 78 | ||
| 19 | ### Debian / Ubuntu Linux | 79 | #### Windows |
| 80 | |||
| 81 | * Using [MSYS2](https://www.msys2.org/) is the official way of compiling this project on Windows. Download the MSYS2 installer | ||
| 82 | and follow the installation steps. | ||
| 83 | |||
| 84 | It is recommended to use the _MSYS2 MinGW 64-bit_ shell. Run it and make sure the required dependencies are installed: | ||
| 85 | |||
| 86 | ```shell | ||
| 87 | pacman -S base-devel \ | ||
| 88 | git \ | ||
| 89 | mingw-w64-x86_64-gcc \ | ||
| 90 | make \ | ||
| 91 | libtool \ | ||
| 92 | autoconf \ | ||
| 93 | automake-wrapper \ | ||
| 94 | pkg-config | ||
| 95 | ``` | ||
| 96 | NOTE: You can use a different shell and different compiler according to your needs. Adapt the above command accordingly. | ||
| 97 | |||
| 98 | ### Configuring the source tree | ||
| 99 | |||
| 100 | You can build the source code from a git checkout, or from a `.tar.bz2` release tarball from [Releases](https://github.com/libimobiledevice/libirecovery/releases). | ||
| 101 | Before we can build it, the source tree has to be configured for building. The steps depend on where you got the source from. | ||
| 102 | |||
| 103 | Since libirecovery depends on other packages, you should set the pkg-config environment variable `PKG_CONFIG_PATH` | ||
| 104 | accordingly. Make sure to use a path with the same prefix as the dependencies. If they are installed in `/usr/local` you would do | ||
| 20 | 105 | ||
| 21 | First install all required dependencies and build tools: | ||
| 22 | ```shell | 106 | ```shell |
| 23 | sudo apt-get install \ | 107 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig |
| 24 | build-essential \ | ||
| 25 | pkg-config \ | ||
| 26 | checkinstall \ | ||
| 27 | git \ | ||
| 28 | autoconf \ | ||
| 29 | automake \ | ||
| 30 | libtool-bin \ | ||
| 31 | libimobiledevice-glue-dev \ | ||
| 32 | libreadline-dev \ | ||
| 33 | libusb-1.0-0-dev | ||
| 34 | ``` | 108 | ``` |
| 35 | 109 | ||
| 36 | Then clone the actual project repository: | 110 | * **From git** |
| 111 | |||
| 112 | If you haven't done already, clone the actual project repository and change into the directory. | ||
| 113 | ```shell | ||
| 114 | git clone https://github.com/libimobiledevice/libirecovery | ||
| 115 | cd libirecovery | ||
| 116 | ``` | ||
| 117 | |||
| 118 | Configure the source tree for building: | ||
| 119 | ```shell | ||
| 120 | ./autogen.sh | ||
| 121 | ``` | ||
| 122 | |||
| 123 | * **From release tarball (.tar.bz2)** | ||
| 124 | |||
| 125 | When using an official [release tarball](https://github.com/libimobiledevice/libirecovery/releases) (`libirecovery-x.y.z.tar.bz2`) | ||
| 126 | the procedure is slightly different. | ||
| 127 | |||
| 128 | Extract the tarball: | ||
| 129 | ```shell | ||
| 130 | tar xjf libirecovery-x.y.z.tar.bz2 | ||
| 131 | cd libirecovery-x.y.z | ||
| 132 | ``` | ||
| 133 | |||
| 134 | Configure the source tree for building: | ||
| 135 | ```shell | ||
| 136 | ./configure | ||
| 137 | ``` | ||
| 138 | |||
| 139 | Both `./configure` and `./autogen.sh` (which generates and calls `configure`) accept a few options, for example `--prefix` to allow | ||
| 140 | building for a different target folder. You can simply pass them like this: | ||
| 141 | |||
| 142 | ```shell | ||
| 143 | ./autogen.sh --prefix=/usr/local | ||
| 144 | ``` | ||
| 145 | or | ||
| 37 | ```shell | 146 | ```shell |
| 38 | git clone https://github.com/libimobiledevice/libirecovery.git | 147 | ./configure --prefix=/usr/local |
| 39 | cd libirecovery | ||
| 40 | ``` | 148 | ``` |
| 41 | 149 | ||
| 42 | Now you can build and install it: | 150 | Once the command is successful, the last few lines of output will look like this: |
| 151 | ``` | ||
| 152 | [...] | ||
| 153 | config.status: creating config.h | ||
| 154 | config.status: executing depfiles commands | ||
| 155 | config.status: executing libtool commands | ||
| 156 | |||
| 157 | Configuration for libirecovery 1.2.0: | ||
| 158 | ------------------------------------------- | ||
| 159 | |||
| 160 | Install prefix: .........: /usr/local | ||
| 161 | USB backend: ............: IOKit | ||
| 162 | |||
| 163 | Now type 'make' to build libirecovery 1.2.0, | ||
| 164 | and then 'make install' for installation. | ||
| 165 | ``` | ||
| 166 | |||
| 167 | ### Building and installation | ||
| 168 | |||
| 169 | If you followed all the steps successfully, and `autogen.sh` or `configure` did not print any errors, | ||
| 170 | you are ready to build the project. This is simply done with | ||
| 171 | |||
| 43 | ```shell | 172 | ```shell |
| 44 | ./autogen.sh | ||
| 45 | make | 173 | make |
| 174 | ``` | ||
| 175 | |||
| 176 | If no errors are emitted you are ready for installation. Depending on whether | ||
| 177 | the current user has permissions to write to the destination directory or not, | ||
| 178 | you would either run | ||
| 179 | ```shell | ||
| 180 | make install | ||
| 181 | ``` | ||
| 182 | _OR_ | ||
| 183 | ```shell | ||
| 46 | sudo make install | 184 | sudo make install |
| 47 | ``` | 185 | ``` |
| 48 | 186 | ||
| 187 | If you are on Linux, you want to run `sudo ldconfig` after installation to | ||
| 188 | make sure the installed libraries are made available. | ||
| 189 | |||
| 49 | ## Usage | 190 | ## Usage |
| 50 | 191 | ||
| 51 | First of all attach your device to your machine. Make sure your device is not | 192 | First of all attach your device to your machine. Make sure your device is not |
| @@ -92,8 +233,6 @@ Please make sure your contribution adheres to: | |||
| 92 | * Try to split larger changes into individual commits of a common domain | 233 | * Try to split larger changes into individual commits of a common domain |
| 93 | * Use your real name and a valid email address for your commits | 234 | * Use your real name and a valid email address for your commits |
| 94 | 235 | ||
| 95 | We are still working on the guidelines so bear with us! | ||
| 96 | |||
| 97 | ## Links | 236 | ## Links |
| 98 | 237 | ||
| 99 | * Homepage: https://libimobiledevice.org/ | 238 | * Homepage: https://libimobiledevice.org/ |
| @@ -116,4 +255,4 @@ iPadOS, tvOS, watchOS, and macOS are trademarks of Apple Inc. | |||
| 116 | This project is an independent software library and has not been authorized, | 255 | This project is an independent software library and has not been authorized, |
| 117 | sponsored, or otherwise approved by Apple Inc. | 256 | sponsored, or otherwise approved by Apple Inc. |
| 118 | 257 | ||
| 119 | README Updated on: 2023-04-22 | 258 | README Updated on: 2024-03-23 |
