Package Details: mtkclient-git 2.1.3.r18.g0fdbe49-2

Git Clone URL: https://aur.archlinux.org/mtkclient-git.git (read-only, click to copy)
Package Base: mtkclient-git
Description: Unofficial MTK reverse engineering and flash tool
Upstream URL: https://github.com/bkerler/mtkclient
Licenses: GPL-3.0-only
Conflicts: mtkclient
Provides: mtkclient
Submitter: BenTheTechGuy
Maintainer: xiota
Last Packager: xiota
Votes: 8
Popularity: 0.42
First Submitted: 2022-06-11 21:15 (UTC)
Last Updated: 2026-03-13 22:27 (UTC)

Latest Comments

1 2 3 Next › Last »

xiota commented on 2026-01-28 20:56 (UTC)

@taotieren I've adjusted the package. However, the run order for prepare() and pkgver() are described in man PKGBUILD. Please report the bug to lilac devs.

taotieren commented on 2026-01-28 03:10 (UTC)

Hello. I use lilac's packaging environment. The following errors were found. In lilac, pkgver() takes precedence over prepare(). Can you make the following modifications? thank

==> Creating software package: mtkclient-git 2.1.2.r9.gb54c0c2-1 (Wednesday, January 28, 2026 11:01:41)
==> Warning: Skip the dependence relationship check.
==> Get the source code...
  -> Upgrading mtkclient git repository...
==> Verifying source file, using sha256sums...
    mtkclient ... skipped
==> Releasing source code...
  -> Creating active copy of mtkclient git repository...
Cloning to 'mtkclient'...
Done.
==> Starting pkgver()...
Fatal error: No name was found and nothing could be described.
==> Error: pkgver is not allowed to be empty.
==> Error: pkgver() generated an invalid version:
[E 01-28 11:01:44.007 worker:252] build failed
prepare() {
  cd "$_pkgsrc"
  git tag 2.1.2 65d8c4aa8912e5f5d152466362c78ab1fbbfcd47 2> /dev/null || true
}

pkgver() {
  cd "$_pkgsrc"
  git describe --long --tags --abbrev=7 --exclude='*[a-zA-Z][a-zA-Z]*' \
    | sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g'
}
pkgver() {
    cd "${srcdir}/${_pkgsrc}"
    (
        set -o pipefail
        git describe --long --tag --abbrev=7 2>/dev/null | sed 's/^v//g;s/\([^-]*-g\)/r\1/;s/-/./g' ||
            printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
    )
}

DocMAX commented on 2024-07-04 19:42 (UTC)

few days ago on arch linux (what else do you think if i am writing here??)

DocMAX commented on 2024-07-03 12:27 (UTC) (edited on 2024-07-03 12:31 (UTC) by DocMAX)


[docmax@x1cg6 ~]$ mtk_gui
Traceback (most recent call last):
  File "/usr/bin/mtk_gui", line 5, in <module>
    from mtkclient.mtk_gui import main
ModuleNotFoundError: No module named 'mtkclient.mtk_gui'

how to fix?

dreieck commented on 2024-04-28 11:37 (UTC)

Applying patch fails for me:

==> Starting prepare()...
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/setup.py b/setup.py
|index 1ab2d68..fdfc2e5 100755
|--- a/setup.py
|+++ b/setup.py
--------------------------
File to patch: 

Regards!

ookiineko commented on 2024-03-06 16:06 (UTC) (edited on 2024-03-06 16:08 (UTC) by ookiineko)

changes I've used to update the PKGBUILD and udev.patch:

diff --git a/PKGBUILD b/PKGBUILD
index ac33444..7ef0148 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Ben Westover <kwestover.kw@gmail.com>

 pkgname=mtkclient-git
-pkgver=1.63.r38.gb63c933
+pkgver=1.63.r61.ge33a28d
 pkgrel=1
 pkgdesc="Unofficial MTK reverse engineering and flash tool"
 arch=('any')
@@ -15,8 +15,8 @@ source=("git+https://github.com/bkerler/mtkclient.git"
         "scripts-and-data-files.patch"
         "udev.patch")
 sha256sums=('SKIP'
-            'd156e692d36fb48f9d385598a2b888ddf3bf0fea182cf9757a71c971c144f710'
-            'd4b6d7967324e585f69c51257e4293f390291a9534e697eefc94568d169220bc')
+            '7beb9e87ed93ad8fc8ed65bceb05e160498e0afa4733eaaaf6ffa875405656b4'
+            '6a16bed5c95da6f399d427e382410e1c0d75ef42ba7e48bbb30c0afee9fa1efc')

 pkgver() {
    cd mtkclient
@@ -42,5 +41,5 @@ build() {
 package() {
    cd mtkclient
    python -m installer --destdir="$pkgdir" dist/*.whl
-   install -Dm644 Setup/Linux/51-edl.rules "$pkgdir/usr/lib/udev/rules.d/52-mtk-edl.rules"
+   install -Dm644 mtkclient/Setup/Linux/51-edl.rules "$pkgdir/usr/lib/udev/rules.d/52-mtk-edl.rules"
 }
diff --git a/udev.patch b/udev.patch
index dce3a2c..9f0d796 100644
--- a/udev.patch
+++ b/udev.patch
@@ -1,7 +1,7 @@
 diff --git a/Setup/Linux/51-edl.rules b/Setup/Linux/51-edl.rules
 index 95e5594..ee2f384 100755
---- a/Setup/Linux/51-edl.rules
-+++ b/Setup/Linux/51-edl.rules
+--- a/mtkclient/Setup/Linux/51-edl.rules
++++ b/mtkclient/Setup/Linux/51-edl.rules
 @@ -1,15 +1,15 @@

  # Qualcomm EDL

The contents in the updated scripts-and-data-files.patch:

diff --git a/pyproject.toml b/pyproject.toml
index 37d4e7c..1e6d6f0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -26,7 +26,7 @@ dependencies = [
 classifiers = [
   "Development Status :: 4 - Beta",
   "Programming Language :: Python :: 3",
-  "License :: OSI Approved :: GPLv3 License",
+  "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
   "Operating System :: OS Independent",
 ]
 keywords = ["mediatek", "mtk", "flashing", "reverse engineering", "firmware"]
@@ -35,14 +35,8 @@ keywords = ["mediatek", "mtk", "flashing", "reverse engineering", "firmware"]
 Repository = "https://github.com/bkerler/mtkclient.git"
 Issues = "https://github.com/bkerler/mtkclient/issues"

-[project.scripts]
-mtk = "mtk:main"
-stage2 = "stage2:main"
-
-[project.gui-scripts]
-mtk_gui = "mtk_gui:main"
-
 [tool.setuptools]
 # See also the MANIFEST.in file.
 # We want to install all the files in the package directories...
-include-package-data = true
\ No newline at end of file
+include-package-data = true
+script-files = ["mtk", "stage2", "mtk_gui"]
diff --git a/MANIFEST.in b/MANIFEST.in
index e624abe..66a83a6 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,5 +1,3 @@
-include README.md
-include LICENSE
 include mtkclient/Loader/*.bin
 include mtkclient/Loader/Preloader/*.bin
 include mtkclient/payloads/*.bin