As we all know, many vendor that using mediatek chipset is being closed source for kernel... Well, we can also boot other kernel source to our device, but.. how do we make LCM (or LCD) works? Let me explain it to you.
For how to build kernel, see this thread
Video tutorial in case someone didnt understand
Note: NOT ALL LCM CAN BE DECODED WITH THIS WAY.
1. A PC. (Windows recommended)
2. IDA Pro (Paid app)
3. Notepad++ (or something like that)
4. LCM Driver from other device.
5. your lk.bin from stock rom
If you're running in Linux environment, you need wine to do this.
3. How to decode.
1. Open IDA Pro (32-Bit)
2. Click "new"
3. Select your lk.bin and click "Open"
4. Set processor type as ARM Little-Endian and click Set, and then OK.
5. Just click OK if there is another prompt.
6. Wait until its finish decoding the lk.bin
7. Go to Search > Text (or ALT+T)
8. Find lcm_init and check "Find all occurences"
9. Select "sym lcm_init start\n"
10. Go to the top of that function, and press P, the output will be like this.
11. Press F5 and wait for the result.
12. Open your LCM driver with Notepad++
13. Go back to IDA
Explaination on the crappy code:
v4A4D4(1); v4A4E4(10); v4A4D4(0); v4A4E4(20); v4A4D4(1); v4A4E4(120); v2 = 276738; v3 = -1803288647; v4A500(&v2, 2, 1); v4A4E4(10); v3 = 8614586; v2 = 211202; v4A500(&v2, 2, 1); v4A4E4(3);
v4A4E4 here is MDELAY
v4A500(&v2, here is dsi_set_cmdq(&data_array,
v2 and v3, and so on is the main LCM Init!
And the weird number, we should change it as hexadecimal!
How to change it? Just right click on the weird number, and click "Hexadecimal"
Note: if the Hexadecimal isn't in 8 Digit, add 0 on it!
0x43902 this will be 0x00043902
So, if we decode it, it should be looks like this.
SET_RESET_PIN(1); MDELAY(10); set_reset_pin(0); MDELAY(20); SET_RESET_PIN(1); MDELAY(120); v2 = 0x00043902; v3 = 0x9483FFB9; dsi_set_cmdq(&data_array,, 2, 1); MDELAY(10); v3 = 0x008372BA; v2 = 0x00033902; dsi_set_cmdq(&data_array,, 2, 1); MDELAY(3);
And then put it on your LCM driver! and now you should already have your LCM decoded!
About lcm_get_params? See next post!
@I.nfraR.ed for the inspiration!
remind me if I forgot someone
If the image is not show up, please blame XDA for it jk XDA plz dont ban me