yashsingh1/xdaforums huggingface dataset:
[Verizon Samsung Galaxy S III] enderblue:
So, you managed to trip the flash counter.

Here are the commands to reset the flash counter. This works on my VZW rooted phone. Since all of the other variants have a very similar (same?) partition setup, this "might" work for them as well ("might" is the key word).

I take no responsibility for you voiding warranty.

I used this post as the basis for my theory and then used my phone as the test for said theory: http://xdaforums.com/showpost.php?p=28953690&postcount=67

The "'\x00'" portion tells it what resets it to 0. If you wanted to be funny, you could set it to a different number.

adb shell

su

echo -n '\x01' | dd obs=1 count=1 seek=4193796 of=/dev/block/mmcblk0

I can only confirm that this works on the VZW variant. Until I get some dumps of the other variants, I can only assume it will work for them.

TRY AT YOUR OWN RISK!!!!
[Verizon Samsung Galaxy S III] johnhazelwood:
This is great news! Is there a way to read the value to confirm it's been incremented? (I have an AT&T phone, and would like to confirm the value is 1 right now - which is my current flash count).
[Verizon Samsung Galaxy S III] Raul77:
go to download mode and look on top left of the screen , small text in white.
[Verizon Samsung Galaxy S III] johnhazelwood:
Sorry, I might not have worded that correctly. I'd like to read that memory block that he's proposing we change and see if the value stored is the same as what's displayed on the Download screen (which I can see). Basically, as I understand it, his command will reset the counter. I just want to confirm that on an AT&T flavor of the phone, the results of that memory block are the same.
[Verizon Samsung Galaxy S III] drothenberger:
I think this will work:

dd bs=1 count=1 skip=4193796 if=/dev/block/mmcblk0 2>/dev/null | od -t
[Verizon Samsung Galaxy S III] pinoymutt:
Actually Chainfire just released v1.70 of Triangle Away today that resets the counter on the US/Canadian variants. Not sure if he used the same method as the OP here, but thanks for your research into this as well!
[Verizon Samsung Galaxy S III] gunnyman:
Not seeing that release got a link?
[Verizon Samsung Galaxy S III] pinoymutt:
In his main thread - http://xdaforums.com/showthread.php?t=1494114
[Verizon Samsung Galaxy S III] playboy71322:
can anyone confirm triangle away or this method works on ATT version of the s3?
[Verizon Samsung Galaxy S III] johnhazelwood:
I'm about to try it on my AT&T, but he does callout our version as being supported in his latest release. Wohoo!
[Verizon Samsung Galaxy S III] playboy71322:
ok let me know how it goes
[Verizon Samsung Galaxy S III] johnhazelwood:
Confirmed it works on AT&T. Counter from 1 to 0.
[Verizon Samsung Galaxy S III] playboy71322:
k ill try next lol
[Verizon Samsung Galaxy S III] wbounds:
Change 01 to 00 and have No counts on my AT&T!!!!!!:D
[Verizon Samsung Galaxy S III] playboy71322:
worked for me too!! from 1 to 0!:good:
[Verizon Samsung Galaxy S III] wbounds:
How does this compare to someone who has not tripped their counter?

CUSTOM BINARY DOWNLOAD: No

CURRENT BINARY: Samsung Official

SYSTEM STATUS: Official

If this is correct then we got it and returns are possible
[Verizon Samsung Galaxy S III] dragonslayer73:
Just tried triangle away and it worked for me as well. AT&T S 3

Chainfire u the man.

Thanks..
[Verizon Samsung Galaxy S III] scoot05redss:
Worked for me as well, flash counter from 6 to 0! Thanks CF!
[Verizon Samsung Galaxy S III] XblackdemonX:
it works on Rogers SGS 3 SGH-i747m :good:
[Verizon Samsung Galaxy S III] malinois16:
Works like a charm on the ATT Variant here!
[Verizon Samsung Galaxy S III] minmongoblin:
I'm probably woefully ignorant, but what's the harm in tripping the counter? What happens if I don't reset it?
[Verizon Samsung Galaxy S III] Hypnosis4U2NV:
Does this clear the Samsumg Custom bootscreen with the white unlocked padlock?
[Verizon Samsung Galaxy S III] faehsemc:
Sweet lets get some more roms now
[Verizon Samsung Galaxy S III] eschelon:
Because any count over 0 voids your warranty.

This is helpful for when your phone has suffered some form of hardware failure (say, for example, the volume rocker becomes defective). This was obviously not caused by a custom ROM, but Samsung would refuse to repair it if you took your phone into them and they saw you had a positive flash count.

It's a fine line to walk, but it's helpful for times when there is legitimate hardware failure that should be replaced under a warranty claim that would otherwise be denied if you had a flash count >0.

Possible, although unlikely as the custom "unlocked" icon comes from flashing a custom recovery.
[Verizon Samsung Galaxy S III] Noxious Ninja:
ODINing the stock ROM package clears that away, though, right? (Of course it means losing custom recovery...)
[Verizon Samsung Galaxy S III] Jiggity Janx:
Thanks for this. Always good to have multiple options for accomplishing something so valuable to the community.
[Verizon Samsung Galaxy S III] eschelon:
As far as I understand, a flag is being flipped in the bootloader which causes the "unlocked" padlock to appear. By flashing the tars we have now via odin, it does not flash the bootloader, only /system/ so the flag remains.

That "unlocked" icon will likely be there until the smart guys in the room figure out a way around the locked bootloader.
[Verizon Samsung Galaxy S III] Jiggity Janx:
In Adam's OP are the bootloader and pda to flash. After flashing these and performing a data/cache wipe you will not have the Custom unlock showing. Performed this just last night.

*Just for FYI. He added them yesterday afternoon I believe.
[Verizon Samsung Galaxy S III] eschelon:
Ah, I had not yet seen that we now have a bootloader dump. Great news :D
[Verizon Samsung Galaxy S III] preusstang:
Hmm. Idk. I had the unlocked icon when I was running rooted stock rom with cwr touch, but it went away after flashing the kexec cwr and the one kernel with b00stedass gov.

Strangely, I get the unlock icon - even if the phone is completely stock - anytime I boot into download mode (I think). I've done it on accident a few times.. never noticed the counter before tho.
[Verizon Samsung Galaxy S III] SQFreak:
Is the bootloader dump separate from the stock ROM at http://xdaforums.com/showthread.php?t=1755386, or will flashing that stock ROM also take the bootloader back? I had a custom recovery and flashed a different one, and suddenly I have an unlocked icon. The flash counter is still at 0 though. I tried flashing back to stock recovery and that didn't work.
[Verizon Samsung Galaxy S III] Hypnosis4U2NV:
I ran the app and nothing happened, either after running it and after I rebooted.. Unlocked icon still remains, which is why I asked if it would work..

I think that's more important than the flash counter for us Verizon users since most of us aren't flashing any custom ROMs yet other than stock ones which are rooted and/or debloated/deodexed and zipaligned.. Imagine returning a phone with that custom screen boot screen.. Yikes..

Sent from my Commodore 64..

READY.

load"*", 8,1
[Verizon Samsung Galaxy S III] Noxious Ninja:
I think the bootloader dump is separate from the boot.img in the ROM. The PDA package in Adam's post is the ROM from the stock ROMs thread. I believe they're meant to be used together if you really, really need to wipe everything.
[Verizon Samsung Galaxy S III] Jiggity Janx:
From what I understand you MUST wipe data/cache after flashing to clear the unlock icon. Someone mentioned it in one of the posts (will credit if/when I find).
[Verizon Samsung Galaxy S III] mybook4:
QUOTE=Noxious Ninja;28991583]I think the bootloader dump is separate from the boot.img in the ROM. The PDA package in Adam's post is the ROM from the stock ROMs thread. I believe they're meant to be used together if you really, really need to wipe everything.[/QUOTE]

Yes, boot.img is the kernel. Contains a 2KB header, the kernel, then a gzipped ramdisk (initialization files). In our case the boot.img also contains a signature that is checked by the bootloader (the reason we can't run custom kernels from the default boot.img partition (mmcblk0p7). For anyone interested in learning more, I recommend googling mkbootimg.c and bootimg.h. This is the C program used to package a kernel/ramdisk into the boot.img form. I recommend reading this small program while having the stock boot.img open in a text editor (to follow along).

The bootloader consists of several partitions on the gs3. I forget all of them, but opening Adam's bootloader tar will show what partitions belong to the bootloader on the gs3. The first page of Adam's post also has each mmcblk listed with a name associated (for most of them). The list of the files in the bootloader tar can be matched to the mmcblk locations.

Note: We may be able to flash the bootloader tar in Odin if your phone is working (haven't tried it), BUT if your phone isn't booting correctly (i.e. you messed around with one of the bootloader partitions) it may never get to a state that would allow Odin to work. I'm not positive about this, but better to be safe.
[Verizon Samsung Galaxy S III] Hypnosis4U2NV:
First time it's gone, but reboot and it comes back again..

In case anyone wants to know what the screen looks like:
[Verizon Samsung Galaxy S III] cortland1998:
What is this Flash Counter I am reading about in forums? I've been on iOS for a few years, until this sexy S3 came out. I'm not familiar with Flash Counter... Thanks
[Verizon Samsung Galaxy S III] simollie:
Which Adam's OP? Could you post link please? thanks.
[Verizon Samsung Galaxy S III] Muckrak3r:
It counts the number of times the phone gets flashed. So carriers can reject warranty coverage.

Sent from my locked bootloader Verizon GSIII. :(
[Verizon Samsung Galaxy S III] droidstyle:
My device booted up stock that way...so did a couple other members devices.
[Verizon Samsung Galaxy S III] crabapples:
I flashed the root66 ROM a few weeks back.

I immediately installed Titanium Backup and froze severl unwanted programs.

I ran for weeks without seeing the Custom Padlock Unlocked screen.

Last night I tried unfreezing a few things because my wifi-tether program wasn't working.

turns out unfreezing VerizonSSOEngine made it work again, which it apparently did need before.

Anyhow, on that reboot I had unfrozen VerizonSSOengine and SysScope and I got the custom screen.

I have since tried refreezing SysScope, Wiping Dalvik adn Cache partitions and Running Triangle Away even though my flash counter has always been at 0 despite having been flashed.

Nothing seems to remove this screen which I would very much like to see gone.
[Verizon Samsung Galaxy S III] lowg:
Of those applications did you immediately freeze SysScope.apk?

Also did you ever install a custom recovery?
[Verizon Samsung Galaxy S III] crabapples:
Yes, I had immediately frozen SysScope and I suspect that it is the program that reported my phone custom flashed once I unfroze it and gave the phone a reboot.

I have also installed CWM custom recovery the same day but some hours after I had rooted and frozen applications. That is, I have been running a custom recovery for weeks without the custom screen appearing. Only by unfreezing either SysScope or VerizonSSOEngine did the custom boot screen begin appearing.
[Verizon Samsung Galaxy S III] lowg:
Good to know. I think we can narrow it down to the SysScope.apk at this point.

I rooted a few days ago and immediately renamed only SysScope.apk, and then later did some additional cleanup including freezing VerizonSSOEngine. Yesterday I unfroze VerizonSSOEngine (required for My Verizon Mobile app) and after a few reboots am still good (no custom unlock screen) and Odin mode looks good and shows custom: no system status: original.

Have not yet flashed recovery yet to validate my theory and probably will later this week to see if it trips it but so far looks good. Originally tried only focusing on the SysScope.apk based on my understanding of this analysis done by Lee who is working on unlocking the bootloader.

crabapples, based on that post, can you see if you if you rename SysScope.apk (instead of freeze), then apply the change listed in OP to see if it works.
[Verizon Samsung Galaxy S III] jnehama:
I had to unroot for service reasons so I flashed the uprooted stock zip in ODIN.. Nevertheless my padlock did not "close" until I did a factory reset using stock recovery. I think the padlock is an effect of the recovery. If you have a custom one it shows the open padlock. Revert to stock and do factory reset and it goes away.
[Verizon Samsung Galaxy S III] Hypnosis4U2NV:
I concur, it seems like a result of a custom recovery.. I initially started out with a rooted stock ROM and once I flashed a custom recovery the padlock appeared.. I tried wiping but after another reboot it would pop up again..

Maybe SysScope has something to do with it, but I would take a guess that after the initial boot after wiping, it sets something..
[Verizon Samsung Galaxy S III] lowg:
Did you guys read crabapples post? Didn't seem to have a problem with CWM recovery... Besides that no mention of recovery partion by ralekdev. Not saying it's not possible but you guys should at least try what he suggested first.

Sent from my Galaxy S3
[Verizon Samsung Galaxy S III] crabapples:
Confirmed that flashing back to stock ROM removes the custom screen and sets Odin's Status back to official. I flashed root66 and immediately froze SysScope right off the bat.

Rebooted and all seemed well.

Flashed CWM Receovery with ROM manager and the custom screen has returned.

I didn't try wiping/factory reset but may do so in the near future.
[Verizon Samsung Galaxy S III] Hypnosis4U2NV:
Those were my exact findings also..

Sent from my Commodore 64..

READY.

load"*",8,1
[Verizon Samsung Galaxy S III] lowg:
After getting the custom unlock did you try method in OP to see if it clears it?

In any case my plan is to disable libcordon.so (assuming it is possible code in this lib could be called during boot seq?) make sure system is stable for a few days, then flash CWM to see if it trips the counter. So far I'm good with root (via debugfs exploit) and disabling sysscope.apk.
[Verizon Samsung Galaxy S III] neyenlives:
haha, i've flashed so many things and gone back and forth to stock and AOSP and currently running CM10 and mine shows like that, never reset it
[Verizon Samsung Galaxy S III] McAwesome:
Confirm on ATT Version. Works like a charm. Had to flash back to straight stock though to get it to work.

2992
[Verizon Samsung Galaxy S III] ZUUL42:
It appears to also set the counter back to 1 on the Sprint SPH-L710 / d2spr variant.

Thanks.
[Verizon Samsung Galaxy S III] lowg:
Just wanted update everyone, I did try also disabling libcordon.so, flashed TWRP 2.2 today using dd and no custom unlock screen.

Not sure what rommanager does when flashing CWM recovery outside of using dd. If someone is up for it, try disabling both SysScope.apk and libcordon.so after rooting before flashing with Rom Manager. Based on my testing it looks like ralekdev's findings are spot on.
[Verizon Samsung Galaxy S III] myredfast:
Idk, I was running the stock image and stock recovery, rooted only, for several days cause I was waiting to see if the "custom" unlock was going to be figured out, and out of the blue it popped up. But, it only showed up maybe 1 out of four boot ups. Once I flashed a custom recovery it showed 100%. However it did show with stock recovery. Kinda weird!
[Verizon Samsung Galaxy S III] thcaddict:
will this method mentioned on OP work for resetting the flash counter on the US Cellular version of the S3?
[Verizon Samsung Galaxy S III] im_on_fire:
well if you copied and pasted the original code in Op that's what it is set as. change x01 to x00

but i could be wrong
[Verizon Samsung Galaxy S III] Broadley1:
Hey guys I'm on a Verizon s3, well I rooted it using root66 and had no issues with the open padlock showing up. Well when I changed the battery icon I did a backup and then the padlock showed up. Now I've read all the posts in here and am a little confused on how to make it go away? Triangle away? I mean it's not bugging me right now so don't wish to factory reset but if need be what do I do?:)
[Verizon Samsung Galaxy S III] kmoore11:
OK sorry for being such a noob... but I'm coming from an HTC, and am completely new to all this Smasung, ODIN, and flash counter stuff. I have flashed a custom recovery and few ROMs, but I haven't seen anything in download mode that even mentions a flash counter or anything. It says I don't have a custom binary, and I have the Samsung Official, and the system status is official. Does that mean my flash counter is 0? Also haven't noticed the padlock anywhere when booting up the phone. When would that appear?

Definitely need to get some info on this since I have to send this phone back to Verizon
[Verizon Samsung Galaxy S III] Broadley1:
:thumbup: The padlock would show under the Samsung first thing on a boot up. It would say custom.
[Verizon Samsung Galaxy S III] loveubuntu:
I have rooted via ODIN, flashed all kinds of recovery via the roms or the EZrecovery app, and ran all kinds of roms (stock, custom stock and CM10) but my flash counter still says 0. I wouldn't care normally but I have lost 4G and want to flash back to stock to see if I can get it back. How is it that such a flash-whore like me still has a 0 as his flash counter?

I used the Triangle Away app from the Market (yes the paid version not free from XDA) to confirm this.
[Verizon Samsung Galaxy S III] xXJay_RXx:
Let me know if you get 4G back. I lost 4G trying to switch to 3G with the Phone Info app from the market n now I can't connect to 4G. Might Odin to stock. If that doesn't work, I'll have to send it in to Samsung n then reset my flash counter

---------- Post added at 10:45 AM ---------- Previous post was at 10:38 AM ----------

I just tried Triangle Away and it also says my flash counter is at 0. Weird but good I guess
[Verizon Samsung Galaxy S III] piiman:
just restore your last backup that had 4g working and it should be back. This is a known issue with some ROM's
[Verizon Samsung Galaxy S III] preusstang:
My flash counter has never gone up although I do have the unlock symbol because of custom recovery. According to posts in the bootloader unlock thread, this unlock symbol also causes like a .5s or 1s delay in boot. This is painstakingly obvious when using the automated kexec where it reboots like 3 times and takes forever..

Based on your dd command syntax as well as logic from ralekdev's original pm to adam, I assume this code should change the "binary_type" integer to 0 (Samsung official), which should be located at 0x3FFE12 on the MMC.

echo -n '\x00' | dd obs=1 count=1 seek=4193810 of=/dev/block/mmcblk0

From my understanding this should wipe the custom unlock thing and speed up the boot process. I have tried this already though and it has no effect. :( its a shame because if it did I would try to inject this into the auto kexec method and hopefully speed things up..
[Verizon Samsung Galaxy S III] Srambo217:
So is it possible to run this command directly from the device?

Could I just enter the following into Terminal Emulator?

su

echo -n ‘\x01′ | dd obs=1 count=1 seek=4193796 of=/dev/block/mmcblk0
[Verizon Samsung Galaxy S III] preusstang:
Yes. But you'd wanna change x01 to x00. Unless you want the flash count to be 1 :P
[Verizon Samsung Galaxy S III] Srambo217:
Thanks for the heads up haha

Worked great!
[Verizon Samsung Galaxy S III] Srambo217:
Well, it DID work.

I reverted to an older backup and now it's not resetting.

Is the x00 the only variable that needs to be changed? Not the Count ?
[Verizon Samsung Galaxy S III] preusstang:
x00 is the new hex value for the variable youre changing. the variable you are changing is the flash count - a (4 byte) integer stored (starting) at 0x3FFE04 into the internal SD card. That a hex address (base 16), so the decimal offset is actually 4193796, as the OP said.

So you restored an old nandroid? And now the flash count is 1 again? You should be able to issue the command again and it will set the flash count back to zero.

Or are you talking about the unlock symbol? (The flash count is the little number shown when booting into recovery. Flash count and unlock symbol are completely different :P)
[Verizon Samsung Galaxy S III] njcobra10tha:
Does anyone know if the Jig will reset the counter like on the SII?

If I power on with Jig it does go to downloading mode.

-D
[Verizon Samsung Galaxy S III] thcaddict:
This also works on the Galaxy S3 variant from US Cellular. Confirmed. Thank you!
[Verizon Samsung Galaxy S III] Srambo217:
Yeah dude, it's definitely not working for me.

Sent from my Samsung Galaxy SIII
[Verizon Samsung Galaxy S III] Srambo217:
I've tried other terminal apps and have the same results.

Sent from my Samsung Galaxy SIII running CleanROM 1.2
[Verizon Samsung Galaxy S III] NegativeOne:
Guys, let me say this... Only bother with this if you're going to be sending it back to VZW / Samsung for a warranty replacement. And even then - VZW probably won't even have the tools to check it. They probably just send them all to Sammy for a refurb.

No point in doing this now that we have an unsecure bootloader!!!!
[Verizon Samsung Galaxy S III] mybook4:
Check out the bootloader unlocking thread in the original development forum. It's 30 some pages, but information posted by Ralekdev birthed this thread. In reverse engineering the boot chain partitions, he found the emmc address responsible for storing the unlock status/count. By snooping through your bootloader partitions with a hex editor you can find the correct address (after safely copying their contents to your pc).

Great learning experience. I believe it's in the params partition.

... or you can leave the count as it is. Keep in mind that since the count isn't working for you, it's possible that you messed up something adjacent to the count.
[Verizon Samsung Galaxy S III] PJnc284:
orrrr you can just use Triangle Away and be done with it.
[Verizon Samsung Galaxy S III] preusstang:
Yes. That will bring you to the conclusion in the OP. And mine in my previous post about the custom unlock icon :)
[Verizon Samsung Galaxy S III] wideasleep1:
Confirmed on TMO version! My touchscreen is dead, and couldn't use TriangleWay..this worked a treat! :)
[Verizon Samsung Galaxy S III] preusstang:
How do you even use the phone if the touch screen is dead? Lol
[Verizon Samsung Galaxy S III] wideasleep1:
One doesn't! Mskip's tools and this thread got me back to stock condition..we'll see what Sammy does next...
[Verizon Samsung Galaxy S III] wideasleep1:
Plano replaced my LCD, on its way home! Cheers to XDA and this thread! :D
[Verizon Samsung Galaxy S III] lathamc:
Does not work on Sprint Galaxy S3. I tried it, but it reset the flash counter to something like 3 million counts (which is quite impressive). I went ahead and forked over the $2.49 to buy Triangle Away, which worked fine.
[Verizon Samsung Galaxy S III] joshw0000:
What exactly trips the flash counter? I was under the impression that flashing anything other than stock would trip it. So far I've flashed Synergy, ParanoidAndroid, Jellywiz, and the new radio. I just checked my phone in download mode and everything still says official.

EDIT: I just flashed a custom kernel. I checked in Download mode again and everything is still set to Samsung Official. However, in settings > device status I know see "modified". I almost want Download Mode to show as modified so I can reset it lol.
[Verizon Samsung Galaxy S III] ALUCARDDEV:
Just downloaded Triangle Away from the forum. Wanted to see what it displayed before purchasing. Flash counter was already 0. Something in the root method or ROM that resets automatically? Also showing official binary.

Sent from SCH-I535 (CM10 0920) via XDA Premium