How to install a Fastboot Package

On this page, you can learn how to restore your phone to the original factory software using a fastboot Cyanogen OS Package.

Back to the downloads page

This process is for advanced users only and erases all contents of your phone. If you just want to update your phone, please use the Standard Package instead. Be sure to backup all important data before you proceed!
  1. Download the fastboot package to a new folder on your computer. In this example, I've named it "fastboot-package".
  2. Extract the zipped package using any ZIP file extraction tool.
  3. Turn off your phone
  4. Press both the Power and Volume Up buttons at the same time1
  5. You'll should see "Fastboot mode" on the screen of your phone.
  6. On your computer, you'll need to have the "ADB and Fastboot" tools installed. Install these using the awesome guide from XDA Developers
  7. Once you have the fastboot tools installed, navigate to the "fastboot-package" folder. Open a Command Prompt (Windows) or Terminal (MacOS / Linux) in this folder
  8. Type the following in the prompt window:
    fastboot devices

    It should list your device. If it does not detect your device, make sure you have installed the appropriate "ADB drivers" for your device (Google should be your friend to get these)

  9. To begin installing the package (flashing), you'll need to unlock the device's bootloader. To do so, type the following command in the command prompt or terminal:
    fastboot oem unlock
  10. Confirm the operation. The phone will reboot now, but you'll need to turn it of and reboot it back into Fastboot Mode (see steps 3 and 4)
  11. Once back in Fastboot mode, start by re-installing the modem firmware / baseband:
    Make sure you've downloaded a package for the right phone! If not, the following commands may BRICK your phone!

    Mac / Linux:

    Type the following command in the terminal:


    This will automatically install all modem firmware components for you.


    Unfortunately, the Windows command prompt cannot execute .sh files. Therefore, you'll need to open the file with a text editor and copy all "fastboot" commands of it

    Type or paste these commands into the command prompt exactly in the same order as they are listed in the .sh file!

  12. Now, it's time to re-install the operating system itself:

    Type the following commands in the command prompt or terminal:

    						fastboot flash boot boot.img
    						fastboot flash recovery recovery.img
    						fastboot flash cache cache.img
    						fastboot flash system system.img
  13. Next, it's time to re-install the user data partition of the phone. This is usually located in a file called "userdata.img"
    For some devices, this step varies if you have a device with more or less storage space.

    For example, the OnePlus One package contains both "userdata.img" and "userdata_64G.img". The first file is for the 16GB version and the second file is for the 64GB version. Make sure to install the file for the right amount of storage space!

    Type the following command with the correct file name in the command prompt or terminal:

    fastboot flash userdata <YOUR_USERDATA_FILE.img>
  14. If you are not going to make any unofficial modifications to your phone (such as rooting), it's time to re-lock the bootloader. This ensures all apps keep working (some apps refuse to work if the bootloader is unlocked)

    To re-lock the bootloader, type the following command in the command prompt or terminal:

    fastboot oem lock
  15. Finally, it's time to reboot your phone.

    To reboot your phone, type the following command in the command prompt or terminal:

    fastboot reboot
  16. Congratulations, your phone should now be running the freshly-applied factory software!
1 If you have a ZUK Z1, you'll need to press both the Power, Volume Down and Volume Up buttons to access Fastboot Mode.