Home Artists Posts Import Register
The Offical Matrix Groupchat is online! >>CLICK HERE<<

Downloads

Content

EDIT (14th October 2019): The tool & source-code were updated to allow the creation of relative-baseline dtbo images.

This basically allows you to go the other route, creating 60Hz (stock) dtbo images from already patched images.

Up until now it was necessary to rely on pre-patched dtbo.img files to overclock the K20/MI9T Pro's display refresh rate.

While this was a great feat by @realheart & @atomsand, it posed a multitude of problems.

  • Providing pre-patched dtbo.img files requires constant manual updates on the developer's behalf
  • The many regional variants of these devices all require a different dtbo.img for each and every region these devices are being sold in
  • Flashing the wrong dtbo.img file on your device can leave it in a semi-bricked state where both TWRP & the main operating system are unbootable

To rectify this, I've decided to take a closer look at what these two chinese developers did in their dtbo.img files to achieve this.

As it turns out it's fairly simply. There's two properties that control the refresh rate of the screen, the framerate and the clockrate, the latter gets calculated from a baseline value and the framerate.

As it turns out their patch needed a little bit of extending to work on the global variants of this phone as well, given the fact that Xiaomi decided to add a new device-tree tag for the same exact screen. (Don't ask me why they did that...)

To make sure this patch won't get lost in time, forever undocumented, I've decided to create a simple .NET command line tool that will patch any K20/MI9T Pro dtbo.img you throw at it, essentially overclocking your screen anywhere from 63 to 90Hz, should you decide to flash the resulting output file that is...

To add a little cherry on top, I've also decided to publish the source code of the tool for those that want to take a closer look at the inner workings of this patch.

To use this tool, just drag the dtbo.img file you dumped into the .exe file, type the framerate you wish to use (60, 63, 66, 69, 72, 75, ..., 81, etc) and press enter, then wait for a minute or so until the window closes.

You will be presented with a new file named the same way as the file you dragged in, but with a ".out" at the end. This is the file you need to flash to get your screen overclocked.

For those that use TWRP to backup their dtbo.img: TWRP names the file dtbo.emmc.win.

Files

Comments

Anonymous

opens then closes. doesnt run anything

blackseraph

Dump your dtbo.img first (either via TWRP or via dd) and then drag it on top of the .exe. If you back it up via TWRP it should be called dtbo.emmc.win. In that case the patched file will be called dtbo.emmc.win.out.

Anonymous

I used twrp can you tell me where the file is located? Do I need to use root explorer, a command, or is it in internal storage? thanks !

blackseraph

Backup the dtbo partition in TWRP and you'll have a file named dtbo.emmc.win in the TWRP/BACKUPS/deviceid/Backupname folder, that's the file you need to copy to your PC and drag into the .exe. Once the app is done patching the dtbo.img file (it takes a minute or so), you'll end up with a new file named dtbo.emmc.win.out. That's the file you need to flash into your phone's dtbo partition. Obviously deviceid and Backupname depend on your device. So substitute those to match your backup name.

Anonymous

Thanks I'll do it rn and report back. I need this 81hz lol.

Anonymous

hi. i just tried it in the dtbo of android Q and unfortunaly it didn't work. it's totally laggy, doing 40 fps (funny enough, the 69 hz mod for android Q works fine). Could you check my dtbo.img and see if it helps ? here is the link for my dtbo file. https://drive.google.com/file/d/1HSZglnBkPfZfRuphId9lFe23AEZBKiu9/view?usp=sharing

Anonymous

i just tried the new tool, and doing a 69 hz mod with it result in the phone not booting at all, differently from the 69 hz mod from xda. also the file generated only had 4 mb, against 5 from xda.

blackseraph

Yeah I already noticed that. I have a goddamn typo in the latest version. Fixing that right now... 10 minutes top.

Anonymous

Hey Black, i can test as well but on MIUI 11 not sure if that matters.

Anonymous

Wtf, this doesn't work. Setting "72hz" gives me back 40ish Hz, and setting "81hz" gives me back a solid 30. What is this even?

blackseraph

Works fine on Android P. You're likely using Android Q, which only supports up to 69Hz properly at the moment. Patch another dtbo to 69Hz and you'll see it runs fine.

Anonymous

Does the updated version work with the DTBOs I provided you last week? Thank you

blackseraph

I haven't run those through the new tool yet so I wouldn't know. This update is mostly for the global dtbo images as those have a slightly different baseline clockrate than the Chinese / Indian ones. It now takes (calculates) the baseline clockrate from the one stored in the input dtbo image. I did find a little something regarding fingerprint reader reliability though. But I'll post a write-up on that a bit later.

Anonymous

Hi! I'm on Global Stable 11.0.1.0 QFKMIXM and tried out the patch, based from the comments 69hz is the maximum that Android Q allows so I tried that. After flashing the modified dtbo image by default my refresh rate is at 34-35hz, however when enabling dc dimming it jumps to 69hz. Do you know what might be causing this?

blackseraph

Now this is interesting. I haven't even considered the possibility of DC dimming to have an effect on the refresh rate. So, no, I don't know what might be causing this yet, but I'll keep investigating.