How to install ClockworkMod Recovery and CyanogenMod on Samsung Galaxy S3

Screenshot: CyanogenMod loading on GT-I9300In this article I will describe how to install ClockworkMod Recovery and CyanogenMod on the Samsung Galaxy S3. By installing CyanogenMod your device will also be rooted. I have written this post while I was installing ClockworkMod Recovery and CyanogenMod on my own Samsung Galaxy S3 GT-i9300 (International). I provided the specific software download locations for the GT-i9300 and also the general download links in case you have an other model of the S3. You may also consider taking a look at the tutorial from the CyanogenMod website for your specific device. Also make sure that you have enough battery life throughout the whole installation procedure and to read the disclaimer before starting to follow this guide!

Disclaimer – Read before proceeding:
This article is based on my personal notes and experiences throughout the installation process of ClockworkMod Recovery and CyanogenMod on my Samsung Galaxy S3 GT-i9300 (international). The described methods worked for me and my specific device just fine, but I will take absolutely no responsibility for any data loss or damage to your smartphone. Only proceed if you know what you are doing and proceed with care.

0. Preparations
1. Downloading CyanogenMod & Google Apps
2. Downloading ClockworkMod Recovery & Heimdall Suite
3. Installing ClockworkMod Recovery
4. Installing CyanogenMod & Google Apps

0. Preparations

  1. Identify your device modelnumber
    In order to download the proper version of ClockworkMod Recovery and CyanogenMod, it is important to know the modelnumber of your Samsung Galaxy S3. Take your smartphone and open the “settings”, at the bottom of the settings screen choose “about phone” and there you will find the modelnumber. The modelnumber of my device is “GT-i9300”, also called Samsung Galaxy S3 International.

  2. Backup your data from your phone:
    By installing CyanogenMod, the internal storage and virtual sdcard (the /sdcard folder) will be formated, it is important to backup the data from your phone e.g. the phonebook, photos and so on. You may do this by copying everything you want to keep onto your phones external sdcard, transferring it to your PCs hard drive or moving your stuff into any cloud storage like Dropbox or Google Drive. If you have already rooted your device, then you can install Titanium Backup from Google Play. This app allows you to backup and restore all your apps including the app-data like settings or savegames.

  3. Install the Android Developer Tools on your computer:
    You will need the Android Debugging Bridge (ADB) which is a part of the Android Developer Tools (ADT) in order to be able to detect a smartphone connected to your PC and to transfer data between the PC and Smartphone. You can download it from the Android Developers website. I downloaded the ADT-Bundle-linux-x86_64Bit version, if you have a 32Bit system you may want to download the ADT-Bundle-linux-x86_32Bit version. Extract the downloaded archive to a location of your choice on your filesystem. Example, extract the archive into the subfolder “programs” of your home directory:

    $ unzip -d ~/programs/

    Like I mentioned before, we will need a tool called “adb” to establish the connection between PC and Smartphone. This tool is located in the subdirectory sdk/plattform-tools/ of the previously extracted Android Developer Tools. Since we don’t want to change into that folder everytime we want to use adb, it is a good idea to make adb executeable from anywhere, by adding a softlink to /usr/local/bin folder. This can be done like this (depending on where you extracted the archive you may need to change the path to adb), example:

    $ sudo ln -s /home/myUsername/programs/android-sdk-linux/platform-tools/adb 

    Now you should be able to execute “adb” from any location in the filesystem by simply typing adb in the terminal.

  4. Enable USB Debugging on your phone:
    You need to enable the USB Debuggin option on your Smartphone in order to be able to establish a connection to the PC via USB cable. Open Settings>Developer options on your smartphone and enable the USB Debugging option.

    If you don’t have the Developer options entry in the settings, open Settings>About phone and tap multiple times on the Build number entry. This should enable the Developer options in the Settings menu.

  5. Learn how to connect the phone to your PC:
    In some steps of this “How to” you will be told to connect your phone with the USB cable to your PC. Every time you connect the phone to the PC you should make shure that it is detected properly and that the connection has been established. Do this by executing this command:

    $ adb devices

    This will start the adb daemon and try to find any android devices connected to your PC. If everything worked properly you should see a outout listing your device, it should look like this:

    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    List of devices attached 
    1ff154d862c0cff8	device

    If the output says no permission, your device is not detected or there is any other kind of problem: Kill the adb process, e.g. like this:

    $ pkill adb

    and retry. If it still dosn't work, it could be a permission problem, so try to execute adb devices as root.

1. Downloading CyanogenMod & Google Apps

  1. Download the latest stable version of CyanogenMod
    Download CyanogenMod for your specific device from here: CyanogenMod Device Selection.
    Since mine is a GT-i9300 (International) I downloaded the latest stable version from here: Download CyanogenMod 10.2 for i9300

  2. Optionally download the Google-Apps
    This step is optionally, but recommended. The Google Play App-Store is not included in CyanogenMod. If you wish to use Google App market place, you will also have to download the Google-Apps package based on your CyanogenMod version. You can download the right version for your CyanogenMod from here: Google-Apps

  3. Copy the zip-files to your phones sdcard
    Copy the zip-file of the CyanogenMod image (and the Google-Apss zip-file) into the root directory of your phones virtual (/sdcard) or external sdcard (storage/extSdCard/). Since you should already have installed ADB (if not read the preparations chapter) you can do this via terminal like this:

    $ adb push /sdcard/


    $ adb push /storage/extSdCard/

    Of course you can also transfer the files via network or even directly download them to your smartphone. If you have an external sdcard you can simply put it into your PC and copy the files directly into the root directory.

2. Downloading ClockworkMod Recovery & Heimdall Suite

  1. Download ClockworkMod Recovery
    Download the latest version of ClockworkMod Recovery for your device to your PC:
    ClockworkMod Download Page
    I downloaded this version with touchscreen support for my GT-i9300:

  2. Download Heimdall suite
    Download the Heimdall Suite to your PC. The Heimdall Suite will be used to flash the ClockworkMod Recovery image to your smartphone.
    Heimdall Suite 1.4RC1 Binary 32bit
    Heimdall Suite 1.4RC1 Binary 64bit
    Unpack the archive after the download has completed

    $ tar -xf heimdall_v1.4rc1_x64.tar

    and place the Heimdall binary into the same folder as the previously downloaded ClockworkMod recovery image.

3. Installing ClockworkMod Recovery

  1. Boot your smartphone into "Download Mode"
    • Power off your smartphone
    • Boot your smartphone into "Download Mode" by holding Home & Volume Down & Power the same time
    • Accept the appearing Disclaimer/Warnings by pressing the "Volume Up" key. Your phone should now be in Download Mode
    • 1 download mode

      Download Mode

  2. Installing and booting into ClockworkMod Recovery
    • First connect your smartphones USB-Cable to the Computer (not into an USB-HUB) and then to the smartphone
    • Open a terminal on your PC, change into the Heimdall and ClockworkMod recovery folder and start the installation like this (where "cwm-touch-" is the filename of the ClockworkMod recovery image):
      $ sudo heimdall flash --recovery cwm-touch- --no-reboot

      You should see a blue status bar filling up on your smartphones screen and the installation should be finished really quickly. The output of Heimdall should look like this:

      Initialising connection...
      Detecting device...
      Claiming interface...
      Attempt failed. Detaching driver...
      Claiming interface again...
      Setting up interface...Checking if protocol is initialised...
      Protocol is not initialised.Initialising protocol...
      Protocol initialisation successful.Beginning session...
      Session begun.Downloading device's PIT file...
      PIT file download successful.Uploading RECOVERY
      RECOVERY upload successfulEnding session...
      Releasing device interface...
      Re-attaching kernel driver...
    • Now reboot your phone into ClockworkMod Recovery by holding Home & Volume Up & Power the same time and let go when you see the Samsung Galaxy S3 logo. Make sure to don't boot back into Android. if you boot back into android your recovery will be reset and you have to redo the process!
    • 2 flashed recovery

      Recovery upload success

4. Installing CyanogenMod & Google Apps

At this point you should be in ClockworkMod Recovery

  1. Optionally: Make a full system backup
    This step is optionally but highly recommended. A full system backup enables you to rollback everything like it was before installing CyanogenMod. You will be able to restore the stock Android with all your data and installed apps.

    • Select backup and restore
    • From the next screen choose how you want to do the backup. I choose "backup to external sdcard" (/storage/sdcard1). Wait for the backup to end, this will take some time depending on how much data you have
    • Go back to the main menu/screen
    • 4 backup menu

      The backup menu

      5 backup running

      Running backup

      6 backup complete

      Backup complete

  2. Wipe all data from the device
    • Select the option "wipe data/factory reset"
    • Then choose "Yes - Wipe all user data"
    • 7 wipe data

      Wiping data

  3. Install CyanogenMod and Google Apps
    • Select "install zip from sdcard"
    • Then select "choose zip from sdcard" or "choose zip from external sdcard" (depending on where you put the zip-file of the CyanogenMod image) and select the CyanogenMod zip-file
    • Confirm your selection by choosing "Yes - install". Now the installation process should start.
    • If you also want to install the Google-Apps redo the same steps, but choose the Google-Apps zip-file instead of the CyanogenMod zip-file
    • When the installation is finished go back to the main menu and select "reboot system now"
    • 8 installing cm

      CyanogenMod installation

      9 booting cm

      CynaogenMod loading screen

Now you should see the CyanogenMod loading screen. Congratulations, you have successfully installed ClockworkMod Recovery and CyanogenMod on your Samsung Galaxy S III!

Related articles:

Legal notice: all images in this post (including the title image) are screenshots/photos taken from my phone. All rights to the cyanogenmod logo and android logo belong to their respective owners.


About M0nk3ym0nk3y

M0nk3ym0nk3y is one of the three LinuxM0nk3ys from Linux M0nk3ys @ WordPress Linux M0nk3ys @ YouTube Linux M0nk3ys @ Twitter

Posted on October 17, 2013, in Android, Install and tagged , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink. 17 Comments.

  1. Thanks to Drunk3nm0nk3y. This worked for me, too and I’m very happy with CyanogenMod.

  2. Thank you so much for the tutorial. Worked like a charm!

  3. This cyanogenmod installation does not work for me. I have tried many different ways to prevent the problem but none have worked. I go to install the package but it gives me a (status 7) error. Which is basically saying my phone is the incorrect one for the package, when it is not. Please if you have any helping suggestions reply. Thanks

    • Hi Franco,
      so you are stuck at step 4.3 of the tutorial (installing cyanogenmod) and CWM Recovery gives you a “status 7” error code? I did some research on this issue and found out that it is a well known problem. Every ROM comes with an file called “updater-script”, this file contains a list of device modellnumbers, which are supported by the ROM. When you try to install a ROM, the installer checks if your device name is specified in the ROMs updater-script. As you already mentioned the status 7 code tells you that the ROM doesn’t support your device.

      I assume that you are absolutely sure that you have installed the latest version of Clockworkmod Recovery for your device and downloaded the right version of Cyanogenmod for your device. In this case there are some things you can try to solve the problem. Here are the things I would try before doing anything else:
      1) Check again if you really have downloaded the right version of CWM and CyanogenMod 😉
      2) Update the installed android to the latest version (I assume you still have the stock Android from Samsung) by using the automatic update mechanism and retry installing CyanogenMod
      3) Try to install an older version of Cyanogenmod e.g (this is for the i9300 aka international! ). If the installation works you can update CM to the latest version afterwards.

      In case the installation still doesn’t work, you can take a look at these two pages dealing with the status 7 problem:
      – This page here describes 5 things you can try out to get rid of the problem.
      – In case you are absolutely sure that you have downloaded the right ROM for your device, you can follow the instructions on this page. But I don’t recommend it, since this will deactivate the device and ROM compatibility checking before the installation!

      I hope this helps you to resolve the problem. It would be nice if you could comment again to share your results and please also provide your device modellnumber.

  4. Hi, thanks for the tutorial but Im having some issues here and i really hope you could help.
    Im trying to flash the CWM Recovery on Samsung Galaxy W GT-I8150 and keep getting errors:

    Initialising connection…
    Detecting device…
    Claiming interface…
    Attempt failed. Detaching driver…
    Claiming interface again…
    Setting up interface…
    libusb: error [op_set_interface] setintf failed error -1 errno 110
    ERROR: Setting up interface failed!
    Releasing device interface…

    i was however able to use adb to push files to sdcard when the phone wasnt in Download Mode.

    (the command i used to flash the cwm recovery)
    sudo heimdall flash –recovery recovery-clockwork- –no-reboot

    (heimdall debug output)
    Initialising connection…
    Detecting device…
    [timestamp] [threadID] facility level [function call]
    [ 0.006502] [00002215] libusb: debug [libusb_get_device_list]
    [ 0.006548] [00002215] libusb: debug [discovered_devs_append] need to increase capacity
    [ 0.006571] [00002215] libusb: debug [libusb_get_device_descriptor]
    [ 0.006587] [00002215] libusb: debug [libusb_open] open 2.29
    [ 0.006620] [00002215] libusb: debug [usbi_add_pollfd] add fd 11 events 4
    [ 0.006643] [00002215] libusb: debug [libusb_get_device_descriptor]
    [ 0.006657] [00002215] libusb: debug [libusb_get_config_descriptor] index 0
    Claiming interface…
    [ 0.006686] [00002215] libusb: debug [libusb_claim_interface] interface 1
    Setting up interface…
    [ 0.006730] [00002215] libusb: debug [libusb_set_interface_alt_setting] interface 1 altsetting 0
    [ 0.010729] [00002215] libusb: error [op_set_interface] setintf failed error -1 errno 71
    ERROR: Setting up interface failed!
    Releasing device interface…
    [ 0.010756] [00002215] libusb: debug [libusb_release_interface] interface 1

    [ 0.010779] [00002215] libusb: debug [libusb_close]
    [ 0.010790] [00002215] libusb: debug [usbi_remove_pollfd] remove fd 11
    [ 0.010804] [00002215] libusb: debug [libusb_exit]
    [ 0.010809] [00002215] libusb: debug [libusb_exit] destroying default context


    • @ Readers: The reported issue is based on a Galaxy W GT_i8150 and is unrelated to this Tutorial

      @ Ichini “Rōnin” Shichi: I googled the issue for you 😉 and here are the results:
      – I found a person with the exact same problem on the xdadevelopers forum, but maybe it’s actually you 😀 Help: Heimdall flashing CWM Recovery on Linux error

      – On first glance this seems to be a problem with libusb, but it could also be a compatibility problem between heimdall and your phone. In fact I couldn’t find any reports about successfully using heimdall with the Galaxy W GT_i8150. Most people use the Odin application for flashing, which unfortunately is a windows tool, so thats no option. Also the the flashing procedure seems to be very different from the procedure for the GT-i9000 or i9300.

      – Generally you will first have to root the phone, place the recovery image on your sdcard and then flash it using the terminal emulator on the device. Here is a tutorial for your phone: how to install clockworkmod recovery on samsung galaxy w i8150. When it comes to flashing the recovery, the tutorial refers to this post: flashing clockworkmod on galaxy w gt-i8150 , which should also work for newer versions of clockworkmod recovery. I recommend following this two tutorials.

      I hope this solves your problem. Happy flashing!

  5. Hi, I followed this tutorial to the letter but every command I do in cmd is not recognized as a command. How do I fix this?

  6. I typed the exact code, and as response I got: “unable to find compatible device in download mode” + what is the difference between the S3 and S3 neo?

  1. Pingback: Samsung Galaxy S3 available at Rs 19,499 | cityride

  2. Pingback: Samsung Galaxy Wonder GT-I8150’ye Custom ROM Yükleme | Bismillahirrahmanirrahim

  3. Pingback: Fix Libusb Error -12 Heimdall Windows XP, Vista, 7, 8 [Solved]

  4. Pingback: Installing CyanogenMod to Samsung phones | Yet Another Technobabble Blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: