iOS 3.1 [HOW TO] Compile iDeviceRestore on Ubuntu

Discussion in 'iOS Jailbreak & Cydia' started by tanktan38, Jul 7, 2010.

  1. tanktan38

    tanktan38 Active Member

    Joined:
    Dec 29, 2009
    Messages:
    1,085
    Likes Received:
    15
    Device:
    3G iPod touch
    How to Compile iDeviceRestore on Ubuntu
    By TankTan38

    Hello again! I'm here with another tutorial on how to compile iDeviceRestore on Ubuntu. Hope this helps!When there is a step with a box that looks something like this:

    Code:
    blah blah blah
    you should type (or copy & paste) its contents into terminal and hit enter unless otherwise noted.

    Prerequisites:

    You need Ubuntu 10.04 for this to be successful. If you don't already have it, use the "Update Manager" to upgrade up until you have 10.04. You also need to be connected to the internet.

    Part A: Installation

    Step 1:

    Open up Terminal.

    Step 2:

    To start off, we will be installing the dependencies (or even the dependencies of the dependencies) of iDeviceRestore. WHAT? What you're basically doing is installing the software required to run iDeviceRestore successfully.

    Type this into terminal and hit enter:

    Code:
    sudo apt-get install build-essential automake cmake autoconf
    NOTE: When installing the dependencies, look back at what it said. If it had any errors, post them in this thread and we'll try to help you. If at any time Terminal asks you something like, "Would you like to install? [Y/N]", just type "y" without the quotes and press enter.

    Step 3:

    Type this into terminal and hit enter:

    Code:
    sudo apt-get install libreadline6 autotools-dev libcurl4-openssl-dev
    Step 4:

    Type this into terminal and hit enter:

    Code:
    sudo apt-get install libplist1 libplist-utils libplist-dev libplist++-dev
    Step 5:

    Type this into terminal and hit enter:

    Code:
    sudo apt-get install libzip-dev git-core git-arch git-cvs git-svn git-email
    Step 6:

    Type this into terminal and hit enter:

    Code:
    sudo apt-get install git-daemon-run gitk gitweb git-doc rsync curl libgnutls-dev libtool
    Step 7:

    Type this into terminal and hit enter:

    Code:
    sudo apt-get install python-dev libreadline-dev libusb-dev
    Step 8:

    Now we are going to download the required software sources from GIT and compile them.

    Type this into terminal and hit enter:

    Code:
    git clone git://git.marcansoft.com/usbmuxd.git
    Step 9:

    Type this into terminal and hit enter:

    Code:
    cd usbmuxd
    Step 10:

    Type this into terminal and hit enter:

    Code:
    cmake ~/usbmuxd
    Step 11:

    Type this into terminal and hit enter:

    Code:
    make && sudo make install
    Step 12:

    Type this into terminal and hit enter:

    Code:
    cd ~
    Step 13:

    Type this into terminal and hit enter:

    Code:
    git clone http://github.com/chronicdev/libirecovery.git
    Step 14:

    Type this into terminal and hit enter:

    Code:
    cd libirecovery
    Step 15:

    Type this into terminal and hit enter:

    Code:
    make linux && sudo make install
    Step 16:

    Type this into terminal and hit enter:

    Code:
    cd ~
    Step 17:

    Type this into terminal and hit enter:

    Code:
    git clone http://git.sukimash*ta.com/libimobiledevice.git
    Step 18:

    Type this into terminal and hit enter:

    Code:
    cd libimobiledevice
    Step 19:

    Type this into terminal and hit enter:

    Code:
    ./autogen.sh
    Step 20:

    Type this into terminal and hit enter:

    Code:
    make && sudo make install
    Step 21:

    Type this into terminal and hit enter:

    Code:
    sudo ldconfig
    Step 22:

    Now it's time to actually install iDeviceRestore.

    Type this into terminal and hit enter:

    Code:
    cd ~
    Step 23:

    Type this into terminal and hit enter:

    Code:
    git clone http://github.com/posixninja/idevicerestore.git
    Step 24:

    Type this into terminal and hit enter:

    Code:
    cd idevicerestore
    Step 25:

    Type this into terminal and hit enter:

    Code:
    ./autogen.sh
    Step 26:

    Type this into terminal and hit enter:

    Code:
    make && sudo make install
    Step 27:

    Type this into terminal and hit enter:

    Code:
    sudo ldconfig
    If you have an iPod touch, skip to Part B. If you have an iPhone, continue.

    Step 28:

    Now to compile iDeviceActivate to activate your iPhone.

    Type this into terminal and hit enter:

    Code:
    git clone http://github.com/posixninja/ideviceactivate.git
    Step 29:

    Type this into terminal and hit enter:

    Code:
    cd ideviceactivate 
    Step 30:

    Type this into terminal and hit enter:

    Code:
    make
    Congrats! If all went well, you now have iDeviceRestore installed on Ubuntu!

    Part B: Usage

    Now it's time to actually use iDeviceRestore (and iDeviceActivate).

    How to Restore with Custom Firmware:

    Step 1:

    Place an .ipsw file in the "Home" folder.

    Step 2:

    Type this into terminal, replacing the * with the name of the .ipsw, and press enter.

    Code:
    idevicerestore -c *.ipsw

    Other things you can do with iDeviceRestore:

    Step 1:

    Type this into terminal, then press enter.

    Code:
    idevicerestore -h
    This should show this:

    Code:
    idevicerestore [-d] [-u] [-c] [-v] [-h] <input.ipsw>
    
      -d, enable communication debugging
      -u, target specific device by its 40-digit device UUID
      -h, prints usage information
      -c, restore with a custom firmware
      -v, enable incremental levels of verboseness
    Use any of those commands to achieve what you want it to do.

    For iPhone users (iDeviceActivate):

    Just type "./ideviceactivate" then type one of the commands described below. For example:

    Code:
    ./ideviceactivate -f
    would activate the device.

    Here is the list of commands:

    ./ideviceactivate [-x] [-d] [-h] [-u] [-f]

    -x deactivate the target device
    -d enable communication debugging
    -h prints usage information
    -u UUID target specific device by its 40-digit device UUID
    -f FILE activates device with local activation record


    Thanks for reading my guide! Please don't post this guide on any other site; just link it.

    Sites allowed to serve this guide directly:
    http://www.ifans.com
    Last edited: Jul 7, 2014
  2. bobby681

    bobby681 Active Member

    Joined:
    Jun 24, 2008
    Messages:
    2,588
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
    Very nice, thanks for that
  3. Tkf1

    Tkf1 Community Development Staff Member

    Joined:
    Oct 12, 2009
    Messages:
    17,397
    Likes Received:
    2,488
    Device:
    iPad mini
    Can this be ported to Windows after it's complied?
  4. tanktan38

    tanktan38 Active Member

    Joined:
    Dec 29, 2009
    Messages:
    1,085
    Likes Received:
    15
    Device:
    3G iPod touch
    No but you could somehow try to compile it on Windows.
    ------------------double post merged------------------
    Mods, if this is in the wrong section, please move it.
  5. b-mac 39

    b-mac 39 Well-Known Member

    Joined:
    Dec 15, 2009
    Messages:
    5,809
    Likes Received:
    60
    Device:
    iPhone 4S (White)
  6. tanktan38

    tanktan38 Active Member

    Joined:
    Dec 29, 2009
    Messages:
    1,085
    Likes Received:
    15
    Device:
    3G iPod touch
    Thanks!
  7. magic8ball88

    magic8ball88 Active Member

    Joined:
    Sep 9, 2009
    Messages:
    2,123
    Likes Received:
    2
    Device:
    iPhone 4S (White)
    Maybe this isn't the right place to ask but is this capable of downgrading new devices without shsh's?
  8. tanktan38

    tanktan38 Active Member

    Joined:
    Dec 29, 2009
    Messages:
    1,085
    Likes Received:
    15
    Device:
    3G iPod touch
    Nope. That's what I originally thought, but after it was too late, I found out that it does require SHSH blobs.
  9. tabrisli

    tabrisli New Member

    Joined:
    Jul 12, 2010
    Messages:
    1
    Likes Received:
    0
    So if SHSH blobs are required that means you won't be able to downgrade without SHSH blobs? lol what?

    So er, why bother such a round about process in downgrading if you have the SHSH blobs in the first place?

    I thought iDeviceRestore doesn't need shsh blobs which is why its such a good idea... now it seems its just a more difficult way of downgrading?

    Darned, is there no hope for users without SHSH blobs ever~

    Please Register or Log in to view images

  10. b-mac 39

    b-mac 39 Well-Known Member

    Joined:
    Dec 15, 2009
    Messages:
    5,809
    Likes Received:
    60
    Device:
    iPhone 4S (White)
    Spirit, anyone?

Share This Page