yashsingh1/xdaforums huggingface dataset:
[Galaxy Ace S5830 Q&A, Help & Troubleshooting] skayable:
So I sent that phone in service. They said, that the software was modified and the warranty is void. I said, they shouldn't repair it and send it right back. When I got the phone back, it worked! They flashed a new bootloader, found out that it's rooted and sent me back. Good method to get it repaired :D

That's so funny. :)
[Galaxy Ace S5830 Q&A, Help & Troubleshooting] jhay0017:
Help with my galaxy ace bricked

Hi guys, im using a rooted 2.3.6, then i did the partition for link2sd, and everything worked perfect, however since i downloaded some apps first before doing the partition, i decided to do factory settings on the phone settings so it would be like a fresh internal memory then begin downloading when link2sd is already placed, however after doing factory reset on settings, my phone just keep on rebooting, everytime i open it, i downloaded the firmware in sammobile, as per advised, however im not sure how to flash it. should i use ODIN, or use CWM and do this process.

Using CWM.

Copy Zip to SD Card

Reboot into recovery

Wipe Data/Factory Reset

Wipe Cache Partition

Install Zip From SD Card

Flash ROM

Reboot

or should i follow this instruction via odin

http://www.droidacid.com/how-to-flash-official-firmware-on-galaxy-ace-gt-s5830-using-odin-droidacid/

Thanks,, kindly reply to this, need help badly.
[Galaxy Ace S5830 Q&A, Help & Troubleshooting] Ivandreix:
In case of bootloop use odin and flash a stock rom.
[Galaxy Ace S5830 Q&A, Help & Troubleshooting] skinnykins:
Galaxy Ace 2 18160

Hi,

My son had this phone and rooted it, bricked it and dumped it. I would like to see if I can make it work again. It is hard bricked so the three button combo doesn't work. Can this be phone get working again?
[Galaxy S 4 Developer Discussion [Developers-Only]] mathieulh:
I am writing this to provide further understanding on how Samsung is preventing tools such as Triangle Away from tricking the Service Centers employees into thinking that your phone only ever ran Samsung approved binaries/roms.

This protection is enabled on newer Exynos based devices such as the GT-I9500, the Qualcomm chipset based devices seem to have been spared from it at the moment, most likely because the eMMC hardware is different.

The GT-I9500 bootloader is now setting the /sys/block/mmcblk0boot0/ro_lock_until_next_power_on flag at boot.

This is an eMMC feature that effectively locks the partition to read only until the eMMC hardware is restarted (basically until you reboot your phone)

While the /sys/block/mmcblk0boot0/ro_lock_until_next_power_on is software triggered, the lock itself is enforced by the eMMC hardware, once it is set, there is no getting around it.

Because this is set in the bootloader long before a kernel starts, and therefore long before we get to run our own code, and that the partition is locked by the eMMC hardware afterward, the only way to write the counter back is to do it at the bootloader level before the flag gets set, this means either exploiting the bootloader or replacing it by an older (engineering) version that would not set that particular flag (however an older bootloader may not support future components of the phone as they get replaced in the future, such as a newer OLED panel for instance)

Seems like a lot of trouble just to be keeping a warranty intact.﻿

I hope this post shed some more light on the matter, this may also give you an idea of what awaits in the future in terms of security on future handsets.
[Galaxy S 4 Developer Discussion [Developers-Only]] matrix.bharath:
So are you saying there is no way that we can reset the counter going forward or are you saying That one of our Smart XDA Developers are going to crack it ? :D
[Galaxy S 4 Developer Discussion [Developers-Only]] REVERSiN:
Nah, i saw too many complicated things get Cracked,Hacked... Moded... its only a matter of time

basicly a bootloader exploit is a solution but on the other hand its always too risky to flash them as not every I9500 is 100% identical to another some behave in a good way other make trouble depends on the chip.

still the best solution is to disable that mechanism protection so that the counter is never set. in one way you won't mind any custom ROM installation and you can be happy counter doesn't raise up the one thing is the users which are already running custom and have a binary lock these can't do a thing for now, the only issue here is the SU being place on the system partition triggers is, and basicly any app such as TriangleAway requires it so even if you think to restore stock and it works you can't reset counter since it needs root --> and again LOCK.
[Galaxy S 4 Developer Discussion [Developers-Only]] Chainfire:
I wouldn't worry about it ... ;)
[Galaxy S 4 Developer Discussion [Developers-Only]] Yuna:
> still the best solution is to disable that mechanism protection so that the counter is never set. in one way you won't mind any custom ROM installation and you can be happy counter doesn't raise up the one thing is the users which are already running custom and have a binary lock these can't do a thing for now, the only issue here is the SU being place on the system partition triggers is, and basicly any app such as TriangleAway requires it so even if you think to restore stock and it works you can't reset counter since it needs root --> and again LOCK.

well, not really correct. you can temproot system, using some android exploit.

you install stock after using triangleaway on rooted rom = counter is 0

if you temproot wthout kernel flash - counter is 0
[Galaxy S 4 Developer Discussion [Developers-Only]] KTM690:
So if I'm reading this correctly, there is no way at this stage to reset counter.

I have a faulty i9500 that I need to send back under warranty but I have flashed a custom ROM.

Does this mean I have a brand new S4 that is useless & no way to fix it?
[Galaxy S 4 Developer Discussion [Developers-Only]] Gillion:
Read post #4 ...:D

Sent from my GT-I9500
[Galaxy S 4 Developer Discussion [Developers-Only]] KTM690:
I did, but not sure what Chainfire meant by "I wouldn't worry about it ..."

Hopefully he means he will have a fix shortly ;)
[Galaxy S 4 Developer Discussion [Developers-Only]] Vijay563:
Hope, ChainFire could resolve :fingers-crossed:
[Galaxy S 4 Developer Discussion [Developers-Only]] Svid:
If he said we don't need to worry everything is under control :)
[Galaxy S 4 Developer Discussion [Developers-Only]] matrix.bharath:
Please break the suspense .. is there a way ?
[Galaxy S 4 Developer Discussion [Developers-Only]] sorg:
actually, i've posted similar article sometime ago:

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

But since i've asked for workaround, moderators threw away my thread to Q/A section and made that topic orphaned >8-E

Engineering bootloader works fine and allows to write to boot block and reset the counter.

Not sure what Chainfire means. Is there a way to cycle power on eMMC to reset the flag? Otherwise, only engineering bootloader will allow to reset counter and flags.
[Galaxy S 4 Developer Discussion [Developers-Only]] Rahulrulez:
I've got the feeling. This is the last ever Samsung phone I've bought :) I will happily move to other manufacturer now. No reason to love Samsung phones now. HUGE DISAPPOINTMENT.. Spent like $800 for this device and it has very very less REAL DEVELOPMENT ROOM.. No sources, crap architecture engineering, unfinished ROMS.. Nothing is good..

hardware is damn good but Samsung failed it :(
[Galaxy S 4 Developer Discussion [Developers-Only]] mathieulh:
To be honest, the same things happen on the htc one, if you want to unlock its bootloader, you forfeit its warranty. Nothing new here.
[Galaxy S 4 Developer Discussion [Developers-Only]] mathieulh:
Oh ! I never saw that thread before. I was just wondering back then why TA wouldn't work on the phone and started looking.

It's nice to see that someone else has researched this issue :)

To be quite honest with you though, I use the GT-I9505 as my daily driver.
[Galaxy S 4 Developer Discussion [Developers-Only]] sorg:
Honestly, i don't see a reason to always keep the counter at 0.

For the warranty purpose there is a way to revert everything back:

1) flash official firmware through Odin

2) flash custom recovery with accessible mmcblk0boot0.

3) backup whole mmcblk0boot0

4) flash engineering bootloader

6) in any hex editor: reset the counter and flags in mmcblk0boot0 dump.

7) in recovery: flash the mmcblk0boot0 with your zero-counter dump. Don't reboot yet!

8) in recovery: flash recovery partition with official recovery. Don't reboot yet!

9) perform the factory reset.

10) reboot.

Now you have innocent I9500 device ;)
[Galaxy S 4 Developer Discussion [Developers-Only]] matrix.bharath:
Wowww Great.. Can you Give us some detailed setup i or Ash will Probably make a Tutorial Video of it with the right info, for now its all thanks to you.. can you also provide links to the above Custom Recovery Files etc. that are needed to get the above working?
[Galaxy S 4 Developer Discussion [Developers-Only]] sorg:
That's rough walk-through, using some quick-made kernel and perform most steps in command line through adb in shell. I believe there are some kernels with mmcblk0boot0 are floating around. It needs to be polished and easier to repeat for generic user. I'm sure someone will make more user-friendly guide with all necessary files.
[Galaxy S 4 Developer Discussion [Developers-Only]] KTM690:
Great work sorg.

Any chance of a noobs guide to this?
[Galaxy S 4 Developer Discussion [Developers-Only]] aslak89:
Bytheway, is it possible to flash bootloader(sboot.bin) on cwm recovery?

I've tried to include bl in rom zip
[Galaxy S 4 Developer Discussion [Developers-Only]] manmademagic:
Awesome, hopefully it'll be up soonish (Even if not for the generic user), as I really need to take mine into a service centre.

And on that note, do the Samsung techs have their own software for diagnostics, or do they rely on the information presented on the device itself?
[Galaxy S 4 Developer Discussion [Developers-Only]] sorg:
Odia told they have special (very ugly) tool to check for root (and counter may be). Since this tool is not leaked for public, i have no idea what and how it checks the device.
[Galaxy S 4 Developer Discussion [Developers-Only]] smackdownn:
Well if u really wanna give it for warranty replacement you can just backup everything in phone. flash a bootloader and remove the cable while flashing. ur phone is completely fu****. then claim warranty saying it turned off and is never turning on again :P. nothing they can do now other than replacing :P
[Galaxy S 4 Developer Discussion [Developers-Only]] mathieulh:
They can reflash the bootloader using JTAG (on the I9500 version) or using the Qualcomm vendor interface on the I9505, then they can read the partition and check the counter once andoid is up and running again.

They most likely won't replace the board unless there is a hardware failure happening to it.
[Galaxy S 4 Developer Discussion [Developers-Only]] REVERSiN:
mathieulh you are right mate, as i say to everyone not every brick is a total MB replacement... anyway JTAG is a hard ass job disassemble the phone to force flashing a bootloader nah not a good idea :D forget about messing with sammy they already heared all the tricks even the one with the charger :P
[Galaxy S 4 Developer Discussion [Developers-Only]] Garethkungfu:
Official flash trick

Just a thought but hear me out for a second,

What are the differences between flashing a Stock ROM and an Custom rom/Kernel or whatever?

How does the phone identify between the two?

Also if the Counters Status does not increase with Official Flashes then would it be possible to somehow "trick" the phone into thinking that whatever we are flashing is official? instead of resetting or clearing the counters flags?

just a thought so lemme know if its possible or where i have a flaw in my brilliant plan?
[Galaxy S 4 Developer Discussion [Developers-Only]] prodigyX:
I'm not a dev or any kind of expert, but I'm pretty sure its the 'signature' that comes with the official firmware that results in the counter not being affected. Custom ROMs aren't officially signed by Samsung so they trigger the counter. It's probably near to impossible to copy Samsung's signatures to include in custom ROMs, but if it were, then that might be a viable option :silly:
[Galaxy S 4 Developer Discussion [Developers-Only]] Odia:
Near to impossible, but not impossible ... :D
[Galaxy S 4 Developer Discussion [Developers-Only]] matrix.bharath:
Wohoooo.... Can you export this and send it our Genius ROM Cooks.. Indie and Wannam? so that they can include this in the ROM's for 0 Binary Counter...
[Galaxy S 4 Developer Discussion [Developers-Only]] miahegypt:
Even if they did

the moment you root your phone or flash cwm

the counter will start

and you won't be able to erase it

the best solution is a method to reset the counter and i think

Chainfire

is not doing it soon
[Galaxy S 4 Developer Discussion [Developers-Only]] Easton999GS:
are you the PS3 Hacker mathieulh ? or are you a different one. I used to idol you.
[Galaxy S 4 Developer Discussion [Developers-Only]] matrix.bharath:
Well then can we push this on a Stock ROM without CMW or Root and then flash through ODIN?
[Galaxy S 4 Developer Discussion [Developers-Only]] mathieulh:
I am the one, there is no need to idol me though xD
[Galaxy S 4 Developer Discussion [Developers-Only]] mathieulh:
Wow ! did you bruteforce that hash O_o ?
[Galaxy S 4 Developer Discussion [Developers-Only]] miahegypt:
What is the point then?

you cant flash kernels or mods cause u don't have CWM

We already have prerooted stock roms

I think i'll sell my i9500 and get HTC one

This is the worst developers support i'v seen for a phone i'v owned
[Galaxy S 4 Developer Discussion [Developers-Only]] matrix.bharath:
Oh Man, im talking about this only when you need to give it to service center's if some issues occur, rest of the time we can always use the custom ROM's..
[Galaxy S 4 Developer Discussion [Developers-Only]] sorg:
it makes me recall old anecdote when every Chinese people tried password "Mao Zedong" for Pentagon server, and on billionth time server gave up and accepted it :D
[Galaxy S 4 Developer Discussion [Developers-Only]] Garethkungfu:
Hi Odia,

So in your opinion is something like this possible, to perhaps port that signature over to a .md5 file?

As soon as we have root without binary being tripped surely we can use Mobile Odin as a Temp fix as to flash things without tripping that pesky counter.:highfive:
[Galaxy S 4 Developer Discussion [Developers-Only]] Gillion:
The flaw is thinking that Samsung developers have not thought of the same thing your thinking but it won't hurt to look. Silly mistakes by professional developers are made from time to time.

The is a way to sign the packages with a key that samsung wont be able to change easily because it ishardware related ... the problem is to find and duplicate the key.

I think they found the key for the S2 ... but by then the device was outdated by the S3 and Note2.

Its not impossible just difficult.

Sent from my GT-I9500
[Galaxy S 4 Developer Discussion [Developers-Only]] alipingdante:
...for me I had flashed my fone with I9500XXUAMDL_I9500OLBAMDK_XSP, then check update via Kies and install I9500DXUBMEA update and everything back to stock.
[Galaxy S 4 Developer Discussion [Developers-Only]] mathieulh:
The counter is hidden and not visible to the end user, because your status is no longer set to "custom" and thus a warning is no longer shown, doesn't mean that your binary counter went back to 0.
[Galaxy S 4 Developer Discussion [Developers-Only]] Odia:
You cannot port it over to an .md5 file, what your looking at is not even md5, plus it would appear no one understands what I have shown.

Even if everything was signed once you install a root process the system status will become custom because of the OS scanner by Samsung (SysScope)

Anyway, it's best you ask someone like supercurio, because as he says I am clueless, so what do I know about anything, plus the way the management act on this forum, I have no idea, if any of my posts or threads will remain from 1 minute to the next.

Anyway I am in the process of leaving this forum because of its double stardards, seems some here are above any rules.
[Galaxy S 4 Developer Discussion [Developers-Only]] mathieulh:
Hum.. correct me if I am wrong, but isn't your picture displaying a collision of the data's hash matching the one stored in the original existing signature ? (That's my understanding of your picture) Then again if that's it, I wonder how it could be done, knowing how hard and improbable it is forge a sha-1 collision.

P.S. given the length of the hash (160 bits) used in the digest (within the picture), it's a given that this isn't md5, it could obviously have only been ripemd160 or sha-1, this makes me wonder how the hell anyone could claim this to be md5 in the first place O_o (md5 hashes are 128 bits long)

from my GT-I9505 using xda premium
[Galaxy S 4 Developer Discussion [Developers-Only]] Jonny:
Thread was moved mistakenly by another moderator. I have moved it back.
[Galaxy S 4 Developer Discussion [Developers-Only]] mathieulh:
Well, the thread was originally located in the I9500 original development section. So I am guessing it's still not been moved to the right place. I assume this place is as good as any though.
[Galaxy S 4 Developer Discussion [Developers-Only]] Jonny:
Hmm in that case I can kinda see why it was moved, it just wasn't moved to the correct forum. When we move a thread no record is left of where it was, only where it has been moved to so I had originally assumed it was in general before. Original development forum is for actual development, like CM/AOKP/Paranoid Android ROM's and custom kernels etc, not really suitable for discussion.

Now I know this though the place where it probably belongs is S4 developer discussion - but if I move it there then as with all threads in the developer discussion forums there must be strictly no off-topic or Q&A type posts, pure discussion.

As the OP of the thread, I'll let you decide where you want it to be, here (general forum) or the developer discussion forum? :)
[Galaxy S 4 Developer Discussion [Developers-Only]] mathieulh:
Developer discussion would be best.

When I first started this thread I intented for it to stay on topic, but I can't control what gets posted in here.

I would rather have this thread with no off topic posts if possible.
[Galaxy S 4 Developer Discussion [Developers-Only]] Jonny:
Done :)
[Galaxy S 4 Developer Discussion [Developers-Only]] marc_ecko28:
How can you say worst dev support? Because you can't reset the counter? And there is no tools yet to reset it?

Besides most of every devs here starts their thread with do it with your own risk and your warranty is void. We are not paying the devs here and they do it for free.

You should know it :)

If you are worrying about your warranty then you are not supposed to be here.

:eek:

Sent from my GT-I9500
[Galaxy S 4 Developer Discussion [Developers-Only]] Anakha56:
Thanks for the post. Its always interesting to read something like this. I also have full faith in [MENTION=631273]Chainfire[/MENTION] to find a workaround ;).

Side question, is there anyway in adb to read the counter? After reading the thread and seeing reference to Samsung having their own software to read the count I doubt it but I thought I would ask anyway.

*fingers crossed the dev's will find a workaround* :)
[Galaxy S 4 Developer Discussion [Developers-Only]] mathieulh:
Just read the mmcblk0boot0 partition. It can be read, it just can't be written to.

Samsung's root checker software just parses the counter data from that partition.

There is no rocket science involved in there.
[Galaxy S 4 Developer Discussion [Developers-Only]] ifti_a:
Just curious are you the htc sensation Jonny who made the dark forest tweaks for the sensation ?

---------- Post added at 04:08 AM ---------- Previous post was at 04:05 AM ----------

And is this binary counter a big deal if sending the device back under warranty ? I want to put a custom ROM on my device but this is holding me back, I heard if I use the world premiere ROM from i9505 it doesn't mess with the counter ? Little confused

Any help would be appreciated

---------- Post added at 04:09 AM ---------- Previous post was at 04:08 AM ----------

And does triangle away reset the i9505 counter but not the i9500 one ?
[Galaxy S 4 Developer Discussion [Developers-Only]] Jonny:
Yes, you can see from my signature ;)
[Galaxy S 4 Developer Discussion [Developers-Only]] ifti_a:
cool i was using mobile app so couldnt see the sigs,

good to see you here. do you know triangle away actually resets the binary counter on i9505 ? i know it doesnt work on the I9500.
[Galaxy S 4 Developer Discussion [Developers-Only]] Yuna:
>Just read the mmcblk0boot0 partition. It can be read, it just can't be written to.

how do i read it?

I have no such device in booted up android.

root@android:/dev/block # ls
ls
loop0 mmcblk0p14 mmcblk0p8 ram18 ram30 ram43 ram56
loop1 mmcblk0p15 mmcblk0p9 ram19 ram31 ram44 ram57
loop2 mmcblk0p16 param ram2 ram32 ram45 ram58
loop3 mmcblk0p17 platform ram20 ram33 ram46 ram59
loop4 mmcblk0p18 ram0 ram21 ram34 ram47 ram6
loop5 mmcblk0p19 ram1 ram22 ram35 ram48 ram7
loop6 mmcblk0p2 ram10 ram23 ram36 ram49 ram8
loop7 mmcblk0p20 ram11 ram24 ram37 ram5 ram9
mmcblk0 mmcblk0p21 ram12 ram25 ram38 ram50 vnswap0
mmcblk0p1 mmcblk0p3 ram13 ram26 ram39 ram51 vold
mmcblk0p10 mmcblk0p4 ram14 ram27 ram4 ram52
mmcblk0p11 mmcblk0p5 ram15 ram28 ram40 ram53
mmcblk0p12 mmcblk0p6 ram16 ram29 ram41 ram54
mmcblk0p13 mmcblk0p7 ram17 ram3 ram42 ram55
root@android:/dev/block #
[Galaxy S 4 Developer Discussion [Developers-Only]] mathieulh:
Hum... It seems the Samsung kernel hides it, it is defined in the PIT file though: http://xdaforums.com/showpost.php?p=39844247&postcount=1

I guess Samsung engineers flash an engineering kernel on the device before running the root checker tool.
[Galaxy S 4 Developer Discussion [Developers-Only]] Jonny:
Sorry, this Samsung stuff is pretty much greek to me, I know the basic stuffs but I'm still a HTC guy, still have my Sensation until September/October when I'm upgrading my contract for a One :)

Maybe asking chainfire or someone who actually owns a I9505 would be better ;)
[Galaxy S 4 Developer Discussion [Developers-Only]] N1NJATH3ORY:
Sorry for the dum questions how does binary counter get triggered ?Does it get triggered while rooting or does it get triggered while flashing custom rom ? i have a i9500 E300S and how does one check binary count on the device ? Thanks People........
[Galaxy S 4 Developer Discussion [Developers-Only]] ayush12345:
I agree that reading the steps will make us understand that the counter wont reset but the binary status definitely shows as official. I couldn't believe my eyes with that. Does that mean the counter is reset or just displays that for some other reason ? Anyways I am just going to go ahead and try to install stock firmware and check again.

I'll report back ASAP.
[Galaxy S 4 Developer Discussion [Developers-Only]] tollboy:
I didn't get it. What will u report?

Is there way u can read the binary counter? And u will report if the counter is reset or not?
[Galaxy S 4 Developer Discussion [Developers-Only]] ajhavery:
Will the counter trigger if you will factory reset the phone from stock recovery? Since /data and /cache emmc partition will be erased and overwritten?
[Galaxy S 4 Developer Discussion [Developers-Only]] tollboy:
No it won't
[Galaxy S 4 Developer Discussion [Developers-Only]] Kasdarack:
I had tripped my counter and gotten the triangle when I rooted with motochopper and flashed a new recovery.

However, after a soft brick I flashed back to stock through odin using AdamOutler's package and it reset my flash counter, apparently. No more triangle.