MTKClient Guide

Hello everyone :smiley:

In this guide, I’ll walk you through how to install and use mtkclient on Windows. mtkclient is a powerful tool for unlocking bootloaders on MTK devices. Let’s get started!

Steps to Install mtkclient

  1. Install Python – Ensure it’s added to your PATH during installation.
  2. Install Git – Make sure to add Git to your PATH as well.
  3. Install these Drivers – for usb detection.

Setting Up mtkclient

Open a command prompt and execute the following commands:

git clone https://github.com/bkerler/mtkclient
cd mtkclient
pip3 install -r requirements.txt


If you have issues installing requirements.txt

If you encounter issues installing requirements.txt, you may need the C++ build tools:

  1. Download and install the build tools installer here.
  2. In the installer, select the “Desktop development with C++” workload.
    • Ensure the “MSVC v142 - VS 2019 C++ x64/x86 build tools” (or later) component is selected.
    • You can also check “Windows 10 SDK” if it’s not already selected.
  3. Click Install and follow the prompts.
  4. Restart your computer if required.
  • sometimes, you’ll have to launch mtkclient from the folder that it is in. CD to the folder and try the commands there.

Using mtkclient Commands

Once installed correctly, you can use mtkclient via the command prompt. Here are some useful commands:

  • Unlocking Bootloader

    python mtk.py da seccfg unlock
    
  • Relocking Bootloader

    python mtk.py da seccfg lock
    
  • Flashing a Partition

    python mtk.py w <partition> <file.img>
    

    Replace <partition> with the partition name and <file.img> with the file name.

  • Rebooting Device

    python mtk.py reset
    
  • Running Multiple Commands

    python mtk.py multi "your_command1;your_command2"
    
  • Deleting Metadata and Userdata (before unlocking the bootloader; optional)

    python mtk.py e metadata,userdata,md_udc
    

There are many more commands available on the GitHub page, but these should cover the essentials.

I hope you found this guide helpful! Let me know if you have any questions or run into issues. Stay safe and happy flashing!

2 Likes