2022-05-05 1902 ET

I've written code to parse the download agent firmware for the different
mediatek phones and dumped the chip id -> platform table used to index the
firmware.

It was difficult to do the table dumping. If I've ever written a patcher
before, it was a very very long time ago. It uses gdb to load a .so into
the binary to output the boost::container::map that the table is
constructed into. This seemed easier for me than decompiling all the
inlined hardcoded item insertions.

Here's the mediatek chipid map, also in git, my big accomplishment today.
The gdb code for extracting it is in the git too.

chip2platform = {
0x0279: 6797,
0x0326: 6755,
0x0551: 6757,
0x0562: 6799,
0x0601: 6750,
0x0633: 6570,
0x0688: 6758,
0x0690: 6763,
0x0699: 6739,
0x0707: 6768,
0x0717: 6761,
0x0725: 6779,
0x0766: 6765,
0x0788: 6771, # this id is my unihertz titan
0x0813: 6785,
0x0816: 6885,
0x0886: 6873,
0x0908: 8696,
0x0930: 8195,
0x0950: 6893,
0x0959: 6877,
0x0989: 6833,
0x0996: 6853,
0x1066: 6781,
}

Reply via email to