Howto Flash DarkyROM 10.2 Resurrection from Debian on your Samsung Galaxy S

Why this guide if it’s all on DarkyROM Forums?
I’m posting this as I found the guides on the DarkyROM forums confusing, and they all recommend Odin (Pffft! Windows users). If you already have a Darky’s ROM installed, or are coming from a Stock Froyo, it’s easy, just follow the guides on the forum. In fact, before reading how I did it, go to the forums anyway.

This guide is how I got DarkyROM 10.2.2 Extreme Edition installed after a lot of trial and error trying to get rid of Cyanogenmod 7 with a custom kernel. (See my previous post for CM7) This is by no means as in-depth as the official guides, nor can I guarantee it will work for you. As with all ROM flashing shenanigans, you are responsible for your phone, not me.

6 Step Howto Guide

1. Download and install Heimdall CLI HERE

2. Download DarkyROM 10.2 Resurrection and unzip everything all into one directory. HERE

3. Open your terminal and cd to that directory

4. Copy and paste this line: 

heimdall flash –repartition –pit s1_odin_20100512.pit –factoryfs factoryfs.rfs –cache cache.rfs –dbdata dbdata.rfs –primary-boot boot.bin –secondary-boot Sbl.bin –param param.lfs –kernel zImage –modem modem.bin

5. Put your phone into Download Mode (Volume Down+Power Button+Enter)

6. Plug USN cable into computer, then phone, and go back to the terminal and press Enter.


The Whole Story (For those who are about to brick their phone if they don’t read this 😀 )
A few friends on Google Plus were using Darky ROM and singing it’s praises, but I went for CM7 instead as it was easier to to install. I soon realised that I was losing battery every 8 hours, faster with heavy use. I could have tried different kernels and patches etc, but i’d already decided (as I do with Linux) to say goodbye and move on to a “Distro” (ROM) which was recommended and more suited to my needs. Darky’s ROM.

Clockwork Mod and ROM manager
As I was on a rooted phone, and already had CWM installed via my custom kernel, I decided to go for the traditional Darky install via the ROM manager. I downloaded the latest DarkyROM 10.2.2, opened the ROM manager, told it to wipe my phone and install the .zip which had just been downloaded to the root of my internal SD card. The phone rebooted into CWM, I chose Factory reset, wipe cache etc, and chose the darkyrom-10.2.2.zip. It appeared to work, rebooted, and just got the Cyanogenmod 7 boot screen, and that’s where the phone froze. I tried again with the 3-button-techinique, wiped again, reflashed. Same thing. I now had a phone that wouldn’t boot. So I used the 3-button-technique to reflash Cyanogenmod7 (The zip was also on my internal SD card from the last time). CM7 worked.

Bricked (nearly) Phone, Odin and Heimdall and reverting to Stock Froyo
After a lot of downloading and attempted flashes with the 3BT, and ending up with an unbootable phone, I panicked a bit, and went off to Google. I read through the DarkyROM howto but came away even more confused, then found a link to a site that has all the Stock Samsung Galaxy S firmware. I downloaded the Samsung Galaxy S Froyo Firmware, and set off to find a guide about using Odin via USB cable to get my brick phone back to stock.

Odin vs Hemdall
I soon realised that Odin is a leaked application that Samsung uses to flash phones, and is a Windows app. I’m on Debian Squeeze Linux. Next I got wind of a Linux app called heimdall, which even comes with an Odin like GUI frontend called (funnily enough) heimdall-frontend, and there were .deb files. Cool beans methinks, I can flash via USB from Linux. I downloaded the .deb files and installed them with a quick “dpkg -i” All went well, opened it up to check, seems to work.

DarkyROM and Heimdall
Rather than go back to stock straight away, I thought i’d have one last go with Darky’s ROM so I went back to DarkyROM forums and found somebody had posted a Heimdall guide, with screenshots. However, the gui looked nothing like mine, but I thought i’d muddle through. I unzipped the DarkyROM-10.22 package, and found that none of the files i needed were inside. Great! Went back and read some more forum posts, found I may need a version called Resurrection. Downloaded that and found the firmware files inside. I unzipped everything, tried to load the PDA.tar, and Heimdall-Frontend crashed at 99%. I tried again, crashed. In  fact I went through a whole heap of files i’d previously downloaded, and either got “firmware.xml” missing, or the Gui would crash.

Ubuntu and Heimdall-Frontend
I compare Ubuntu to crack cocaine. It’s ok for a quick fix, but you wouldn’t want to use it every day 😀
Ok, just kidding, I don’t want hate mail form hoards of marauding Ubuntu Fanbois, in any case, it saved my ass this time. My daughter’s laptop dual-boots Crunchbang with Ubuntu, so I decided to use Ubuntu as people said Heimdall worked fine on that. And it did. I flashed DarkyROM to my phone, it rebooted……. to the damned Cyanogenmod splash again!!

Stock Froyo ROM
Bugger it, i’m tired, i’ve got an unbootable phone, i’m going back to stock. I unzipped the firmware i had downloaded earlier, flashed it to my phone with heimdall-frontend, the phone booted into stock Froyo, Hurrah!

But!…….. I-need-Darky’s ROM!
What can I say, i’m an install freak, I HAVE to be able to fix something. I can’t just walk away and leave this. I’m serious, I can’t sleep if there is a challenge like this hanging in the air. Distros, databases, web sites, source apps. If Grant Galbraith can haz teh Darky ROM, I can haz it too 😀

Back to DarkyROM forum’s Heimdall guide
I scrolled down, and found that a forum moderator had posted a comand line for heimdall. YES! CLI! I fired up my Debian laptop. Unzipped all the files i saw in that command line into one single directory. Fired up my terminal, copy and pasted the line. Put my phone into download-mode, connected the USB cable, went back to my terminal, crossed my fingers, said a little prayer to Linus, and hit Enter. Bang! the beautiful commands scrolled past, my phone came to life with a gorgeous glow as it’s new lifeblood started to flow into its circuitry. The phone restarted to an corrupted mutlicolour splash. A jittery robot voice stuttered something and it froze. My heart sank, I tried to restart it, I got the horrible dreaded black-screen-of death. My heart sank further as the words echoed through my head “you bricked your phone”, “you had a stock froyo”, “but you had to push it, and you bricked your phone”, “stupid”.  I recalled something on the forum about “Something only Samsung can fix”.


But all wasn’t lost
I took my battery out, replaced and rebooted. I got a beautiful Matrix style splash screen welcoming me to Darky’s ROM, the robot voice… that beautiful robot voice assured me that everything was fine, and I had in fact, successfully installed Darky’s ROM… 10.2 Extreme Edition. It booted.

I am now the proud user of Darky’s ROM 10.2.2 Extreme Edition, and it’s staying that way!

Howto Cyanogenmod on Samsung Galaxy S GT i9000

Well, I was up until 5 am this morning pulling my hair out trying to get Cyanogenmod installed on my phone. I did all the downloading directly to my phone via the browser, and used free apps to get this done without the need for Linux/Windows/Mac and USB cables etc.

If you get this error……..

E: failed to verify whole-file signature

E: signature verification failed

……….I am going to save you a whole heap of time.


ROOT:
I expect you know that you need to be root to flash a Cyanogenmod ROM, but if you didn’t, search the Android Market for Z4Root which will root your phone quickly and painlessly.


Restrictive Recovery Manager
The problem is that the stock Froyo comes with the e3 Recovery Manager, which blocks the installation of unsigned ROMs. The earlier e2 Recovery Manager will let you install unsigned ROMs. So even if you install the recommended ClockwareMod or other ROM Managers to get your ROM installed, it won’t work. And in any case, with my kernel solution you don’t need them anyway.


So how do you get back to the e2 version?
You need to install a different kernel, but don’t panic, there is a free app in the Android Market which will allow you to backup your kernel and flash a new one relatively painlessly. 
Meet the SGS Kernel Flasher: (Download it via the Market)
https://market.android.com/details?id=neldar.sgs.kernel.flasher

Where to get the Kernel? 
After reading a few guides the speedmod kernels came up time and time again, created by Hardcore. So I downloaded and installed this one. There are newer versions, but i stuck with what the guides said as I needed the old e2 Recovery Manager.
speedmod-kernel-k12u-500hz.zip
Here: http://www.hotfilesearch.com/download/55267311-speedmod-kernel-k12u-500hz.zip.html

So I opened up the SGS Kernel Flasher App, chose backup current kernel, then chose to flash the new downloaded kernel, navigated to it, crossed my fingers and tapped. The new kernel got added, and the phone rebooted. Next up was to see if it had indeed left me with a usable phone and the old e2 version.

Boot into System Recovery:
With your phone running, press Volume up + On/Off Button + Enter simultaneously until the phone shuts down and reboots, let go when you see the white GT i9000 boot screen and if all went well, you will now see a different recovery manager which does have the option to “Install from SDcard”. (this option doesn’t appear on the e3 version)

Cyanogenmod Download:
Now you can go and get the Cyanogenmod and download it from here:
http://download.cyanogenmod.com/get/update-cm-7.1.0-RC1-GalaxyS-signed.zip

Now (more or less) follow this guide again (but without any Clockwork or Rom App) by holding down the 3 buttons again: http://wiki.cyanogenmod.com/wiki/Samsung_Galaxy_S:_Full_Update_Guide

Method via Recovery

  1. Place the CyanogenMod update.zip file on the root of the SD card.
  2. Boot into Recovery (By holding down the 3 buttons, NOT with a ROM Manager).
  3. Once the device boots into Recovery, use the side volume buttons to move around, and either the power button or the trackball to select.
  4. Select the option to Wipe data/factory reset.
  5. Then select the option to Wipe cache partition.
  6. Select Install zip from sdcard.
  7. Select Choose zip from sdcard.
  8. Select the CyanogenMod update.zip.
  9. Once the installation has finished, select +++++Go Back+++++ to get back to the main menu, and select the Reboot system now option. The Samsung Galaxy S should now boot into CyanogenMod.

Your phone will now reboot and you will see that beautiful Cyanogenmod Spalsh screen and you will scream WOOT!…… like I did, with all the enrgy I could muster at 5am after 3 hours of trying to find out why I couldn’t install this Cyanogenmod that all the cool kids on G+ have on their phones.


Google Apps:
Finally I realized I didn’t have the App Market, Gmail etc, so after a bit of Googling, downloaded the Gapps zip to my phone and installed it with the 3-button-recovery method, and now have the apps I need:
http://cmw.22aaf3.com/gapps/gapps-gb-20110613-signed.zip