{"id":13530768,"url":"https://github.com/libimobiledevice/idevicerestore","last_synced_at":"2025-05-14T09:06:24.214Z","repository":{"id":38361598,"uuid":"13831185","full_name":"libimobiledevice/idevicerestore","owner":"libimobiledevice","description":"Restore/upgrade firmware of iOS devices","archived":false,"fork":false,"pushed_at":"2025-03-27T00:52:17.000Z","size":1147,"stargazers_count":1490,"open_issues_count":297,"forks_count":423,"subscribers_count":90,"default_branch":"master","last_synced_at":"2025-05-14T09:04:08.071Z","etag":null,"topics":["c","firmware","idevicerestore","ios","ipsw","restore","shsh","signing"],"latest_commit_sha":null,"homepage":"https://libimobiledevice.org","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libimobiledevice.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-10-24T12:16:31.000Z","updated_at":"2025-05-14T04:57:57.000Z","dependencies_parsed_at":"2023-09-29T11:39:57.306Z","dependency_job_id":"887e0289-c6cb-4d1c-adce-60c868ebabaa","html_url":"https://github.com/libimobiledevice/idevicerestore","commit_stats":{"total_commits":925,"total_committers":31,"mean_commits":"29.838709677419356","dds":"0.43675675675675674","last_synced_commit":"bb5591d690a057fbc6533df2617189005ea95f40"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libimobiledevice%2Fidevicerestore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libimobiledevice%2Fidevicerestore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libimobiledevice%2Fidevicerestore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libimobiledevice%2Fidevicerestore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libimobiledevice","download_url":"https://codeload.github.com/libimobiledevice/idevicerestore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254110374,"owners_count":22016391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","firmware","idevicerestore","ios","ipsw","restore","shsh","signing"],"created_at":"2024-08-01T07:00:54.955Z","updated_at":"2025-05-14T09:06:24.186Z","avatar_url":"https://github.com/libimobiledevice.png","language":"C","readme":"# idevicerestore\n\n*A command-line application to restore firmware files to iOS devices.*\n\n![](https://github.com/libimobiledevice/idevicerestore/actions/workflows/build.yml/badge.svg)\n\n## Table of Contents\n- [Features](#features)\n- [Building](#building)\n  - [Prerequisites](#prerequisites)\n    - [Linux (Debian/Ubuntu based)](#linux-debianubuntu-based)\n    - [macOS](#macos)\n    - [Windows](#windows)\n  - [Configuring the source tree](#configuring-the-source-tree)\n  - [Building and installation](#building-and-installation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [Links](#links)\n- [License](#license)\n- [Credits](#credits)\n\n## Features\n\nThe idevicerestore application is a full reimplementation of all granular steps\nwhich are performed during the restore of a firmware to a device.\n\nIn general, upgrades and downgrades are possible, however subject to\navailability of SHSH blobs from Apple for signing the firmware files.\n\nSome key features are:\n\n- **Restore:** Update firmware on iOS devices\n- **Firmware:** Use official IPSW firmware archive file or a directory as source\n- **Update:** Allows updating the device by default or erasing all data\n- **Download:** On demand download of latest available firmware for a device\n- **Cache:** Downloaded firmware files are cached locally\n- **Custom Firmware:** Restore custom firmware files *(requires bootrom exploit)*\n- **Baseband:** Allows you to skip NOR/Baseband upgrade\n- **SHSH:** Fetch TSS records and save them as \".shsh\" files\n- **DFU:** Put devices in pwned DFU mode *(limera1n devices only)*\n- **AP Ticket:** Use custom AP ticket from a file\n- **Cross-Platform:** Tested on Linux, macOS, Windows and Android platforms\n- **History:** Developed since 2010\n\n**WARNING:** This tool can easily __destroy your user data__ irreversibly.\n\nUse with caution and make sure to backup your data before trying to restore.\n\n**In any case, usage is at your own risk.**\n\n## Building\n\n### Prerequisites\n\nYou need to have a working compiler (gcc/clang) and development environent\navailable. This project uses autotools for the build process, allowing to\nhave common build steps across different platforms.\nOnly the prerequisites differ and they are described in this section.\n\n#### Linux (Debian/Ubuntu based)\n\n* Install all required dependencies and build tools:\n  ```shell\n  sudo apt-get install \\\n  \tbuild-essential \\\n  \tpkg-config \\\n  \tcheckinstall \\\n  \tgit \\\n  \tautoconf \\\n  \tautomake \\\n  \tlibtool-bin \\\n  \tlibreadline-dev \\\n  \tlibusb-1.0-0-dev \\\n  \tlibplist-dev \\\n  \tlibimobiledevice-dev \\\n  \tlibimobiledevice-glue-dev \\\n  \tlibtatsu-dev \\\n  \tlibcurl4-openssl-dev \\\n  \tlibssl-dev \\\n  \tlibzip-dev \\\n  \tzlib1g-dev\n  ```\n  NOTE: [libtatsu](https://github.com/libimobiledevice/libtatsu) (and thus `libtatsu-dev`)\n  is a new library that was just published recently, you have to\n  [build it from source](https://github.com/libimobiledevice/libtatsu?tab=readme-ov-file#building).\n  Also, other `*-dev` packages might not be available for your distribution,\n  so you will have to build these packages on your own as well.\n\n#### macOS\n\n* Make sure the Xcode command line tools are installed.\n\n  **Option 1**:\n  The easiest way to build and install `idevicerestore` for macOS is using\n  the following build script which will do the work for you, it will build\n  and install all required dependencies:\n  ```bash\n  mkdir -p limd-build\n  cd limd-build\n  curl -o ./limd-build-macos.sh -L https://is.gd/limdmacos\n  bash ./limd-build-macos.sh\n  ```\n  Follow the prompts of the script and you should have a working `idevicerestore`\n  available.\n\n  **Option 2**:\n  Use either [MacPorts](https://www.macports.org/)\n  or [Homebrew](https://brew.sh/) to install `automake`, `autoconf`, and `libtool`.\n\n  Using MacPorts:\n  ```shell\n  sudo port install libtool autoconf automake\n  ```\n\n  Using Homebrew:\n  ```shell\n  brew install libtool autoconf automake\n  ```\n\n  `idevicerestore` has a few dependencies from the libimobiledevice project.\n  You will have to build and install the following:\n  * [libplist](https://github.com/libimobiledevice/libplist)\n  * [libimobiledevice-glue](https://github.com/libimobiledevice/libimobiledevice-glue)\n  * [libusbmuxd](https://github.com/libimobiledevice/libusbmuxd)\n  * [libimobiledevice](https://github.com/libimobiledevice/libimobiledevice)\n  * [libirecovery](https://github.com/libimobiledevice/libirecovery)\n  * [libtatsu](https://github.com/libimobiledevice/libtatsu)\n\n  Check their `README.md` for building and installation instructions.\n\n#### Windows\n\n* Using [MSYS2](https://www.msys2.org/) is the official way of compiling this project on Windows. Download the MSYS2 installer\n  and follow the installation steps.\n\n  It is recommended to use the _MSYS2 MinGW 64-bit_ shell. Run it and make sure the required dependencies are installed:\n\n  ```shell\n  pacman -S base-devel \\\n  \tgit \\\n  \tmingw-w64-x86_64-gcc \\\n  \tmake \\\n  \tlibtool \\\n  \tautoconf \\\n  \tautomake-wrapper \\\n  \tpkg-config \\\n  \tlibcurl-devel \\\n  \tmingw-w64-x86_64-libzip\n  ```\n  NOTE: You can use a different shell and different compiler according to your needs. Adapt the above command accordingly.\n\n  `idevicerestore` has a few dependencies from the libimobiledevice project.\n  You will have to build and install the following:\n  * [libplist](https://github.com/libimobiledevice/libplist)\n  * [libimobiledevice-glue](https://github.com/libimobiledevice/libimobiledevice-glue)\n  * [libusbmuxd](https://github.com/libimobiledevice/libusbmuxd)\n  * [libimobiledevice](https://github.com/libimobiledevice/libimobiledevice)\n  * [libirecovery](https://github.com/libimobiledevice/libirecovery)\n  * [libtatsu](https://github.com/libimobiledevice/libtatsu)\n\n  Check their `README.md` for building and installation instructions.\n\n\n### Configuring the source tree\n\nYou can build the source code from a git checkout, or from a `.tar.bz2` release tarball from [Releases](https://github.com/libimobiledevice/idevicerestore/releases).\nBefore we can build it, the source tree has to be configured for building. The steps depend on where you got the source from.\n\n* **From git**\n\n  If you haven't done already, clone the actual project repository and change into the directory.\n  ```shell\n  git clone https://github.com/libimobiledevice/idevicerestore.git\n  cd idevicerestore\n  ```\n\n  Configure the source tree for building:\n  ```shell\n  ./autogen.sh\n  ```\n\n* **From release tarball (.tar.bz2)**\n\n  When using an official [release tarball](https://github.com/libimobiledevice/idevicerestore/releases) (`idevicerestore-x.y.z.tar.bz2`)\n  the procedure is slightly different.\n\n  Extract the tarball:\n  ```shell\n  tar xjf idevicerestore-x.y.z.tar.bz2\n  cd idevicerestore-x.y.z\n  ```\n\n  Configure the source tree for building:\n  ```shell\n  ./configure\n  ```\n\nBoth `./configure` and `./autogen.sh` (which generates and calls `configure`) accept a few options, for example `--prefix` to allow\nbuilding for a different target folder. You can simply pass them like this:\n\n```shell\n./autogen.sh --prefix=/usr/local\n```\nor\n```shell\n./configure --prefix=/usr/local\n```\n\nOnce the command is successful, the last few lines of output will look like this:\n```\n[...]\nconfig.status: creating config.h\nconfig.status: config.h is unchanged\nconfig.status: executing depfiles commands\nconfig.status: executing libtool commands\n\nConfiguration for idevicerestore 1.1.0:\n-------------------------------------------\n\n  Install prefix: .........: /usr/local\n\n  Now type 'make' to build idevicerestore 1.1.0,\n  and then 'make install' for installation.\n```\n\n**Important**\n\nidevicerestore requires a properly installed [usbmuxd](https://github.com/libimobiledevice/usbmuxd.git)\nfor the restore procedure. Please make sure that it is either running or\nconfigured to be started automatically as soon as a device is detected\nin normal and/or restore mode. If properly installed this will be handled\nby udev/systemd.\n\n## Usage\n\nThe primary scenario is to restore a new firmware to a device.\nFirst of all attach your device to your machine.\n\nThen simply run:\n```shell\nidevicerestore --latest\n```\n\nThis will print a selection of firmware versions that are currently being signed\nand can be restored to the attached device. It will then attempt to download and\nrestore the selected firmware.\n\nBy default, an update restore is performed which will preserve user data.\n\nMind that if the firmware file does not contain a 'Customer Upgrade Install'\nvariant, an erase restore will be performed.\n\nYou can force restoring with erasing all data and basically resetting the device\nby using:\n```shell\nidevicerestore --erase --latest\n```\n\nPlease consult the usage information or manual page for a full documentation of\navailable command line options:\n```shell\nidevicerestore --help\nman idevicerestore\n```\n\n### Docker\n\nBuild the container with `build.sh` in the docker folder, which will build a\ndocker container with the latest source versions of all the required libraries.\n\nRun the container with `run.sh --latest` in the docker folder,\nwhich will execute `usbmuxd` in the background, and then start `idevicerestore --latest`.\nAny arguments passed to `run.sh` will be passed in to `idevicerestore`.\n\n## Contributing\n\nWe welcome contributions from anyone and are grateful for every pull request!\n\nIf you'd like to contribute, please fork the `master` branch, change, commit and\nsend a pull request for review. Once approved it can be merged into the main\ncode base.\n\nIf you plan to contribute larger changes or a major refactoring, please create a\nticket first to discuss the idea upfront to ensure less effort for everyone.\n\nPlease make sure your contribution adheres to:\n* Try to follow the code style of the project\n* Commit messages should describe the change well without being too short\n* Try to split larger changes into individual commits of a common domain\n* Use your real name and a valid email address for your commits\n\n## Links\n\n* Homepage: https://libimobiledevice.org/\n* Repository: https://github.com/libimobiledevice/idevicerestore.git\n* Repository (Mirror): https://git.libimobiledevice.org/idevicerestore.git\n* Issue Tracker: https://github.com/libimobiledevice/idevicerestore/issues\n* Mailing List: https://lists.libimobiledevice.org/mailman/listinfo/libimobiledevice-devel\n* Twitter: https://twitter.com/libimobiledev\n\n## License\n\nThis project is licensed under the [GNU Lesser General Public License v3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html),\nalso included in the repository in the `COPYING` file.\n\n## Credits\n\nApple, iPhone, iPad, iPod, iPod Touch, Apple TV, Apple Watch, Mac, iOS,\niPadOS, tvOS, watchOS, and macOS are trademarks of Apple Inc.\n\nThis project is an independent software application and has not been\nauthorized, sponsored, or otherwise approved by Apple Inc.\n\nREADME Updated on: 2024-10-22\n","funding_links":[],"categories":["Uncategorized","C"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibimobiledevice%2Fidevicerestore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibimobiledevice%2Fidevicerestore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibimobiledevice%2Fidevicerestore/lists"}