Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,731,300 Members 52,599 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] How to Prepare Your Phone to Return to the Store or for Warranty Replacement

Tip us?
 
creepyncrawly
Old
(Last edited by creepyncrawly; 5th July 2012 at 03:40 AM.)
#1  
Recognized Contributor - OP
Thanks Meter 2958
Posts: 2,453
Join Date: Sep 2010

 
DONATE TO ME
Default [GUIDE] How to Prepare Your Phone to Return to the Store or for Warranty Replacement

Prepare Your Phone to Return to the Store or for Warranty Replacement by following these steps:

1. Read the flash counter to make sure your flash count is at "NO". If it reads "YES (x counts)" then you must buy or build a Jig to reset it to "NO"...
...or use chainfire's "Triangle Away" program (which only work on ICS, Android 4.x)
2. Flash the UCKH7-CL503881 stock kernel and system package using Odin or Heimdall.
3. Deal with any special problems.
4. Do a wipe data/factory reset, and remove any personal or sensitive information that remains on the phone.


Note:

Both new and refurbished SGH-I777 phones are now shipping with Android version 2.3.6, UCKK6. As of this writing, March 24, 2012, there is no release of the UCKK6 firmware on sammobile.com, and no one has pulled the stock UCKK6 firmware and packaged it into an Odin flashable tar. For warranty return of phones that shipped with UCKK6, I recommend flashing the stock UCKH7 package contained in this guide. An alternative would be to flash Entropy512's Return/Unbrick to stock Kernel + cache + rooted UCKK6 system package from here, and then to manually remove the traces of root.


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. In order to safely return the phone to the store or to a warranty center, it is necessary that the flash counter indicates "NO" custom binary download and "Samsung Official" current binary. If the flash counter has been incremented, it is necessary to reset the flash counter before returning the phone. The only known way to do this on Gingerbread is by using a Micro Usb Jig to place the phone into download mode which resets the flash counter. Since the advent of ICS for the I777, it is also possible to reset the flash counter using chairfire's TriangleAway application, but only while running an ICS rom.

The Jig is a micro usb plug with 301,000 ohms of resistance connected across pins 4 and 5. The use of the Jig became well known in late 2010 when a batch of Samsung Galaxy S Captivate phones were shipped with bootloaders that did not allow a button combination to enter download mode. That was before the Galaxy S II was released, and the only purpose for the Jig was to put the phone into download mode. Shortly after the International version of the Galaxy S II was released in May 2011, it was discovered that using a Jig to place the phone into download mode also resets the flash counter. Some who had a Jig for their Captivate found that the Jig would not work on the Galaxy S II. It seems that the Galaxy S II's tolerance for the 301k ohms is closer than the Captivate was, so if the resistance of the Jig was a little bit out of tolerance, it wouldn't work on the newer phone.

If you are handy, you can build your own jig. There are several threads in the Captivate forums that detail how, either with or without soldering. For a place to start, check out this thread and this one. There are also multiple places that sell pre-made Jigs. Check out dayv's thread in the Accessories forum. I bought a cheap JIG that works for under $2.00 and free shipping. A google search for "where to buy micro usb jig" will bring up a good number of them. Some of these may not be close enough tolerance for the Galaxy S II. Users on this forum have reported good results with Jigs from Moble Tech Videos.

Once your flash counter reads "NO", use Odin or Heimdall to flash the stock kernel, system image and modem. A wipe data/factory reset performed from the phone or from stock 3e recovery, and removing any personal or sensitive information on the internal sdcard, completes the process.

Information from dayv:
Quote:
Step 1) settings> privacy> factory data reset.
Step 2) Flash with heimdall or Odin

In case you need to repartition, you will need a stock .pit file as well - though as of now as far as I know this is not needed for any reason - none of the roms or kernels in the dev section here in the at&t xda forums would cause any need for a repartition. Take care with .pit and repartitioning as you could end up with a soft brick, a situation that can be recovered from but still not desirable.

And if you have flashed anything containing the boot loaders you will need stock boot loaders too, but be very careful with boot loaders as a mistake with boot loaders can result in a hard brick
Information from pinoymutt:
Quote:
If you flashed the newer i777 leak that DG posted in the General section (I777UCKJ2) or went a little crazy and accidentally flashed one of the newer firmwares in the SGSII international section -- you'll find that they contain newer bootloaders -- the main difference being that they render the "jig trick" useless for resetting the custom firmware flasher.

This (i777 UCKH7 Secondary Bootloader) will allow you to revert back to the older (stock) bootloader that will let the jig reset the counter.

Most likely as new ROMs are built for our phones, many devs will remove the bootloaders, since it's not really advisable to flash these unless absolutely necessary (which for instance it was on the Captivate when flash from a Eclair/Froyo ROM to a Gingerbread one).

Be forewarned -- DO NOT mess with or flash bootloaders unless you absolutely know what you are doing or are sure you need them. Many things can be recovered from if things go wrong, but a bad bootloader flash can create a nasty "brick" that almost always needs some sort of professional help to undo.
Entropy512 adds:
Quote:
This (flashing UCKH7 Secondary Bootloader) reverts to current if you flashed the 2.3.5 leak package accidentally.

I would advise:
DO NOT flash this bootloader unless you have flashed a 2.3.5 leak or I9100 ROM that included bootloaders, AND you have confirmed by trying it that using the jig does not reset your flash counter.

If you don't have a jig, this does nothing for you except risk hardbricking.
If you have a jig and it works to reset the custom binary flash counter, this does nothing for you except risk hardbricking.
If you are reading this Guide before you have flashed anything that would increment the flash counter, your best bet woruld be to never increment the flash counter in the first place. It is possible to root and to flash a custom ROM/Kernel without incrementing the flash counter. Please see the Guide: How to Flash Custom Binaries Without Ever Incrementing the Flash Counter!!



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.
  • If your Custom Binary Download is NO, proceed to step 2. If your Custom Binary download is YES, your only option to reset this to NO is to use a Jig. The Jig is a micro usb plug with 301k ohms of resistance connected across pins 4 and 5. On the i777 running original bootloaders, it will reset the flash counter to NO as it puts the phone into download mode. You can make your own jig, or purchase one from many sources on the web. See the Discussion above for more information.


2a.) Flash the UCKH7-CL503881 stock kernel and system package using Odin3 One-Click Downloader (Windows)
  • Download the "I777UCKH7-CL503881-No-BL.7z" package from Hotfile | Dev-Host 270.17 MB.
  • Extract the contents of the zip file to a directory on your hard disk drive. This Odin3 One-click downloader contains firmware from the stock binary download available from samfirmware on sammobile.com. The bootloaders boot.bin, sbl.bin and param.lfs have been removed for safety. (Contains cache.img, factoryfs.img, hidden.img, modem.bin and zImage.)
  • Start the Odin3 One-Click Downloader program by double clicking on "I777UCKH7-CL503881-No-BL.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 Bone Stock.
  • If your phone enters a bootloop, enter 3e recovery and perform a wipe data/factory reset. See step 4.


2b.) Flash the UCKH7-CL503881 stock kernel and 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 the UCKH7-CL503881 stock kernel and system package from Hotfile | Dev-Host 269.86 MB.
  • Extract the contents of this 7zip package to a directory on your hard disk drive, and move or copy all files to the directory where you have the Heimdall command line executable. These were extracted from the stock binary download available from samfirmware on sammobile.com. (Contains cache.img, factoryfs.img, hidden.img, modem.bin and zImage.)
  • Enter the following at the command prompt:
    Code:
    heimdall flash --kernel zImage --factoryfs factoryfs.img --cache cache.img --hidden hidden.img --modem modem.bin
  • Reboot the phone. Success. You're Bone Stock.
  • If your phone enters a bootloop, enter 3e recovery and perform a wipe data/factory reset. See step 4.


3.) Dealing with special problems.
  • If you are unable to reset the flash counter with a jig, you may have a modified version of the secondary bootloader, perhaps from flashing one of the leaked versions of I777 firmware onto your phone, and will need to flash back to the I777 Stock sbl.bin in order to clear the flash counter.
  • If your flash counter says that your phone is an I9100, you have an I9100 secondary bootloader, probably from flashing an I9100 rom onto your phone, and you will need to flash back to the I777 Stock sbl.bin to correct the flash counter. You will also probably need to flash the stock param.lfs back onto your phone.
  • If you get the error "'logo_att.jpg' draw failed", you will need to replace the param.lfs with the I777 Stock param.lfs.
  • If you get the "Deleting Cryption Meta Data" error while your phone is in a bootloop, see this post.
  • Necessary files and flashing instructions for these are in the Download Repository.

4.) Do a wipe data/factory reset, and remove any personal or sensitive information that remains on the phone.

To perform a wipe data/factory reset from the phone:
  • From the home screen, go to Menu > Settings > Privacy > Factory Data Reset (Gingerbread) or Menu > Settings > Back up and reset > Factory data reset (ICS).
  • If you want to Format USB Storage (erase the internal sdcard), tick the check box.
  • Click the "Reset Phone" button.
  • Done.
To perform wipe data/factory reset from 3e recovery:
  • Reboot into stock 3e recovery: With the phone powered off, hold down the vol up + vol down + power buttons continuously until the initial boot screen appears a second time. Then let the phone boot on into the recovery screen.
  • Use the vol up and vol down keys to select the "wipe data/factory reset" option.
  • Press the home button to start the wipe data/factory reset.
  • Done.
To format USB storage separately (internal sdcard) from the phone:
  • From the home screen, go to Menu > Settings > Storage > Format USB Storage.
  • Click the "Format USB Storage" button.
  • Done.
The Following 93 Users Say Thank You to creepyncrawly For This Useful Post: [ Click to Expand ]
 
Entropy512
Old
#2  
Senior Recognized Developer
Thanks Meter 24092
Posts: 13,129
Join Date: Aug 2007
Location: Owego, NY

 
DONATE TO ME
IMO the mods should sticky this - at the very least jivy26 should add it to the FAQ if it isn't there already.
*so much sig updating needed*

My Github profile - Some Android stuff, some AVR stuff

An excellent post on "noobs vs. developers"

A few opinions on kernel development "good practices"

Note: I have chosen not to use XDA's "friends" feature - I will reject all incoming "friend" requests.

Code:
<MikeyMike01> Smali is a spawn of hell
<shoman94> ^^^ +!
Code:
<Entropy512> gotta be careful not to step on each other's work.  :)
<Bumble-Bee> thats true
<jerdog> compeete for donations
The Following 9 Users Say Thank You to Entropy512 For This Useful Post: [ Click to Expand ]
 
apanihi
Old
#3  
apanihi's Avatar
Senior Member
Thanks Meter 14
Posts: 178
Join Date: Oct 2011
Location: Los Angeles
Very good information here +1 for stickie.
 
MisterEdF
Old
#4  
MisterEdF's Avatar
Senior Member
Thanks Meter 102
Posts: 941
Join Date: Apr 2010
Location: New Jersey
Quote:
dayv has confirmed that flashing a stock kernel on the i777 will remove the warning triangle, but will NOT reset the flash counter. Please see his post here. This means that using this method will leave a trace that can be seen by AT&T or Samsung. Resetting the flash counter by activating download mode using a Jig is the only know way to reset the flash counter. Will post further information on this as it becomes available.
I just ordered my GSII (coming from Infuse) and have been doing a lot of reading in preparation so I may be confused.

Didn't I read somewhere here (FAQ?) that the "JIG FIX" has been disabled by Samsung in the hardware?
 
creepyncrawly
Old
#5  
Recognized Contributor - OP
Thanks Meter 2958
Posts: 2,453
Join Date: Sep 2010

 
DONATE TO ME
Quote:
Originally Posted by MisterEdF View Post
I just ordered my GSII (coming from Infuse) and have been doing a lot of reading in preparation so I may be confused.

Didn't I read somewhere here (FAQ?) that the "JIG FIX" has been disabled by Samsung in the hardware?
Not yet for the i777. The newer unofficial firmware leaks on the i777, and newer firmware releases on the i9100, are said to have bootloaders that disable the Jig fix. Your best and safest bet is to never increment the flash counter. If you have already incremented the flash counter, then get a jig to reset it, and then never increment it again. For more information see the Guide linked in my signature.
The Following 3 Users Say Thank You to creepyncrawly For This Useful Post: [ Click to Expand ]
 
pinoymutt
Old
#6  
pinoymutt's Avatar
Senior Member
Thanks Meter 395
Posts: 1,207
Join Date: Nov 2008
Location: SoCal
Looks like the SBL (secondary bootloader) has been posted so that for those 5% we mentioned above that accidentally flashed that newer leak that disabled the "jig trick", this may be the thing that helps them.

http://forum.xda-developers.com/show...7#post18698937

But be forewarned -- DO NOT mess with or flash bootloaders unless you absolutely know what you are doing or are sure you need them. May things can be recovered from if things go wrong, but a bad bootloader flash can create a nasty "brick" that almost always needs some sort of professional help to undo.

Also +1 that this thread should be stickied!

Phone: Nexus 5 (D820) on AT&T
ROM: Xposed Rooted KTU84P (4.4.4)
Kernel: ElementalX-N5-v1.0

Tablet: Galaxy Note 8 (N5110)
ROM: CivZ-FLEXNOTE-8.0_Rev1.7 (4.4.2)
Kernel: CivZ SphereKat

Backup Tablet: Galaxy Tab 2 7.0 (P3113)
ROM: AOKP KITKAT 2014-05-24 (4.4.2)
Kernel: AGNi pureCM v4.0

Let folks know if their posts provided useful information or assistance by clicking the "Thanks" button
 
gr8hairy1
Old
#7  
gr8hairy1's Avatar
Senior Member
Thanks Meter 169
Posts: 921
Join Date: Nov 2010
Location: Michigan - Thumb

 
DONATE TO ME
Thanks for the walkthrough. Nice to know I got every detail done. Factory wipe just wasn't cutting it (even with stock rom). Had a dead pixel that was bugging me like crazy. Oddly most noticeable when starting the xda app, can we say irony?

And with my new galaxy s II the screen digitizer isn't off near the top and bottom! So much better.

Sent from my SAMSUNG-SGH-I777 using XDA App
 
MisterEdF
Old
(Last edited by MisterEdF; 15th November 2011 at 02:44 AM.)
#8  
MisterEdF's Avatar
Senior Member
Thanks Meter 102
Posts: 941
Join Date: Apr 2010
Location: New Jersey
Using the ODIN 1 CLICK (factory NON-ROOTED) How long should this process take? Been 10 minutes and it is sitting at "Firmware Update Start" then "factoryfs.img." Yes, I have the yellow [COM28]. I've done this before on an Infuse and it was relatively fast. I'm afraid to cancel the process. Previously was on UNNAMED ROM.

EDIT: Also trying ODIN (without 1 step) using the PDA.TAR file and same thing is happening. Just hanging seemingly trying to load FACTTORYFS.IMG.

Edit Edit: Do I need to have a SIM card installed to do this?

Edit Edit Edit: Well, I got it to work. It would not work plugged into any of the 12 USB 2.0 motherboard ports on my PC (never had problem with the Infuse on those same ports). When I connected it to a USB PORT on a USB HUB it worked fine. Very strange.
 
3 or 88
Old
#9  
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Nov 2011
thanks really assisted; have not got the jig yet but did get bad or incorrect off my ATT Galaxy.
 
nickshertzer
Old
#10  
nickshertzer's Avatar
Senior Member
Thanks Meter 596
Posts: 1,124
Join Date: Dec 2006
Thank you! I bought a jig off Amazon for a little under $2 plus shipping. That plus this guide got my SGS2 back to stock.

I really like the SGS2 phone, and holy crap is it fast. Only problem is I'm so used to my Dell Streak's 5" SIZE, my thumbs felt cramped. Almost 2 weeks in with a "tiny" 4.3 incher and I'm sad to go.

I think I can wait on a subsidized Galaxy Note... That should only take, what? Six months? Oh god....

Anyway, obviously your post here is the only reason I can legitimately return within my 30 day period. So, THANK YOU again!


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes