[GUIDE] How to Flash Custom Binaries Without Ever Incrementing the Flash Counter!!

Search This thread

AaronStC

Member
Oct 14, 2011
48
10
If I use this method will I be able to restore A CWM backup to get back to my current rom and settings?

Edit: I'm a little confused as to what the jig does. It resets the triangle screen and the counter. Will it change anything else? Will I have to reflash custom rom/kernal?
 
Last edited:

creepyncrawly

Senior Member
Sep 3, 2010
2,768
3,276
This is correct, the counter that shows the number of times you have flashed a custom kernel does not get reset by flashing a stock kernel - just the warning triangle gets removed by flashing to stock.

And yes the download mode jig does both reset the counter number to "No" as well as remove the triangle.

I have tested with a jig from http://www.mobiletechvideos.com/blo...s-download-mode-jig-so-easy-a-baby-can-do-it/

Sent from my SAMSUNG-SGH-I777 using XDA App

This is the first actual report I have seen that confirms flashing a stock kernel does not reset the flash counter. It would be helpful if others (who already have a flash count) could verify this. And please post screen shots too. I'd really like to see a screen shot of the download screen with a flash count showing, and maybe a follow up screen shot after flashing the stock kernel.
 

dayv

Senior Member
Sep 7, 2010
685
135
If I use this method will I be able to restore A CWM backup to get back to my current rom and settings?

Edit: I'm a little confused as to what the jig does. It resets the triangle screen and the counter. Will it change anything else? Will I have to reflash custom rom/kernal?

First question answer is yes.

Second, the main purpose of the download mode jig is to boot your phone into download mode. All the jig will do is boot into download mode, reset the binary counter and remove the triangle warning from the boot splash, it will not affect anything else - as far as we know.

Explanation of jig - On the sgs 1 phone models there was some issue at times getting the phone into download mode via the button combo - either the result of a soft brick or some of the phones that shipped with a boot-loader that did not have the button combo enabled. Thus some of our hardware savvy friends here figured out how to make a download mode jig to get a problem phone into download mode.

After the sgs 2 phones came out it was discovered that the jig would still work for download mode and would also reset the binary counter and remove the warning triangle on the boot splash screen.
 
  • Like
Reactions: AaronStC

dayv

Senior Member
Sep 7, 2010
685
135
This is the first actual report I have seen that confirms flashing a stock kernel does not reset the flash counter. It would be helpful if others (who already have a flash count) could verify this. And please post screen shots too. I'd really like to see a screen shot of the download screen with a flash count showing, and maybe a follow up screen shot after flashing the stock kernel.

Here is a screen shot of the my phone currently. I will do some flashing and try and post some images. This image was taken today, and I did have a count of one before with the triangle warning that came from flashing codesworks cwm kernel in heimdall. My reset as it is shown below was the result of a download mode jig.
 

Attachments

  • dm.jpg
    dm.jpg
    18.6 KB · Views: 1,146
Last edited:

dayv

Senior Member
Sep 7, 2010
685
135
Here is a pic of my phone in download mode after flashing codeworkx cwm kernel via heimdall.

Notice the custom binary download line says "YES (1 counts)"

Notice the current binary line says "CUSTOM" - when this line says custom you will have a yellow triangle with an exclamation point on the boot splash as well as I9100 on the boot splash
 

Attachments

  • download_mode_after_cwm.jpg
    download_mode_after_cwm.jpg
    20.7 KB · Views: 896

creepyncrawly

Senior Member
Sep 3, 2010
2,768
3,276
And now you are flashing the stock kernel with Odin, and then post another screen shot, I hope.

I'll be out the rest of the evening, but I'll be looking when I get back later.
 

dayv

Senior Member
Sep 7, 2010
685
135
Here is a pic of my phone in download mode after flashing entropy512's stock kernel via heimdall

Notice custom download binary line still says "YES (1 counts)" This is the same as it was in my last post

Notice the current binary line now says "SAMSUNG OFFICIAL" - when this line says this the yellow triangle warning as well as the I9100 are gone from the boot splash screen.

So flashing a stock kernel via heimdall or odin will remove the triangle warning from the boot splash, but it will not reset the custom binary counter
 

Attachments

  • download_mode_after_stock.jpg
    download_mode_after_stock.jpg
    23.4 KB · Views: 692

dayv

Senior Member
Sep 7, 2010
685
135
Here is a pic with my phone in download mode via a jig.

Notice the custom binary download line now says "NO" - counter has been reset again by the jig

Notice the current binary line still says "SAMSUNG OFFICIAL" - I know it said that in the last post as well, but even if I did not flash a stock kernel just prior to this this line would be reset to this by the jig as well, I have witnessed this from the first time I did reset with the jig.

Also notice we have new line in green font that says "ERASING DOWNLOAD INFORMATION SUCCEEDED" - this is just a message letting you know what it did. This jig will work in resetting your download info as long as you are running the boot-loaders that came with the phone when it shipped with the original stock kernel and system image.
 

Attachments

  • download_mode_jig.jpg
    download_mode_jig.jpg
    28.5 KB · Views: 716
Last edited:

dayv

Senior Member
Sep 7, 2010
685
135
And last but not least, here is a new pic of my phone in download mode after the reset while running entropy512's custom kernel that comes with Unamed ROM v 1.03

This is after returning to the custom kernel I am currently running, and after a jig reset, reboot and entered download mode one more time to finish.

Sorry about making this a series of posts, but I did not want anyone to be confused about what pic went with which step.
 

Attachments

  • download_mode_after_jig.jpg
    download_mode_after_jig.jpg
    27 KB · Views: 947

dandrumheller

Senior Member
Jul 10, 2010
3,625
1,137
Southern Maine / Seacoast NH
Huge thank you to creepyncrawly for posting this guide, and all the devs for the fantastic work they have done with this device. The only snag I ran into with the whole process was misinterpreting the zero in the file location to flash the cwm kernel to as a capital "o". After 2 failed flashes I figured it out. Not sure if there is any way to make it more clear for anyone else who might be a little dumb like me. ..

At any rate, thanks again.

Sent from my SAMSUNG-SGH-I777 using Tapatalk
 
  • Like
Reactions: creepyncrawly

kikex76

Senior Member
Oct 23, 2011
337
26
Step 3(Custom Kernel Install)

This approach to customizing your phone involves the following steps:

1. Read the flash counter.
2. Root by flashing Entropy512's Return/Unbrick to stock, Kernel + Rooted System Package using Odin or Heimdall.
3. Install a customized kernel containing ClockworkMod Recovery using either adb on your pc or Android Terminal Emulator on your phone.
4. Flash the custom ROM package of your choice using ClockworkMod Recovery and a CWM flashable zip package.


Discussion

The Samsung Galaxy S II contains an internal flash counter which is incremented each time a non-stock binary (kernel/rom) is flashed using Odin or Heimdall. The purpose of the flash counter is believed to be to allow Samsung and or AT&T technicians to detect if the phone has a voided warranty through flashing non-stock firmware. The first time the flash counter is activated, the phone also displays a warning screen on boot up with a yellow warning triangle containing an exclamation point. The warning screen also contains the i9100 logo. (Evidently, Samsung did not change the warning screen from the International version of the Galaxy S II for the AT&T version.) Some rooting methods require that a non-stock kernel be flashed before rooting can be accomplished. So rooting and flashing custom software can both cause the dreaded yellow triangle, and increment the flash counter.

It is possible to remove the warning screen by two methods. One is by using a Jig to place the phone into download mode. The other is by flashing a stock kernel using either Odin or Heimdall. However, there is only one way to reset the flash counter, and that is with a micro usb Jig. This was true for the International version of the Galaxy S II as confirmed by Chairfire on the i9100 forums. This has also been confirmed for the AT&T Galaxy S II by dayv. Please see his post here, and then go to this post and read it and the following five posts for a complete description with screen shots.

pinoymutt adds:

Additionally, there have been rumors that there is a secondary counter hidden in the code of the Galaxy S II which increments each time the primary flash counter is reset to zero. This rumor was either started or strengthened over in the i9100 forums by Chainfire. He never did find any code, and later said he was not fully convinced there ever was any code. But the rumor has already had some discussion in these At&T forums, so it's worth mentioning. My opinion is that a secondary counter doesn't exist, but if it does, this would be an additional reason for this guide.

Some people may be reluctant to root their phone and/or flash custom software onto it, not wishing to take a chance on voiding their warranty. However, there is a way to completely avoid this problem. The solution is to never increment the flash counter in the first place, and never activate the yellow warning triangle. Using this guide to root and modify an AT&T Galaxy S II phone right out of the box, along with the ability to flash back to completely stock firmware followed by a wipe data/factory reset from stock 3e recovery, (see this Guide), will result in a phone that can be returned for warranty purposes to either AT&T or Samsung without fear of the warranty being denied.

Disclaimer: I didn't think all this stuff up. The following information is mainly gleaned from all the great developers and knowledgable users on this forum. A special thanks to Entropy512 for creating the stock + root package that makes this all possible.



1.) How to read the flash counter on an AT&T Samsung Galaxy S II
  • Boot into download mode by this method:
    • With the phone powered off, plug in the usb cable while holding the vol up + vol down buttons (but not the power button).
    • When the warning screen appears, press Volume up to continue into download mode.
  • At the top of the screen you will see:
    ODIN MODE
    PRODUCT NAME: SGH-I777
    CUSTOM BINARY DOWNLOAD: NO --or-- YES (x counts)
    CURRENT BINARY: SAMSUNG OFFICIAL --or-- CUSTOM
  • Once you have verified the information, remove the usb cable, and hold down the power button until the phone begins to reboot. (Do not do this if you are actually flashing the phone. Interrupting a flash can cause bad things to happen.)
  • You will not see the above information if you enter download mode by another method, ie. by using adb or the power menu, etc.
  • Now you can check on your flash counter at any stage of the foregoing guide.


2a.) How to root by flashing Entropy512's Return/Unbrick to Stock, Kernel + Rooted System Package using Odin3 v1.85 (Windows)
  • Download the Odin3 v1.85 package from MediaFire or MegaUpload, or another source of your choice. Odin3 v1.82 is will also work. Extract the contents of the zip file to a directory on your hard disk drive.
  • Download Entropy512's Return/Unbrick to Stock, Kernel + Rooted System Package from here. Extract the PDA.tar file from this package to a directory on your hard disk drive.
  • Start the Odin3 program by double clicking on "Odin3 v1.85.exe".
  • Now Enter Download Mode:
    • With the phone powered off, plug in the usb cable while holding the vol up + vol down buttons (but not the power button).
    • When the warning screen appears, press Volume up to continue into download mode.
  • In Odin, the first small edit box under the words "ID:COM" will turn yellow, and say something like [0:COM8].
  • In Odin, the two items "Auto Reboot" and "F. Reset Time' should be checked, and everything else should be left unchecked. (Very Important)
  • In Odin, click on the button that is labeled "PDA". In the dialog box find and select the PDA.tar file you downloaded. The tick box next to the PDA button should become checked. This will be the only file that will be flashed.
  • Click Start. Watch the progress bar advance in green while the message box in the lower left describes the steps. When the flash is finished, the top left larger edit box will turn green and say PASS! and your phone will automatically reboot.
  • Unplug the usb cable from you phone after it boots up. Success. You're Rooted.


2b.) How to root by flashing Entropy512's Return/Unbrick to Stock, Kernel + Rooted System Package from the command line using Heimdall (Linux and Mac OS)
  • Tested on Linux, should work on Mac OS
  • Download and install the latest version of Heimdall Command Line for your operating system from here. (Latest version 1.3.1 at this writing.)
  • Download Entropy512's Return/Unbrick to Stock, Kernel + Rooted System Package from here. Extract the PDA.tar file from this package to a directory on your hard disk drive, then extract the two component files from the tar - zImage and factoryfs.img.
  • Place zImage and factoryfs.img both in the directory where you have the Heimdall command line executable, and enter the following at the command prompt:
    Code:
    heimdall flash --kernel zImage --factoryfs factoryfs.img
  • Reboot the phone. Success. You're Rooted.


3a.) How to Install a customized kernel containing ClockworkMod Recovery onto your Rooted phone from a pc, using Android Debug Bridge (Windows, Linux and Mac OS)
  • Download and install the Android Software Developer Kit (SDK) from here.
  • Download the file containing the kernel you want to flash, and extract from it the zImage, which contains the actual kernel.
  • Move or copy the zImage into the tools directory where adb.exe resides. This will be something like (on Windows) c:\android-sdk-windows\tools.
  • Open a command prompt. Windows users may think of it as a DOS prompt. Change directory to the tools directory, then enter the following at the command line:
    Code:
    adb push ZImage /sdcard/zImage
    adb shell
    $ su
    # dd if=/sdcard/zImage of=/dev/block/mmcblk0p5
    # exit
    $ exit
  • The dd command requires superuser permission on the phone represented by a # prompt. After you type su and hit enter, look for a superuser window on your phone and give the permission. If the permission request doesn't pop up, open superuser on your phone to force the phone to prompt for superuser permission. After approval, the adb session will be listed as Unknown in superuser.
  • After you've finished, the code in the Command prompt window will look something like this (your command prompt and some numbers will be different):
    Code:
    C:\android-sdk-windows\tools>adb push ZImage /sdcard/zImage
    4279 KB/s <4776784 bytes in 1.090s>
    C:\android-sdk-windows\tools>adb shell
    $ su
    su
    # dd if=/sdcard/zImage of=/dev/block/mmcblk0p5
    dd if=/sdcard/zImage of=/dev/block/mmcblk0p5
    10153+1 records in
    10153+1 records out
    5198492 bytes transferred in 2.558 secs <2032248 bytes/sec>
    # exit
    exit
    $ exit
    exit
  • Reboot the phone. You have now installed a custom kernel containing clockworkMod Recovery without changing the flash counter.
  • If you want to confirm installation of the new kernel, reboot into recovery to verify that you now have ClockworkMod Recovery. (The stock kernel has 3e recovery.) Or install CPU Spy from the Market (before you root) and compare the Kernel Info it displays with the same info from the stock kernel.
  • To reboot into recovery on the SGH-I777: With the phone powered off, hold down the vol up + vol down + power buttons continuously until the initial boot screen appears a second time.


3b.) How to Install a customized kernel containing ClockworkMod Recovery onto your Rooted phone from your phone, using Android Terminal Emulator
  • Download and Install Android Terminal Emulator onto your phone from the Market.
  • Download (onto your PC) the file containing the kernel you want to flash, and extract from it the zImage, which contains the actual kernel.
  • Transfer the zImage to the root of your phone's sdcard, using a usb cable or another method such as dropbox.
  • On the phone, open a terminal session with Android Terminal Emulator.
  • A few points to be aware of:
    Android is a version of linux so you are using linux commands. Linux commands are case sensitive, so you must for instance type "zImage" and not "zimage", if that is the way the file is spelled on the sd card.
    Since this will be the first time you have used superuser.apk with the terminal, you may need to approve it on you phone. After that, superuser permission will be remembered.
    When you first open a terminal session, you will be at the root of the phone, or essentially "/". The $ prompt means shell access, the # prompt means root file access.
    You need a # prompt to complete this Step.
    If your keyboard goes away, use the menu button options to get it back.
  • In the terminal session, type su and then enter. You will get a superuser request. Once you approve it, you will get the # prompt.
  • Then type the following:
    Code:
    dd if=/sdcard/zImage of=/dev/block/mmcblk0p5
  • Press enter, wait till the zImage is copied over to the named block. (takes about 2 or 3 seconds)
  • To close the root session, type "exit" and enter. Use the back button to close Android Terminal Emulator.
  • Reboot the phone. You have now installed a custom kernel containing clockworkMod Recovery without changing the flash counter.
  • If you want to confirm installation of the new kernel, reboot into recovery to verify that you now have ClockworkMod Recovery. (The stock kernel has 3e recovery.) Or install CPU Spy from the Market (before you root) and compare the Kernel Info it displays with the same info from the stock kernel.
  • To reboot into recovery on the SGH-I777: With the phone powered off, hold down the vol up + vol down + power buttons continuously until the initial boot screen appears a second time.


4.) Flash the ROM package of your choice using ClockworkMod Recovery and a CWM flashable zip package
Your phone is now set up to flash custom software using ClockworkMod zipped install files in ClockworkMod Recovery. Anything you flash on the phone using ClockworkMod Recovery, or using adb or terminal, will not affect the flash counter or invoke the warning triangle. Therefore, you can flash ROM's Kernels and Modems to your hearts content. Just avoid ever flashing anything non-stock with Odin or Heimdall. I would also caution against flashing any package with bootloaders. There is no valid reason to flash bootloaders on the SGH-I777 at this time, but some developers may include bootloaders in their CWM flashable zip files.​

I'm a little confused on step 3 where you say install custom kernel containing ClockworkMod. I downloaded a kernel file on step one from your link. There is no link for custom kernel containing clockworkmod on step 3. Do I use the same file for step #3 from step#1? I noticed there is a zImage inside the .dar file from step #1. Just want to make sure I'm choosing and using the right files. I'm a nooby switching from Iphone, I read al 41 pages on rooting the phone, and I wanna make sure I won't have any problems in case I have to return the phone.
 

dayv

Senior Member
Sep 7, 2010
685
135
I'm a little confused on step 3 where you say install custom kernel containing ClockworkMod. I downloaded a kernel file on step one from your link. There is no link for custom kernel containing clockworkmod on step 3. Do I use the same file for step #3 from step#1? I noticed there is a zImage inside the .dar file from step #1. Just want to make sure I'm choosing and using the right files. I'm a nooby switching from Iphone, I read al 41 pages on rooting the phone, and I wanna make sure I won't have any problems in case I have to return the phone.

With his instructions he is leaving it up to you to find
The kernel you want that has cwm injected in it.

Here is a thread with a cwm injected kernel below, download the package from this link and extract the zImage from it, then follow creepy's instructions on step 3 to flash it and you will then have cwm recovery

http://xdaforums.com/showthread.php?t=1285823


Sent from my SAMSUNG-SGH-I777 using XDA App
 
  • Like
Reactions: nak0ut and kikex76

nytvd

Member
Sep 30, 2010
29
2
Breukelen,NY
Thank you for this organized information, was waiting a few weeks since I got the SGS2 for the root process and your post helped me decide that it is time..... I am now rooted and my phone boots up with no triangle and says Galaxy S II (not 9000) :)
 

kikex76

Senior Member
Oct 23, 2011
337
26
Thanks a lot man. Got done without any problems. Didn't even had to unplug, uncheck debug and check back in. Pretty smoth! Any sugestion on a Custom Rom that allows to skip songs from any music app like pandora, google music, etc., by long press of volume keys? Thanks again man!!! Is it to hard to writte codes to make apps or edit settings for purposes like long press of volume keys for particular features?
 

Dime04

Senior Member
Jun 17, 2009
73
18
Corpus Christi, Tx
Thanks for this guide! Can't say enough how extremely helpful it is. Came from G1 rooted since JesusFreke, then Nexus One CM7, and now SGSII. These forums are very valuable to me and can't thank you enough. The Android Community in these threads rule!
 

kikex76

Senior Member
Oct 23, 2011
337
26
Thank god I read a lot before rooting my phone. This is the supreme Galaxy S2 Guide t root the phone. This guide should be posted as the primary guide and first forum quote for SGS2 forums. It would avoid a lot of questions from noobies.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 172
    This approach to customizing your phone involves the following steps:

    1. Read the flash counter.
    2. Root your phone:
    - by using DooMLoRD's Easy Rooting Toolkit. (ZergRush Exploit)
    - by using SuperOneClick Root. (ZergRush Exploit)
    - by flashing Entropy512's Return/Unbrick to stock, Kernel + Rooted System Package using Odin or Heimdall.
    3. Install a customized kernel containing ClockworkMod Recovery:
    - by using Mobile Odin Lite or Mobile Odin Pro on your phone.
    - by using adb on your computer.
    - by using Android Terminal Emulator on your phone.
    4. Flash the custom ROM package of your choice:
    - by using ClockworkMod Recovery and a CWM flashable zip package.
    - by using Mobile Odin.


    PLEASE NOTE: While the following guide was written before AT&T officially released ICS, the principles contained in this guide are still applicable to our phone regardless of firmware version. However if your phone is currently running stock ICS UCLE5, using this method will install Gingerbread, taking your phone back to an earlier version. To root the phone while retaining ICS, please see the [Heimdall][Odin][Stock][Root]UCLE5 Stock ICS with Root thread.


    JANUARY 2013 ROOTING UPDATE: In mid December of 2012, Samsung released an over-the-air update for the SGH-I777UCLK3, taking the operating system to version 4.0.4. Around the same time, XDA developer Chainfire released an application called ExynosAbuse APK which can be used to root the SGH-I777 with SuperSU, without the need to use a PC. ExynosAbuse APK is the best, and probably the only practical method for rooting UCLK3 without flashing some other distribution. In addition, it seems that this application is a good way to root any phone running 4.x operating systems, and possibly phones running 2.x operating systems as well. Be aware, there are possible risks involved with using this application. Please thoroughly read and understand Chainfire's thread linked above before using his application.


    Discussion

    The Samsung Galaxy S II contains an internal flash counter which is incremented each time a non-stock binary (kernel/rom) is flashed from a computer using Odin or Heimdall. (Using the new Mobile Odin on your phone does not increment the flash counter.) The purpose of the flash counter is believed to be to allow Samsung and or AT&T technicians to detect if the phone has a voided warranty through flashing non-stock firmware. The first time the flash counter is activated, the phone also displays a warning screen on boot up with a yellow warning triangle containing an exclamation point. The warning screen also contains the i9100 logo. (Evidently, Samsung did not change the warning screen from the International version of the Galaxy S II for the AT&T version.) Some rooting methods require that a non-stock kernel be flashed before rooting can be accomplished. So rooting and flashing custom software can both cause the dreaded yellow triangle, and increment the flash counter.

    It is possible to remove the warning screen by two methods. One is by using a Jig to place the phone into download mode. The other is by flashing a stock kernel using either Odin or Heimdall. However, there is only one way to reset the flash counter, and that is with a micro usb Jig. This was true for the International version of the Galaxy S II as confirmed by Chainfire on the i9100 forums. This has also been confirmed for the AT&T Galaxy S II by dayv. Please see his post here, and then go to this post and read it and the following five posts for a complete description with screen shots.

    pinoymutt adds:
    On the newer versions of the i9100 ROMs apparently Samsung has updated the bootloaders to render the "jig trick" to reset the counter useless. This has also been observed in the latest ATT leak that DG posted in the General Forum (UCKJ2), where new bootloaders are included that render the jig reset obsolete.

    Additionally, there have been rumors that there is a secondary counter hidden in the code of the Galaxy S II which increments each time the primary flash counter is reset to zero. This rumor was either started or strengthened over in the i9100 forums by Chainfire. He never did find any code, and later said he was not fully convinced there ever was any code. But the rumor has already had some discussion in these At&T forums, so it's worth mentioning. My opinion is that a secondary counter doesn't exist, but if it does, this would be an additional reason for this guide.

    Some people may be reluctant to root their phone and/or flash custom software onto it, not wishing to take a chance on voiding their warranty. However, there is a way to completely avoid this problem. The solution is to never increment the flash counter in the first place, and never activate the yellow warning triangle. Using this guide to root and modify an AT&T Galaxy S II phone right out of the box, along with the ability to flash back to completely stock firmware followed by a wipe data/factory reset from stock 3e recovery, (see this Guide), will result in a phone that can be returned for warranty purposes to either AT&T or Samsung without fear of the warranty being denied.

    Disclaimer: I didn't think all this stuff up. The following information is mainly gleaned from all the great developers and knowledgable users on this forum. A special thanks to Entropy512 for creating the stock + root package that makes this all possible.

    Here is some additional information for noobs about the tools and techniques used in this guide.




    1.) How to read the flash counter on an AT&T Samsung Galaxy S II
    • Boot into download mode by this method:
      • With the phone powered off, plug in the usb cable while holding the vol up + vol down buttons (but not the power button).
      • When the warning screen appears, press Volume up to continue into download mode.
    • At the top of the screen you will see:
      ODIN MODE
      PRODUCT NAME: SGH-I777
      CUSTOM BINARY DOWNLOAD: NO --or-- YES (x counts)
      CURRENT BINARY: SAMSUNG OFFICIAL --or-- CUSTOM
    • Once you have verified the information, remove the usb cable, and hold down the power button until the phone begins to reboot. (Do not do this if you are actually flashing the phone. Interrupting a flash can cause bad things to happen.)
    • You will not see the above information if you enter download mode by another method, ie. by using adb or the power menu, etc.
    • Now you can check on your flash counter at any stage of the foregoing guide.


    To root UCKK6, use method 2c or 2d to flash UCKH7 stock plus root. Immediately after rooting, if you want UCKK6, open Settings and check for updates, download and install the OTA update, and it will retain root. Some have reported this works, and some say not. Alternatively, use Odin3 v1.85 to flash Entropy512's UCKK6 Stock plus Root package from his thread here.

    2a.) How to root by using DooMLoRD's Easy Rooting Toolkit. (ZergRush Exploit) (Windows)
    • This rooting method does not work on the UCKK6.
    • This is the preferred method of rooting for users with the Windows operating system on their computer, and a phone running UCKH7.
    • Download the "DooMLoRD's Easy Rooting Toolkit v4.0" package from this thread and extract it to a directory on your hard drive using WinZip or a similar program.
    • You need to have the USB drivers for SGH-I777 installed on your computer. (It will be "Samsung USB Driver for Mobile Phones" in Control Panel\Uninstall Programs.) Download and install the latest drivers from this thread. (x86 and x64)
    • Both USB Debugging (Menu\Settings\Applications\Development) and Unknown Sources (Menu\Settings\Applications) should be enabled on your phone.
    • Increase the screen timeout on your phone to 10 minutes. (Menu\Settings\Display\Screen Timeout) Remember to set it back to a shorter interval after you are done rooting.
    • Connect the USB cable to the phone and the computer. Go to the directory where you extracted the package and execute "runme.bat".
    • The toolkit will open a command prompt window where you will see the progress of the rooting process. It takes between 5 and 10 minutes for the process to complete.
    • Success. You're rooted.

    2b.) How to root by using SuperOneClick Root. (ZergRush Exploit) (Windows, Linux and Mac OS)
    • This rooting method does not work on the UCKK6.
    • Download "SuperOneClick v2.3.1 - Automatic Driver Installation" from DepositFiles (or look for links here) and extract it to a directory on your hard drive using WinZip or a similar program.
    • Please go the the SuperOneClick thread and read about the tool and how to use it. For Windows XP you need to have .NET Framework v2.0 or above installed. For Mac OS and certain flavors of Linux, you need to install Mono.
    • I have not tested this tool. It is included here because it claims to work for Mac OS and Linux, and provides a way to use the ZergRush Exploit on those operating systems. Since I am only familiar with Windows, I will be unable to support this rooting method. For problems, try posting questions in the SuperOneClick thread linked above.
    • If you try SuperOneClick on Linux or Mac, please post your (success or failure) results. Thanks.

    2c.) How to root by flashing Entropy512's Return/Unbrick to Stock, Kernel + Rooted System Package with Modem using Odin3 One-Click Downloader (Windows)
    • Download the "Odin3 One-Click Downloader Stock I-777 UCKH7 with Root no BL" package from Hotfile | Dev-Host 268.64 MB.
    • Extract the contents of the zip file to a directory on your hard disk drive. This is a One-Click version of Entropy512's Return/Unbrick to Stock, Kernel + Rooted System Package plus stock modem from the development forum. (Contains stock zImage, factoryfs.img with root, and modem.bin.)
    • Start the Odin3 One-Click Downloader program by double clicking on "I777UCKH7 OCD With Root.exe".
    • Now Enter Download Mode:
      • With the phone powered off, plug in the usb cable while holding the vol up + vol down buttons (but not the power button).
      • When the warning screen appears, press Volume up to continue into download mode.
    • In Odin, the small edit box in the upper left corner will turn yellow, and say something like [0:COM8]. The number could be different.
    • Click Start. Watch the progress bar advance in green while the message box in the lower area describes the steps. When the flash is finished, the top left larger edit box will turn green and say PASS! and your phone will automatically reboot.
    • Unplug the usb cable from you phone after it boots up. Success. You're Rooted.

    2d.) How to root by flashing Entropy512's Return/Unbrick to Stock, Kernel + Rooted System Package from the command line using Heimdall (Linux and Mac OS)
    • Tested on Linux, should work on Mac OS
    • Download and install the latest version of Heimdall Command Line for your operating system from here. (Latest version 1.3.1 at this writing.)
    • Download Entropy512's Return/Unbrick to Stock, Kernel + Rooted System Package from here, or if you have difficulty with the links in his thread, there are alternative links for all his files in the Download Repository toward the bottom. Extract the PDA.tar file from this package to a directory on your hard disk drive, then extract the two component files from the tar - zImage and factoryfs.img.
    • Place zImage and factoryfs.img both in the directory where you have the Heimdall command line executable, and enter the following at the command prompt:
      Code:
      heimdall flash --kernel zImage --factoryfs factoryfs.img
    • Reboot the phone. Success. You're Rooted.


    You must use a Gingerbread kernel when using this method. If you use an ICS kernel while your phone is running Gingerbread, it will not boot!!!

    3a.) How to Install a customized kernel containing ClockworkMod Recovery onto your Rooted phone from your phone, using Mobile Odin Lite or Mobile Odin Pro
    • This is the preferred method to install a customized kernel onto your phone. In addition, Mobile Odin is a very useful tool that will allow you to install custom software directly on your phone without using a computer.
    • Mobile Odin Lite (free) can be downloaded and installed directly on your phone, or it can be downloaded to your computer and installed with adb. Alternatively, you can purchase Mobile Odin Pro for under $5.00 and install it directly from the market. It's easier, and you'll support the developer!
    • To use Mobile Odin Lite, download the file attached to the OP of this thread. You may need to be a registerd member of xda forums to download this file. Download directly on your phone, or to your computer and move or copy it to your phones sdcard. Using any file manager such as MyFiles or Root Explorer, select the file and install it. You can also install it from your computer using the following adb command:
      Code:
      adb install MobileODINLite-v2.30.apk
    • Download the file containing the kernel you want to flash, and extract from it the zImage, which contains the actual kernel. There are several kernels available which can be found in the AT&T SGS II Android Development forum. You must use a Gingerbread kernel! Usually choose between the following two Gingerbread kernels: Entropy512's Daily Driver or Siyah 2.6.
    • Transfer the zImage to the root of your phone's internal or external sdcard, using a usb cable or another method such as dropbox.
    • On your phone, open the Mobile Odin program. If you installed Mobile Odin Lite, when it prompts you to install the add-in, click cancel. If you installed Mobile Odin Pro, you will have already downloaded and installed the add-in to activate all the features in the program. With Mobile Odin Lite, you will still be able to install the kernel.
    • In Mobile Odin, click on Kernel or Install Kernel, find and select the zImage on your internal or external SD card, and then click on Flash Firmware.
    • Mobile Odin will flash the kernel and then reboot the phone. You have now installed a custom kernel containing clockworkMod Recovery without changing the flash counter.
    • If you want to confirm installation of the new kernel, reboot into recovery to verify that you now have ClockworkMod Recovery. (The stock kernel has 3e recovery.) Or install CPU Spy from the Market (before you root) and compare the Kernel Info it displays with the same info from the stock kernel.
    • To reboot into recovery on the SGH-I777: With the phone powered off, hold down the vol up + vol down + power buttons continuously until the initial boot screen appears a second time.
    • The 5.0.2.3 and later versions of ClockworkMod Recovery have a different button configuration. Home = select, Back = back, Power = back from submenu or toggle logo/main menu. The 5.0.2.7 version of ClockworkMod Recovery retains this button configuration but changes it to Power = select.
    • If you installed Mobile Odin Lite, and you don't want to keep it, you can uninstall it now. If you want to keep it and activate all its features, download the add-on MobileODIN_FlashKernel_I777-v1.0.apk from here and install it on your phone with adb using the instructions above.

    3b.) How to Install a customized kernel containing ClockworkMod Recovery onto your Rooted phone from a pc, using Android Debug Bridge (Windows, Linux and Mac OS)
    • Download and install the Android Software Developer Kit (SDK) from here. You may need to run SDK Manager with administrator privledges.
    • You need to have the USB drivers for SGH-I777 installed on your computer. (It will be "Samsung USB Driver for Mobile Phones" in Control Panel\Uninstall Programs.) Download and install the latest drivers from this thread. (x86 and x64)
    • Download the file containing the kernel you want to flash, and extract from it the zImage, which contains the actual kernel. There are several kernels available which can be found in the AT&T SGS II Android Development forum. You must use a Gingerbread kernel! Usually choose between the following two Gingerbread kernels: Entropy512's Daily Driver or Siyah 2.6.
    • Move or copy the zImage into the platform-tools directory (on older installations it is the tools directory) where adb.exe resides. This will be something like (on Windows) c:\android-sdk-windows\platform-tools.
    • On your phone, first enable USB Debugging (Menu\Settings\Applications\Development\USB Debugging) and then plug in your USB cable, connecting your phone to your computer.
    • Open a command prompt. Change directory to the tools directory, then enter the following at the command line:
      Code:
      adb push zImage /sdcard/zImage
      adb shell
      $ su
      # dd if=/sdcard/zImage of=/dev/block/mmcblk0p5
      # exit
      $ exit
    • The dd command requires superuser permission on the phone represented by a # prompt. After you type su and hit enter, look for a superuser window on your phone and give the permission. If the permission request doesn't pop up, open superuser on your phone to force the phone to prompt for superuser permission. After approval, the adb session will be listed as Unknown in superuser.
    • After you've finished, the code in the Command prompt window will look something like this (your command prompt and some numbers will be different):
      Code:
      C:\android-sdk-windows\platform-tools>adb push zImage /sdcard/zImage
      4279 KB/s <4776784 bytes in 1.090s>
      C:\android-sdk-windows\platform-tools>adb shell
      $ su
      su
      # dd if=/sdcard/zImage of=/dev/block/mmcblk0p5
      dd if=/sdcard/zImage of=/dev/block/mmcblk0p5
      10153+1 records in
      10153+1 records out
      5198492 bytes transferred in 2.558 secs <2032248 bytes/sec>
      # exit
      exit
      $ exit
      exit
    • Reboot the phone. You have now installed a custom kernel containing clockworkMod Recovery without changing the flash counter.
    • If you want to confirm installation of the new kernel, reboot into recovery to verify that you now have ClockworkMod Recovery. (The stock kernel has 3e recovery.) Or install CPU Spy from the Market (before you root) and compare the Kernel Info it displays with the same info from the stock kernel.
    • To reboot into recovery on the SGH-I777: With the phone powered off, hold down the vol up + vol down + power buttons continuously until the initial boot screen appears a second time.
    • The 5.0.2.3 and later versions of ClockworkMod Recovery have a different button configuration. Home = select, Back = back, Power = back from submenu or toggle logo/main menu. The 5.0.2.7 version of ClockworkMod Recovery retains this button configuration but changes it to Power = select.

    3c.) How to Install a customized kernel containing ClockworkMod Recovery onto your Rooted phone from your phone, using Android Terminal Emulator
    • Download and Install Android Terminal Emulator onto your phone from the Market.
    • Download (onto your PC) the file containing the kernel you want to flash, and extract from it the zImage, which contains the actual kernel. There are several kernels available which can be found in the AT&T SGS II Android Development forum. You must use a Gingerbread kernel! Usually choose between the following two Gingerbread kernels: Entropy512's Daily Driver or Siyah 2.6.
    • Transfer the zImage to the root of your phone's sdcard, using a usb cable or another method such as dropbox.
    • On the phone, open a terminal session with Android Terminal Emulator.
    • A few points to be aware of:
      Android is a version of linux so you are using linux commands. Linux commands are case sensitive, so you must for instance type "zImage" and not "zimage", if that is the way the file is spelled on the sd card.
      Since this will be the first time you have used superuser.apk with the terminal, you may need to approve it on you phone. After that, superuser permission will be remembered.
      When you first open a terminal session, you will be at the root of the phone, or essentially "/". The $ prompt means shell access, the # prompt means root file access.
      You need a # prompt to complete this Step.
      If your keyboard goes away, use the menu button options to get it back.
    • In the terminal session, type su and then enter. You will get a superuser request. Once you approve it, you will get the # prompt.
    • Then type the following:
      Code:
      dd if=/sdcard/zImage of=/dev/block/mmcblk0p5
    • Press enter, wait till the zImage is copied over to the named block. (takes about 2 or 3 seconds)
    • To close the root session, type "exit" and enter. Use the back button to close Android Terminal Emulator.
    • Reboot the phone. You have now installed a custom kernel containing clockworkMod Recovery without changing the flash counter.
    • If you want to confirm installation of the new kernel, reboot into recovery to verify that you now have ClockworkMod Recovery. (The stock kernel has 3e recovery.) Or install CPU Spy from the Market (before you root) and compare the Kernel Info it displays with the same info from the stock kernel.
    • To reboot into recovery on the SGH-I777: With the phone powered off, hold down the vol up + vol down + power buttons continuously until the initial boot screen appears a second time.
    • The 5.0.2.3 and later versions of ClockworkMod Recovery have a different button configuration. Home = select, Back = back, Power = back from submenu or toggle logo/main menu. The 5.0.2.7 version of ClockworkMod Recovery retains this button configuration but changes it to Power = select.


    4.) Flash the ROM package of your choice using ClockworkMod Recovery and a CWM flashable zip package or Mobile Odin with any package
    Your phone is now set up to flash custom software using ClockworkMod zipped install files in ClockworkMod Recovery. If you used and retained Mobile Odin, you can also flash custom software with it. Anything you flash on the phone using ClockworkMod Recovery, Mobile Odin, adb or terminal, will not affect the flash counter or invoke the warning triangle. Therefore, you can flash ROM's Kernels and Modems to your hearts content. Just avoid ever flashing anything containing a non-stock kernel with Odin or Heimdall from your computer. I would also caution against flashing any package with bootloaders. There is no valid reason to flash bootloaders on the SGH-I777 at this time, but some developers may include bootloaders in their CWM flashable zip files, or Odin flashable tar files.
    14
    i have a noob question. After 2 weeks of owning the sgsii and a lot of reading, i rooted my phone according to 2c and 3c and all is good. Thx OP.

    after a lot of readings i am still not clear on some issues, so here are some noob questions:

    1-a. this question is related to step 2. 2c and 2d are practically the same but i don't seem to have a perfect understanding of what the step is. Is this just flashing a new stock rooted kernel instead of the unrooted one?

    The purpose of step 2 is to root the phone. Steps 2a and 2b root the phone directly without installing anything but the root tools. To gain root access to the file system, the phone must have the Superuser.apk application and the su binary files installed in the file system. Usually, root also includes the installation of busybox, a set of commands for the file system. All of these are installed in the factoryfs partition of the file system.

    Steps 2c and 2d are the original rooting method we had for this phone, created for us by Entropy512. This consists of a bone stock kernel (no modification at all) and a factoryfs.img that has all the root tools included. Flashing this package with Odin or Heimdall does not trip the flash counter because it includes the stock kernel.

    1-b. if the new entropy kernel is different from the stock, what are the differences. I see that it factoryfs.img and modem.bin are an addition.

    It's Bone stock, unchanged.

    2-a. in 3 or specifically 3c. are we here flashing another rooted kernel instead of the entropy one and we are adding CWM as recovery in boot?

    Step 3 is where we flash a custom kernel that contains ClockworkMod Recovery. It doesn't really matter at this stage which custom kernel, because all we need at this point is to put CWM recovery on the phone.

    Root has nothing to do with the kernel. Except that some custom kernels have a root injection feature included. If root injection is included with the kernel, then installing the kernel will inject the rooting tools into the fasctoryfs partition. The problem with this method of rooting is that installing a custom kernel with Odin or Heimdall will increment the flash counter.

    2-b. which specific step of this whole process makes it such that the counter is not tripped.

    The only thing that increments the flash counter is flashing a custom kernel onto the phone using either Odin3 or Heimdall from a computer. Flashing the stock kernel using Odin3 or Heimdall will not increment the flash counter, and in fact it will remove the I9100 boot screen and yellow warning triangle, and restore the original AT&T boot screen.

    It is possible to root the phone by flashing a custom kernel. It is also possible to install a rom without rooting the phone first, by installing a custom kernel containing CWM recovery, and then flashing the rom. Both of these methods will increment the flash counter however. Another common root method is to install a CWM recovery enabled kernel using Odin or Heimdall, and then use a CWM flashable rooting tool. This method also trips the flash counter.

    How to Flash Custom Binaries Without Ever Incrementing the Flash Counter provides all the options to get custom software on the phone without flashing a custom kernel using Odin3 or Heimdall from a computer.

    2-c. what stuff can be flashed from the CWM recovery vs flashed from the Mobile Odin, Vs ADB vs the Android Terminal Emulator and why there is a difference.

    Each one of these is a different tool. Mobile Odin is practically brand new, and does anything Odin3 can do from a computer, but on the phone. It also does some other stuff as well. Mobile Odin is a very versatile tool. CWM recovery is and has been the primary tool for flashing custom software for a long time. This is the tool most developers use for their offerings. The other two tools are used only infrequently, but provide additional options to work with the phone. All of these tools can be used to flash a custom kernel without incrementing the flash counter.
    ___________________________________________

    kanonengedonner asked some more questions in a later post. I've added them here for the sake of having them answered all in the same place.
    Ok, again your explanation post was helpful. Here are some comments/questions on the post.

    My interrogation when reading step 2 and step 3 and after reading your clarification is:
    1. why couldn't we combine them in only 1 step. ie flash a kernel with CWM without incrementing the counter and have root access at the same time.

    -->to answer my own question and let me know if this true: we can't combine both steps in a unique step because it is impossible to flash a non stock CWM kernel without setting the counter using non odin3/heimdall methods and that the other methods (ADB, mobile odin, android terminal )would require a prerequisite root access. So we need to root 1st.

    Your answer to this question is essentially correct. It is possible to flash a ClockworkMod Recovery enabled custom kernel using Odin or Heimdall from a computer without having root access on the phone. In fact, since most ROMs are rooted, this would be the quickest path to installing custom software, as you don't have to root first. However, it does trip the flash counter.

    And yes, all the tools that allow installation of a custom ClockworkMod Recovery enabled kernel without incrementing the flash counter require the phone to be rooted, so the rooting step has to come first.

    Otherwise my mistake in understanding the whole process is that I had the impression that CWM is a separate entity from the kernel. I thought CWM was a GRUB like program that is in the boot partition and therefore is separate from the kernel.

    The old ROM Manager was sort of like that, the way it was done on the Captivate when it first came out running Eclair. You used stock recovery to flash an update that installed CWM recovery. Once Froyo was available with 3e recovery, kernels containing CWM Recovery became standard.

    Ok another set of questions that i don't have an answer for:
    2. CWM recovery can't be installed without flashing it within a kernel?

    This is true because the stock 3e recovery will only flash signed files, and only Samsung can sign the files. The old ROM Manager method of installing recovery will not work on this phone, and in fact ROM Manager should not be used on this phone.

    3. Why is it that the Entropy Kernel is considered stock even though it has a different factoryfs.img and modem.bin files.

    I think you are referring to the Return/Unbrick to Stock plus root package. That package is not just a kernel. It includes the stock kernel as a zImage. That kernel is bone stock, as dumped right from Entropy's unmodded phone. It also contains the system image as factoryfs.img. That is the stock system files with the root files included. This is the part of the file system that you would call the ROM, or user space. Entropy's package does not include the modem. He provided that as a separate download. The Odin3 One-click downloader of the Return/Unbrick to Stock plus root package includes the stock zImage, the rooted factoryfs.img and the modem.bin.

    The kernel and system are the two modifyable portions of the phone. None of the other parts normally get modified, inculding the modem, as source code is not available.

    Entropy's daily driver kernel is also considered a stock kernel, as it is built from the source code of the stock kernel, with all the tweaks and code improvements Entropy has included.

    4. what is modem.bin used for?

    The modem handles the voice and data communications, and also interfaces with wifi. In other manufacturer's phones, it is sometimes referred to as the radio.

    5. why "Odin3 One-Click Downloader Stock I-777 UCKH7 with Root no BL" so big (400 meg i think)?

    Factoryfs.img with root is 485,231,260 bytes uncompressed, zImage is 8,308,688 bytes, modem.bin is 16,777,216 bytes, and the Odin3 One-Click Downloader is 408,064 bytes. Even after it is put together and compressed, it is a pretty big file.

    Again Creepy, it is much clearer now, and I think most of the problem of noobs like me is that most guides out there are set up such us "do this do that" without really explaining why or what is the idea behind the step. I am assuming that it won't bother a lot of people, but more anal/analytical minds will have a big brain freezes :).
    5
    Nice write-up. The info has been floating around on various threads and posts, but you did a great job putting all together into one nice step-by-step for folks looking to learn.

    Hopefully it'll also cut down on the million of duplicate threads asking the same question! :D

    ---------- Post added at 05:02 PM ---------- Previous post was at 04:58 PM ----------

    Discussion

    It has been reported to be possible to remove the warning screen and reset the flash counter by two methods. One is by using a Jig to place the phone into download mode. The other is by flashing a stock kernel using either Odin or Heimdall. However, while it is confirmed that the jig will both remove the triangle and reset the counter, and that flashing a stock kernel with Odin or Heimdall will remove the warning triangle, it is not certain that flashing a stock kernel with Odin or Heimdall will actually reset the flash counter. The developer Chainfire on the i9100 forums says that on the International version of the Galaxy S II, it will not. This is yet to be confirmed or denied on the AT&T version of the phone, as far as I know.

    On the newer versions of the i9100 ROMs apparently Samsung has updated the bootloaders to render the "jig trick" to reset the counter useless.

    This has also been observed in the latest ATT leak that DG posted in the General Forum (UCKJ2), where new bootloaders are included that render the jig reset obsolete.
    5
    And last but not least, here is a new pic of my phone in download mode after the reset while running entropy512's custom kernel that comes with Unamed ROM v 1.03

    This is after returning to the custom kernel I am currently running, and after a jig reset, reboot and entered download mode one more time to finish.

    Sorry about making this a series of posts, but I did not want anyone to be confused about what pic went with which step.
    4
    i have a noob question. After 2 weeks of owning the sgsii and a lot of reading, i rooted my phone according to 2c and 3c and all is good. Thx OP.

    after a lot of readings i am still not clear on some issues, so here are some noob questions:

    1-
    a. this question is related to step 2. 2c and 2d are practically the same but i don't seem to have a perfect understanding of what the step is. Is this just flashing a new stock rooted kernel instead of the unrooted one?

    b. if the new entropy kernel is different from the stock, what are the differences. I see that it factoryfs.img and modem.bin are an addition.

    2-
    a.in 3 or specifically 3c. are we here flashing another rooted kernel instead of the entropy one and we are adding CWM as recovery in boot ?


    b. which specific step of this whole process makes it such that the counter is not tripped.

    c. what stuff can be flashed from the CWM recovery vs flashed from the Mobile Odin, Vs ADB vs the Android Terminal Emulator and why there is a difference.


    These are a lot of questions, but I think if answered it will make things a lot easier for noobs :)

    thx.
    Let a fellow noob try to help with a few of the questions.

    1.a The difference between the steps are for person preference, and for operating systems.
    1.b The objective of step 2 is strictly to get rooted so you can proceed to the following steps.

    2.a Step 3 is to get a stock based kernel that includes CWM on your phone so you can proceed to step 4.
    2.b I believe it's getting the stock kernel with CWM.
    2.c Anything in CWM format zip.

    I hope it's ok that I answered. Xda has already helped me a lot and I would like to return the favor.