Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

bkerler/mtkclient

Security & Privacy

Python tool for MediaTek bootROM exploitation and reading or writing device flash in BROM and preloader modes.

1,535
313
Python
GPL-3.0
10 months old

What it does

MTKClient is a Python utility for MediaTek-based phones and tablets. It talks to the chip in BROM or preloader mode to exploit the bootROM, read and write flash partitions, and perform repair work. The README describes it plainly as a tool for exploitation and flash read/write.

Support extends across several generations of MediaTek hardware. Newer chipsets such as MT6781, MT6789, MT6855, MT6886, MT6895, MT6983 and MT8985 use a revised protocol (V6) with a patched bootROM. On those, BROM mode does not work; you must use preloader mode and pass a matching loader from the Loaders/V6 directory with --loader chipset notes. On some devices preloader is disabled but can be re-enabled with adb reboot edl.

Quick start

  1. Install the dependencies and USB drivers for your platform. Linux/macOS and Windows have separate installation guides: Linux/macOS installation, Windows installation. There is also an automated Windows installer.
  2. On Windows, the stock MediaTek USB port driver and the usbdk driver must be installed; Linux generally needs a patched kernel only for the old kamakiri exploit, not for flash read/write.
  3. Start the mtk script, power the device off, hold volume-up + power or volume-down + power, then connect the phone. Release the buttons once the tool detects the device.
  4. For V6 chipsets, connect in preloader mode without holding hardware buttons and supply a loader: the README states the --loader option with a file from Loaders/V6 is required.
  5. Run the operations you need; the full command reference is in the usage instructions.

If something fails, run with --debugmode to produce log.txt and include both the log and full console output when asking for help troubleshooting.

Constraints

  • BROM exploitation does not work on the V6 chipsets listed above; preloader mode and a proper loader are mandatory there.
  • Windows needs the MediaTek stock port plus usbdk before the tool can see the device.
  • Old kamakiri on Linux requires a patched kernel; flash read/write does not.
  • The software is licensed GPL-3.0 and is intended for low-level device work, so treat it as a repair/exploitation tool rather than a consumer flashing app.
  • USB VID/PID autodetection entries live in config/usb_ids.py, and chip configurations in config/brom_config.py chip details.

Other resources

The project also publishes an Ubuntu 22.04-based live DVD with credentials user/user live DVD, and a separate learning resources document.

HotRepo's take

MTKClient is a narrowly scoped hardware exploitation and repair tool rather than a general flashing suite, and its README is explicit that V6 chipsets change the whole entry path. The repo appeared on HotRepo's Python daily list for 2026-11-16 at position 14 with 9 stars gained that day, and its overall best all-language daily rank has not been recorded. That single snapshot supports only a modest recent showing on the Python chart; there is not enough same-metric history here to read a trend.

Written by AI from the project's README, updated . The project's own docs are the source of truth.