Package Details: mtkclient-git 2.0.1.r29.ge34fc91-1

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: 4
Popularity: 0.036593
First Submitted: 2022-06-11 21:15 (UTC)
Last Updated: 2024-07-05 00:16 (UTC)

Latest Comments

« First ‹ Previous 1 2

dreieck commented on 2023-10-19 08:09 (UTC)

Upstream documentation mentions a GUI:

python mtk_gui

Can you please install an executable /usr/bin/mtk_gui which launches the GUI?

Regards and
thanks for the package!

dreieck commented on 2023-10-18 21:33 (UTC)

This PKGBUILD installs /usr/README.md and /usr/LICENSE.

Those files must not be installed into /usr/.

Instead, please install into

  • /usr/share/doc/mtkclient/README.md and
  • /usr/share/licenses/mtkclient-git/LICENSE.

Thanks for maintaining!

Skaendo commented on 2023-09-10 09:50 (UTC)

I have made a bunch of updates, fixes and patches, probably too many to list here.

So, I have a copy here: https://gitlab.com/skaendo/pkgbuild/-/tree/main/mtkclient-git

FabioLolix commented on 2023-08-20 20:45 (UTC)

Hello, the license is GPL3, GPL is GPL2 in Arch packaging, see Licenses package

aa13q commented on 2023-06-28 12:52 (UTC) (edited on 2023-06-28 12:52 (UTC) by aa13q)

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

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

 pkgname=mtkclient-git
-pkgver=1.52.r201.ga92d6cd
+pkgver=1.9.r105.g3e696d4
 pkgrel=1
 pkgdesc="Unofficial MTK reverse engineering and flash tool"
 arch=('any')
@@ -15,7 +15,7 @@ install=mtkclient.install
 source=("git+https://github.com/bkerler/mtkclient.git"
         "usb.patch")
 sha256sums=('SKIP'
-            '304b558e4d20e4a9b6df125b4eda55c010b1ec3be8dccc9de48c1aafeae60b52')
+            '953b4111910056208b032573b0c34d886490efda06ada46f9718a70d15f891d2')

 pkgver() {
    cd mtkclient
diff --git a/usb.patch b/usb.patch
index 34e6f98..3a84ff4 100644
--- a/usb.patch
+++ b/usb.patch
@@ -11,14 +11,14 @@ index 9a0199a..a2e0af9 100644
      "pyside6",
      "mock"
 diff --git a/requirements.txt b/requirements.txt
-index ade5059..4ef9d06 100644
+index 4e111b5..bff165c 100644
 --- a/requirements.txt
 +++ b/requirements.txt
-@@ -2,7 +2,6 @@ wheel
- pyusb
- pycryptodome
- colorama
--usb
- shiboken6
- pyside6
- mock
+@@ -3,7 +3,6 @@ pyusb >= 1.2.1
+ pycryptodome >= 3.15.0
+ pycryptodomex
+ colorama >= 0.4.4
+-usb >= 0.0.83.dev0
+ shiboken6 >= 6.4.0.1
+ pyside6 >= 6.4.0.1
+ mock >= 4.0.3

bkb commented on 2023-03-12 05:06 (UTC) (edited on 2023-03-12 15:16 (UTC) by bkb)

$ wl-paste | patch -p1 -d /home/$USER/.cache/paru/clone/mtkclient-git/ # Patch of @erikeah
patching file PKGBUILD
Hunk #2 succeeded at 15 with fuzz 1.
patching file usb.patch

$ paru -S mtkclient-git
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file requirements.txt.rej
==> ERROR: A failure occurred in prepare().
    Aborting...
error: failed to build 'mtkclient-git-1.52.r201.ga92d6cd-1': 
error: packages failed to build: mtkclient-git-1.52.r201.ga92d6cd-1

cd /home/$USER/.cache/paru/clone/mtkclient-git; makepkg; paru -U /home/$USER/.cache/paru/clone/mtkclient-git/mtkclient-git*.pkg.tar.zst; paru -Q $(cat /home/$USER/.cache/paru/clone/mtkclient-git/PKGBUILD | grep pkgname= | cut -d'=' -f2); cd seems to get it right

@taotieren why asking to the user to apply the rules himself? Can't it be done through the installation of the package? @erikeah Why don't you add to the patch the work of @taotieren

I just ended up cloning manually the repo, not understanding at all how to make a package

bkb commented on 2023-03-11 20:17 (UTC)

Is there a simple command to directly apply yours diffs and, like, correct the installation?

For now I do paru -S mtkclient-git, I don't know any other commands

erikeah commented on 2023-01-26 00:02 (UTC)

Failed on prepare(), usb.patch is out-dated.

Apply this to update, if you wish 😄

diff --git a/PKGBUILD b/PKGBUILD
index af148e0..8dbbded 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@

 pkgname=mtkclient-git
 pkgver=1.52.r201.ga92d6cd
-pkgrel=1
+pkgrel=2
 pkgdesc="Unofficial MTK reverse engineering and flash tool"
 arch=('any')
 url="https://github.com/bkerler/mtkclient"
@@ -15,7 +15,7 @@ install=mtkclient.install
 source=("git+https://github.com/bkerler/mtkclient.git"
         "usb.patch")
 sha256sums=('SKIP'
-            '304b558e4d20e4a9b6df125b4eda55c010b1ec3be8dccc9de48c1aafeae60b52')
+            '953b4111910056208b032573b0c34d886490efda06ada46f9718a70d15f891d2')

 pkgver() {
    cd mtkclient
diff --git a/usb.patch b/usb.patch
index 34e6f98..3a84ff4 100644
--- a/usb.patch
+++ b/usb.patch
@@ -11,14 +11,14 @@ index 9a0199a..a2e0af9 100644
      "pyside6",
      "mock"
 diff --git a/requirements.txt b/requirements.txt
-index ade5059..4ef9d06 100644
+index 4e111b5..bff165c 100644
 --- a/requirements.txt
 +++ b/requirements.txt
-@@ -2,7 +2,6 @@ wheel
- pyusb
- pycryptodome
- colorama
--usb
- shiboken6
- pyside6
- mock
+@@ -3,7 +3,6 @@ pyusb >= 1.2.1
+ pycryptodome >= 3.15.0
+ pycryptodomex
+ colorama >= 0.4.4
+-usb >= 0.0.83.dev0
+ shiboken6 >= 6.4.0.1
+ pyside6 >= 6.4.0.1
+ mock >= 4.0.3

Thanks!

taotieren commented on 2022-12-20 03:14 (UTC)

# Maintainer: Ben Westover <kwestover.kw@gmail.com>
# Maintainer: taotieren <admin@taotieren.com>

pkgname=mtkclient-git
pkgver=1.9.r50.g5714a30
pkgrel=1
pkgdesc="Unofficial MTK reverse engineering and flash tool"
arch=('any')
url="https://github.com/bkerler/mtkclient"
license=('GPL')
depends=('libusb' 'python' 'python-pyusb' 'python-pyserial' 'python-pycryptodome' 'python-colorama' 'python-mock' 'shiboken6' 'pyside6')
makedepends=('git' 'python-build' 'python-installer' 'python-wheel' 'python-setuptools')
conflicts=('mtkclient')
provides=('mtkclient')
install=mtkclient.install
source=("git+${url}.git")
sha256sums=('SKIP')

pkgver() {
        cd mtkclient
        git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
        cd mtkclient
        # Remove problematic "usb" dependency (package already depends on pyusb)
        sed -i '/usb/d' pyproject.toml
        sed -i '/usb/d' requirements.txt
}

build() {
        cd mtkclient
        python -m build --wheel --no-isolation
}

package() {
        cd mtkclient
        python -m installer --destdir="$pkgdir" dist/*.whl
        install -Dm644 Setup/Linux/50-android.rules "${pkgdir}"/etc/udev/rules.d/50-android.rules
        install -Dm644 Setup/Linux/51-edl.rules "${pkgdir}"/etc/udev/rules.d/51-edl.rules
        mkdir -pv "${pkgdir}"/usr/share/doc/${pkgname%-git}
        mv "${pkgdir}"/usr/LICENSE "${pkgdir}"/usr/README.md "${pkgdir}"/usr/share/doc/${pkgname%-git}
}
post_install() {
        echo -e "\033[1;32m==>\033[0m \033[1mInstall the correct udev rules with the instructions at \e[4mhttps://github.com/bkerler/mtkclient#install-rules"
    groupadd dialout
    usermod -a -G lock,uucp,dialout,plugdev $(whoami)
    udevadm trigger
    udevadm control --reload-rules
}

post_upgrade() {
  post_install
}

post_remove() {
  post_install
}


taotieren commented on 2022-09-08 02:40 (UTC) (edited on 2022-09-08 02:40 (UTC) by taotieren)

PKKBUILD patch

package() {
    cd mtkclient-$pkgver
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm644 Setup/Linux/50-android.rules "${pkgdir}"/etc/udev/rules.d/50-android.rules
    install -Dm644 Setup/Linux/51-edl.rules "${pkgdir}"/etc/udev/rules.d/51-edl.rules
}

mtkclient.install patch

post_install() {
    groupadd dialout
    usermod -a -G lock,uucp,dialout,plugdev $(whoami)
    udevadm trigger
    udevadm control --reload-rules
}

post_upgrade() {
  post_install
}

post_remove() {
  post_install
}