{"id":29959649,"url":"https://github.com/grinn-global/mtk-flash","last_synced_at":"2026-06-17T23:31:17.158Z","repository":{"id":302059302,"uuid":"1009645359","full_name":"grinn-global/mtk-flash","owner":"grinn-global","description":"A command-line utility for flashing raw images to MediaTek devices","archived":false,"fork":false,"pushed_at":"2026-01-08T17:29:18.000Z","size":139,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-30T14:26:04.437Z","etag":null,"topics":["brom","cli","debian","embedded","fastboot","firmware","iot","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grinn-global.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-27T13:22:43.000Z","updated_at":"2026-03-14T03:25:45.000Z","dependencies_parsed_at":"2025-07-08T16:41:02.928Z","dependency_job_id":"22c9f721-38cb-42c8-9764-68814140ec45","html_url":"https://github.com/grinn-global/mtk-flash","commit_stats":null,"previous_names":["grinn-global/grinn-flash","grinn-global/debian-genio-flash","grinn-global/mtk-flash"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/grinn-global/mtk-flash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grinn-global%2Fmtk-flash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grinn-global%2Fmtk-flash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grinn-global%2Fmtk-flash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grinn-global%2Fmtk-flash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grinn-global","download_url":"https://codeload.github.com/grinn-global/mtk-flash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grinn-global%2Fmtk-flash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34470322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brom","cli","debian","embedded","fastboot","firmware","iot","rust"],"created_at":"2025-08-03T22:01:18.843Z","updated_at":"2026-06-17T23:31:17.146Z","avatar_url":"https://github.com/grinn-global.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-License-Identifier: Apache-2.0\nSPDX-FileCopyrightText: 2025 Ignacy Kajdan \u003cignacy.kajdan@grinn-global.com\u003e\n--\u003e\n\n# MTK Flash\n\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/grinn-global/mtk-flash/main.yml) ![License](https://img.shields.io/github/license/grinn-global/mtk-flash)\n\n**MTK Flash** is a command-line utility for flashing raw images to MediaTek devices, supporting MediaTek Boot ROM communication, Download Agent upload, and Fastboot flashing with image splitting.\n\n## Building\n\n1. Install dependencies:\n\n   ```sh\n   sudo apt install -y rustc cargo build-essential\n   ```\n\n2. Build the project:\n\n   ```sh\n   cargo build --release\n   ```\n\n   The compiled binary will be located in the `target/release` directory:\n\n   ```\n   ./target/release/mtk-flash --help\n   ```\n\nAlternatively, a precompiled binary is available on the [Releases](https://github.com/grinn-global/mtk-flash/releases) page.\n\n## Usage\n\n1. Add your user to the `dialout` group:\n\n    ```sh\n    sudo usermod -aG dialout $USER\n    ```\n\n2. If you want to use the automatic boot into download mode functionality, you also need to set up udev rules for the GPIO chip:\n\n    ```sh\n    sudo cp data/90-mtk-flash.rules /etc/udev/rules.d/\n    sudo udevadm control --reload \u0026\u0026 sudo udevadm trigger\n    ```\n\n3. Log out and log back in to apply the group membership. Alternatively, you can run `newgrp dialout` in the terminal to apply the changes immediately.\n\n4. Use the tool with the correct serial device path:\n\n    ```sh\n    mtk-flash \\\n        --da lk.bin \\\n        --fip fip.img \\\n        --img emmc_sparse.img \\\n        --dev /dev/ttyACM0\n    ```\n\n### Arguments\n\n```sh\nmtk-flash --da \u003cPATH\u003e [--fip \u003cPATH\u003e] [--img \u003cPATH\u003e] --dev \u003cDEVICE\u003e [--gpio \u003cCHIP\u003e]\n```\n\n- `--da \u003cPATH\u003e`: Path to the Download Agent image.\n- `--fip \u003cPATH\u003e` *(optional)*: Path to the Firmware Image Package image.\n- `--img \u003cPATH\u003e` *(optional)*: Path to the system image.\n- `--dev \u003cDEVICE\u003e`: Serial device path.\n- `--gpio \u003cCHIP\u003e` *(optional)*: Path to the GPIO chip device for controlling power, reset and download mode.\n- `--preserve-boot1` *(optional)*: Do not erase `mmc0boot1` after flashing FIP. This is useful for boards/setups where `mmc0boot1` stores u-boot environment (for example, stable MAC addresses) that should be preserved.\n\n## Troubleshooting\n\nIf you encounter issues, ensure that:\n- The device is connected and recognized by the system.\n- You have the necessary permissions to access the serial device.\n- The specified paths to the images are correct.\n\n## License\n\nThis project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE.md) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrinn-global%2Fmtk-flash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrinn-global%2Fmtk-flash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrinn-global%2Fmtk-flash/lists"}