Flash Samsung Galaxy S3 in Linux

Posted on Mon 08 July 2013 in Linux

Please keep in mind this post is from 2013 and may no longer be valid.

I recently got myself a Samsung Galaxy S3 and naturally wanted to flash a custom ROM etc. This post describes how I accomplished that in Debian 7.

In short you have to:

  1. Install heimdall
  2. Get CWM Recovery, then use heimdall to install it
  3. Either use adb or another means of getting CWM zip files to your sd-card
  4. Boot into CWM and install ROM/kernel zip files

1. Install heimdall

To install CWM on the phone you use heimdall, available here, you don't need the frontend package. Install the package by running:

dpkg -i debian7-heimdall_1.4.0-0_amd64.deb

2. Get & install CWM recovery

Then you need to download CWM Recovery so you can easily flash ROMs and kernels, I downloaded it from this XDA-post.

To install CWM on your S3, turn off the phone and unplug the USB cable, then do the following:

Press and hold Home+Volume Down+Power, accept the disclaimer then plugin the USB-cable.

On the computer run:

heimdall flash --RECOVERY recovery.img --no-reboot

The heimdall command needs to be run as root. You should see a blue progress bar on the phone as it downloads CWM. When it's done you can power off the phone, then hold Home+Volume Up+Power to boot into CWM.

Now you can either put ROMs/kernels on your sd-card the usual way, or you can do it by using adb;

3. Installing & using adb

I used adb for Linux from this page. If you are on a 64-bit distribution you will need to enable i386 in dpkg and install the ia32-libs:

dpkg --add-architecture i386
apt-get update
apt-get install ia32-libs
apt-get install lib32ncurses5

Take adb from the downloaded zip and put it in /usr/bin/ for easy access. Then just boot into recovery (Home+Volume Up+Power), plug in the USB cable and from your computer run: adb push your-rom-or-kernel.zip /sdcard/ to get the files from your computer onto your sd-card, note that you need to be root for this.

Then you can flash your zips as usual from CWM.