2

Description of the problem:

I have a 4GB eMMC chip that is "broken" which causes the device (TV) to not boot. After soldering this chip to an adapter I am able to dump it. When comparing the dumps, I can see that there are many differences between the dumps. Some portions are completely identical though. My hope is to use some tool to compare all of the dumps (however many I might need) and restore an image of the original firmware. This is based on my assumption that statistically (over many runs) every bit would be read correctly and would thus allow me to piece together a complete and correct image.

Is there a tool for a task like this?

I'd prefer a Windows application but Linux is fine too. And it should be free or even open source. I imagine that it wouldn't be too hard to write a basic python script to do this task but maybe there is already a pre-made tool. If it's written in python it's pretty much platform independent anyways.

Also, are there good tools to visualize differences is large binary files?

More info on the eMMC: it's a H26M31003GMR My guess as to why it broke is that the firmware is poorly written and too much data get's written to the eMMC causing it to fail eventually.

Here's an example of the data:

Difference example

  • First dump byte: 11000000
  • Second dump byte: 10000000
  • Difference: 1 Bit

eMMC connected via SD interface

1 Answer 1

1

I can not comment so I apologize for 'answering', but it seems to me you need error correction or even RR retries rather than guessing disguised as statistics. So for this you'd need a reader/adapter that dumps the NAND while bypassing the controller. See for example: http://www.flash-extractor.com/manual/read_retry/step_by_step/.

Also if we compare C0 and 80 binary:

  • C0 - 11000000
  • 80 - 10000000

we indeed see one bit difference and each time it's the same bit that 'flipped'. If you see same bit 'hanging' in other places too it may be a 'stuck' bit. I don't work with eMMC chips (but these are basically NAND chips with integrated controller) but have seen this happen with for example CF cards several times:

enter image description here

Marked bytes are one bit different from expected values. In some cases it turned out to be a bad reader! So you may want to check your connections too. In other cases it did not appears related to the reader which made these cases unrecoverable. Even when attempting chip-off using Flash Extractor resulted in same 'stuck' bits as they were simply programmed this way. IOW error occurred as data was written to NAND.

Anyway, I think WinMerge may be able to do what you want.

Edit: BTW HxD from above screenshot also offers a file compare: https://mh-nexus.de/en/hxd/

4
  • Thank you for your answer. Unfortunately WinMerge can't open my 4GB files. Just copying the upper first few hundred MB and comparing them between two dumps, I can already see TONS of differences :(
    – Wi_Zeus
    Apr 11, 2021 at 16:40
  • HxD also has a compare feature BTW. Apr 11, 2021 at 17:56
  • Yes it does, but it's not that useful since the differences are only highlighted one by one.
    – Wi_Zeus
    Apr 11, 2021 at 18:17
  • Oh of course, yes. That's impractical. Apr 11, 2021 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.