From 3320bbce083a9a656278a6ae0fbc4cc8bcfdd85c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Mas=C5=82owski?= Date: Thu, 6 Jul 2023 13:47:35 +0200 Subject: [PATCH 1/6] feat: add Meizu M6T (#262) This doesn't distinguish different connection modes and is untested, as I don't have access to the device. For details see: --- 51-android.rules | 2 ++ 1 file changed, 2 insertions(+) diff --git a/51-android.rules b/51-android.rules index e118b5d..3b4a206 100644 --- a/51-android.rules +++ b/51-android.rules @@ -399,6 +399,8 @@ ATTR{idVendor}!="2a45", GOTO="not_Meizu" ATTR{idProduct}=="0c01", ENV{adb_adb}="yes" # MX6 ATTR{idProduct}=="0c02", ENV{adb_adb}="yes" +# M6T (untested; See +ATTR{idProduct}=="201c", ENV{adb_adb}="yes" GOTO="android_usb_rule_match" LABEL="not_Meizu" From 1034b68c0498a1377836aa2bcea698a94b78d1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Mas=C5=82owski?= Date: Thu, 6 Jul 2023 23:24:48 +0200 Subject: [PATCH 2/6] fix: use up-to-date SPDX identifiers where applicable This doesn't modify debian/copyright since it follows DEP5 and not SPDX. --- 51-android.rules | 2 +- rpm/android-udev-rules.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/51-android.rules b/51-android.rules index 3b4a206..76d6e69 100644 --- a/51-android.rules +++ b/51-android.rules @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: 2022 JoesCat, M0Rf30 and contributors # -# SPDX-License-Identifier: GPL-3.0 +# SPDX-License-Identifier: GPL-3.0-or-later # These rules refer to: # https://developer.android.com/studio/run/device.html diff --git a/rpm/android-udev-rules.spec b/rpm/android-udev-rules.spec index a72cfd1..48c3b97 100644 --- a/rpm/android-udev-rules.spec +++ b/rpm/android-udev-rules.spec @@ -2,7 +2,7 @@ Name: android-udev-rules Version: 20230310 Release: 1%{?dist} Summary: Udev rules to connect Android devices to your linux box -License: GPLv3+ +License: GPL-3.0-or-later URL: https://github.com/M0Rf30/android-udev-rules Source0: https://raw.githubusercontent.com/M0Rf30/android-udev-rules/main/51-android.rules Source1: https://raw.githubusercontent.com/M0Rf30/android-udev-rules/main/README.md From 92c5ba3415d2cfc9edad51a3f1147b85cf4af2d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Mas=C5=82owski?= Date: Fri, 7 Jul 2023 04:24:55 +0200 Subject: [PATCH 3/6] chore: bump copyright to 2023 and include all years with contributions --- 51-android.rules | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/51-android.rules b/51-android.rules index 76d6e69..fa7908a 100644 --- a/51-android.rules +++ b/51-android.rules @@ -1,5 +1,4 @@ -# SPDX-FileCopyrightText: 2022 JoesCat, M0Rf30 and contributors -# +# SPDX-FileCopyrightText: 2012-2023 JoesCat, M0Rf30 and contributors # SPDX-License-Identifier: GPL-3.0-or-later # These rules refer to: From a9cf10ff9370cd1ab781e821b16f410c80c65efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Mas=C5=82owski?= Date: Fri, 7 Jul 2023 04:25:50 +0200 Subject: [PATCH 4/6] style: Strip trailing spaces and make comments more readable --- 51-android.rules | 10 ++++++---- README.md | 17 +++++++++-------- debian/changelog | 1 - debian/copyright | 1 - debian/rules | 2 +- rpm/android-udev-rules.spec | 1 - 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/51-android.rules b/51-android.rules index fa7908a..98441d2 100644 --- a/51-android.rules +++ b/51-android.rules @@ -1,11 +1,13 @@ # SPDX-FileCopyrightText: 2012-2023 JoesCat, M0Rf30 and contributors # SPDX-License-Identifier: GPL-3.0-or-later +# Latest version can be found at: +# + # These rules refer to: -# https://developer.android.com/studio/run/device.html +# # and include many suggestions from Arch Linux, GitHub and other Communities. -# Latest version can be found at: -# https://github.com/M0Rf30/android-udev-rules + # Skip testing for android devices if device is not add, or usb ACTION!="add", ACTION!="bind", GOTO="android_usb_rules_end" @@ -18,6 +20,7 @@ ENV{ID_USB_INTERFACES}=="*:0701??:*", ENV{adb_adb}="yes", GOTO="android_usb_rule LABEL="android_usb_rules_begin" # Devices listed here in android_usb_rules_{begin...end} are connected by USB + # Acer ATTR{idVendor}!="0502", GOTO="not_Acer" # Iconia Tab A1-830 @@ -60,7 +63,6 @@ ATTR{idProduct}=="03cb", ENV{adb_adbfast}="yes" GOTO="android_usb_rule_match" LABEL="not_Amazon" - # Archos ATTR{idVendor}!="0e79", GOTO="not_Archos" # 43 diff --git a/README.md b/README.md index 05a4be5..124c8d9 100644 --- a/README.md +++ b/README.md @@ -23,39 +23,40 @@ systemd # Clone this repository git clone https://github.com/M0Rf30/android-udev-rules.git cd android-udev-rules - + # Copy rules file sudo cp -v 51-android.rules /etc/udev/rules.d/51-android.rules - + # OR create a sym-link to the rules file - choose this option if you'd like to # update your udev rules using git. sudo ln -sf "$PWD"/51-android.rules /etc/udev/rules.d/51-android.rules - + # Change file permissions sudo chmod a+r /etc/udev/rules.d/51-android.rules - + # Add the adbusers group if it's doesn't already exist sudo cp android-udev.conf /usr/lib/sysusers.d/ sudo systemd-sysusers # Add your user to the adbusers group sudo gpasswd -a $(whoami) adbusers - + # Restart UDEV sudo udevadm control --reload-rules sudo systemctl restart systemd-udevd.service - + # Restart the ADB server (back to Debian again) adb kill-server - + # Replug your Android device and verify that USB debugging is enabled in # developer options adb devices - + # You should now see your device ``` ### Using the automtic install script + 1. Clone this repository 2. Run the `install.sh` as root on your terminal diff --git a/debian/changelog b/debian/changelog index 56575c1..24973df 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,4 +3,3 @@ android-udev-rules (20220102-1) stable; urgency=low * Latest stable tag. -- Builder Sun, 02 Jan 2022 19:41:00 +0100 - diff --git a/debian/copyright b/debian/copyright index be3bc31..a7ac7cc 100644 --- a/debian/copyright +++ b/debian/copyright @@ -20,4 +20,3 @@ License: GPL-3+ . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". - diff --git a/debian/rules b/debian/rules index 66c9a8e..5d7c773 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,6 @@ #!/usr/bin/make -f %: - dh $@ + dh $@ override_dh_auto_make: make diff --git a/rpm/android-udev-rules.spec b/rpm/android-udev-rules.spec index 48c3b97..6f6d081 100644 --- a/rpm/android-udev-rules.spec +++ b/rpm/android-udev-rules.spec @@ -55,4 +55,3 @@ systemctl restart systemd-udevd.service * Sun Jan 02 2022 Håkon Løvdal - 20220102-1 - Latest stable tag. - From a4b41794ee18dd0d6bbdb44aab82962c5da64574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Mas=C5=82owski?= Date: Fri, 7 Jul 2023 00:51:45 +0200 Subject: [PATCH 5/6] docs: mention wiki in README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 124c8d9..ae1a5d2 100644 --- a/README.md +++ b/README.md @@ -66,3 +66,6 @@ adb devices 2. Make your edits. 3. TEST THEM! 4. Create a pull request. + +You may also want to take a look at the +[wiki](https://github.com/M0Rf30/android-udev-rules/wiki). From d2d1aac4c5b14731a3fc192b7c0b29945d0115a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Mas=C5=82owski?= Date: Fri, 7 Jul 2023 00:54:08 +0200 Subject: [PATCH 6/6] fix: use correct Debian Archive section name The Debian Archive is dividied into several sections. The one containing developer tools is called 'devel'. Use that in debian/control. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 592e589..7cd8e8d 100644 --- a/debian/control +++ b/debian/control @@ -1,5 +1,5 @@ Source: android-udev-rules -Section: developer-tools +Section: devel Priority: extra Maintainer: Simon Sickle Build-Depends: debhelper (>= 9)