wok-current diff udev/stuff/51-android.rules @ rev 25786

Bump gvfs to fix issue with open files on android device, patch udev to fix mtp issue on pcmanfm
author Stanislas Leduc <shann@slitaz.org>
date Tue Jul 29 18:05:13 2025 +0000 (2 months ago)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/udev/stuff/51-android.rules	Tue Jul 29 18:05:13 2025 +0000
     1.3 @@ -0,0 +1,1113 @@
     1.4 +# SPDX-FileCopyrightText: 2012-2023 JoesCat, M0Rf30 and contributors
     1.5 +# SPDX-License-Identifier: GPL-3.0-or-later
     1.6 +
     1.7 +# Latest version can be found at:
     1.8 +# <https://github.com/M0Rf30/android-udev-rules>
     1.9 +
    1.10 +# These rules refer to:
    1.11 +# <https://developer.android.com/studio/run/device.html>
    1.12 +# and include many suggestions from Arch Linux, GitHub and other Communities.
    1.13 +
    1.14 +
    1.15 +# Skip testing for android devices if device is not add, or usb
    1.16 +ACTION!="add", ACTION!="bind", GOTO="android_usb_rules_end"
    1.17 +SUBSYSTEM!="usb", GOTO="android_usb_rules_end"
    1.18 +
    1.19 +# Skip testing for unexpected devices like hubs, controllers or printers
    1.20 +ATTR{bDeviceClass}=="09", GOTO="android_usb_rules_end"
    1.21 +ENV{ID_MODEL}=="Controller", GOTO="android_usb_rules_end"
    1.22 +ENV{ID_USB_INTERFACES}=="*:0701??:*", GOTO="android_usb_rules_end"
    1.23 +
    1.24 +# Devices listed here are connected by USB
    1.25 +
    1.26 +# Acer
    1.27 +ATTR{idVendor}!="0502", GOTO="not_Acer"
    1.28 +#   Iconia Tab A1-830
    1.29 +ATTR{idProduct}=="3604", GOTO="adbfast"
    1.30 +#   Iconia Tab A210 (33cc=normal,33cb=debug)
    1.31 +ATTR{idProduct}=="33cb", GOTO="adb"
    1.32 +#   Iconia Tab A500
    1.33 +ATTR{idProduct}=="3325", GOTO="adbfast"
    1.34 +#   Liquid (3202=normal,3203=debug)
    1.35 +ATTR{idProduct}=="3203", GOTO="adb"
    1.36 +GOTO="android_usb_rules_end"
    1.37 +LABEL="not_Acer"
    1.38 +
    1.39 +# Actions Semiconductor Co., Ltd
    1.40 +#   Denver TAD 70111
    1.41 +ATTR{idVendor}=="10d6", ATTR{idProduct}=="0c02", GOTO="adb"
    1.42 +
    1.43 +# ADVANCE (Need product specific rules)
    1.44 +#   S5
    1.45 +ATTR{idVendor}=="0a5c", ATTR{idProduct}=="e681", GOTO="adb"
    1.46 +
    1.47 +# Allwinner Technology
    1.48 +ATTR{idVendor}!="1f3a", GOTO="not_Allwinner"
    1.49 +#   Prestigio PER3464B ebook reader (Mass storage mode)
    1.50 +ATTR{idProduct}=="1000", GOTO="adbmtp"
    1.51 +#   Allwinner Technology Android device in fastboot mode
    1.52 +ATTR{idProduct}=="1010", GOTO="adbfast"
    1.53 +GOTO="android_usb_rules_end"
    1.54 +LABEL="not_Allwinner"
    1.55 +
    1.56 +# Amazon Lab126
    1.57 +ATTR{idVendor}!="1949", GOTO="not_Amazon"
    1.58 +#   Amazon Kindle Fire
    1.59 +ATTR{idProduct}=="0006", GOTO="adbfast"
    1.60 +#   Amazon Kindle 8 2016 (giza) (0bb4:0c01=fastboot 0231=mtp 0232=adb,mtp 0233=ptp 0234=adb,ptp)
    1.61 +ATTR{idProduct}=="0232", GOTO="adbmtp"
    1.62 +ATTR{idProduct}=="0234", GOTO="adbptp"
    1.63 +#   Amazon Kindle 10 2021 (trona) (05e0=fastboot 05e1=mtp 05e1=chg 05e2=adb,mtp 05e3=ptp 05e4=adb,ptp 05e8=adb,chg=05e8 2046=midi 2048=adb,midi)
    1.64 +ATTR{idProduct}=="05e0", GOTO="adbfast"
    1.65 +ATTR{idProduct}=="05e2", GOTO="adbmtp"
    1.66 +ATTR{idProduct}=="05e4", GOTO="adbptp"
    1.67 +ATTR{idProduct}=="05e8", GOTO="adb"
    1.68 +ATTR{idProduct}=="2048", GOTO="adbmidi"
    1.69 +#   Amazon Fire TV Stick Lite (3rd gen)
    1.70 +ATTR{idProduct}=="03a8", GOTO="adbfast"
    1.71 +#   Amazon Fire 7 (mustang)
    1.72 +ATTR{idProduct}=="03c8", GOTO="adbfast"
    1.73 +ATTR{idProduct}=="03cb", GOTO="adbfast"
    1.74 +#   Amazon Fire HD 8 2018 (karnak)
    1.75 +ATTR{idProduct}=="0338", GOTO="adbfast"
    1.76 +ATTR{idProduct}=="033b", GOTO="adbfast"
    1.77 +#   Amazon Fire HD 8 2020 10th gen (onyx) (0581=mtp 0581=chg 0582=adb,mtp 0583=ptp 0584=adb,ptp 0588=adb,chg 2046=midi 2048=adb,midi)
    1.78 +ATTR{idProduct}=="0582", GOTO="adbmtp"
    1.79 +ATTR{idProduct}=="0584", GOTO="adbptp"
    1.80 +ATTR{idProduct}=="0588", GOTO="adb"
    1.81 +ATTR{idProduct}=="2048", GOTO="adbmidi"
    1.82 +#   Amazon Fire HD 8 2022 (raphite)
    1.83 +ATTR{idProduct}=="0658", GOTO="adbfast"
    1.84 +#   Amazon Fire HD 10 2023 (tungsten)
    1.85 +ATTR{idProduct}=="06f8", GOTO="adbfast"
    1.86 +GOTO="android_usb_rules_end"
    1.87 +LABEL="not_Amazon"
    1.88 +
    1.89 +# Archos
    1.90 +ATTR{idVendor}!="0e79", GOTO="not_Archos"
    1.91 +#   43
    1.92 +ATTR{idProduct}=="1417", GOTO="adbfast"
    1.93 +#   79 Xenon
    1.94 +ATTR{idProduct}=="303e", GOTO="adbfast"
    1.95 +#   101
    1.96 +ATTR{idProduct}=="1411", GOTO="adbfast"
    1.97 +#   101 xs
    1.98 +ATTR{idProduct}=="1549", GOTO="adbfast"
    1.99 +GOTO="android_usb_rules_end"
   1.100 +LABEL="not_Archos"
   1.101 +
   1.102 +# Ascom
   1.103 +ATTR{idVendor}!="1768", GOTO="not_Ascom"
   1.104 +ATTR{idProduct}=="0007", GOTO="adb"
   1.105 +ATTR{idProduct}=="000e", GOTO="adb"
   1.106 +ATTR{idProduct}=="4ee7", GOTO="adb"
   1.107 +ATTR{idProduct}=="0013", GOTO="adb"
   1.108 +ATTR{idProduct}=="0011", GOTO="adb"
   1.109 +GOTO="android_usb_rules_end"
   1.110 +LABEL="not_Ascom"
   1.111 +
   1.112 +# ASUSTeK
   1.113 +ATTR{idVendor}!="0b05", GOTO="not_Asus"
   1.114 +#   False positive - accessory
   1.115 +ATTR{idProduct}=="1???", GOTO="android_usb_rules_end"
   1.116 +#   Zenphone 2 (ZE500CL) (7770=adb 7773=mtp,adb 7775=rndis,adb,mass_storage 7777=ptp,adb 5F03=mtp,adb,pclink,mass_storage 5F05=rndis,adb,pclink,mass_storage 5F07=ptp,adb,pclink)
   1.117 +#   Zenfone GO (ZB500KL) (7772=mtp 7773=mtp,adb 7774=rndis 7775=rndis,adb 7776=ptp 7777=ptp,adb)
   1.118 +ATTR{idProduct}=="7770", GOTO="adb"
   1.119 +ATTR{idProduct}=="7771", GOTO="adbfast"
   1.120 +ATTR{idProduct}=="7773", GOTO="adbmtp"
   1.121 +ATTR{idProduct}=="7775", ENV{adb_adbmass}="yes", GOTO="adbrndis"
   1.122 +ATTR{idProduct}=="7777", GOTO="adbptp"
   1.123 +ATTR{idProduct}=="5F03", GOTO="adbmtp"
   1.124 +ATTR{idProduct}=="5F07", GOTO="adbptp"
   1.125 +ATTR{idProduct}=="5F05", ENV{adb_adbmass}="yes", GOTO="adbrndis"
   1.126 +#   Zenphone 4 (581f=mtp,adb 583f=rndis,adb)
   1.127 +ATTR{idProduct}=="581f", GOTO="adbmtp"
   1.128 +ATTR{idProduct}=="583f", GOTO="adbrndis"
   1.129 +#   TF300 (4c80=mtp 4c81=mtp,adb)
   1.130 +#   TF700 (4c90=mtp 4c91=mtp,adb)
   1.131 +#   Zenphone 5 (4c90=normal 4c91=debug 4daf=Fastboot 7780=mtp 7781=mtp,adb)
   1.132 +#   TF701T (4ca0=mtp, 4ca1=mtp,adb)
   1.133 +#   ME302KL (4cc0=mtp, 4cc1=mtp,adb)
   1.134 +#   ME301T (4cd0=mtp, 4cd1=mtp,adb)
   1.135 +#   Fonepad 6 (4ce0=mtp, 4ce1=mtp,adb)
   1.136 +ATTR{idProduct}=="4c81", GOTO="adbmtp"
   1.137 +ATTR{idProduct}=="4c91", GOTO="adbmtp"
   1.138 +ATTR{idProduct}=="4ca1", GOTO="adbmtp"
   1.139 +ATTR{idProduct}=="4cc1", GOTO="adbmtp"
   1.140 +ATTR{idProduct}=="4cd1", GOTO="adbmtp"
   1.141 +ATTR{idProduct}=="4ce1", GOTO="adbmtp"
   1.142 +ATTR{idProduct}=="4daf", GOTO="adbfast"
   1.143 +ATTR{idProduct}=="7781", GOTO="adbmtp"
   1.144 +#   SL101 (4e00=mtp, 4e01=mtp,adb)
   1.145 +#   TF101 (4e0f=mtp, 4e1f=mtp,adb)
   1.146 +ATTR{idProduct}=="4e1f", GOTO="adbmtp"
   1.147 +#   Tegra APX
   1.148 +ATTR{idProduct}=="7030", GOTO="adb"
   1.149 +GOTO="android_usb_rules_end"
   1.150 +LABEL="not_Asus"
   1.151 +
   1.152 +# BQ
   1.153 +ATTR{idVendor}!="2a47", GOTO="not_BQ"
   1.154 +#   Aquaris 4.5, Krillin (0c02=mtp,adb 2008=mtp)
   1.155 +ATTR{idProduct}=="0c02", GOTO="adbmtp"
   1.156 +GOTO="android_usb_rules_end"
   1.157 +LABEL="not_BQ"
   1.158 +
   1.159 +# Castles
   1.160 +ATTR{idVendor}!="0ca6", GOTO="not_Castles"
   1.161 +#   Saturn1000-E
   1.162 +ATTR{idProduct}=="a051", GOTO="user"
   1.163 +GOTO="android_usb_rules_end"
   1.164 +LABEL="not_Castles"
   1.165 +
   1.166 +# Dell (Need product specific rules)
   1.167 +#ATTR{idVendor}=="413c", ENV{adb_user}="yes"
   1.168 +
   1.169 +# Essential
   1.170 +ATTR{idVendor}!="2e17", GOTO="not_Essential"
   1.171 +#   Essential PH-1
   1.172 +ATTR{idProduct}=="c009", GOTO="adb"
   1.173 +ATTR{idProduct}=="c03[02]", GOTO="adb"
   1.174 +GOTO="android_usb_rules_end"
   1.175 +LABEL="not_Essential"
   1.176 +
   1.177 +# Fairphone 1 (see Hisense 109b)
   1.178 +# Fairphone 2 (f000=mtp,mass f003=mtp f005=tether f00e=rndis 90de=charge 90dc=charge,adb 9015=storage,adb, 9024=rndis,adb, 9039=mtp,adb 904d=ptp 904e=ptp,adb) 90bb=qualcom midi+adb
   1.179 +ATTR{idVendor}!="2ae5", GOTO="not_Fairphone2"
   1.180 +ATTR{idProduct}=="9015", GOTO="adb"
   1.181 +ATTR{idProduct}=="9024", GOTO="adbrndis"
   1.182 +ATTR{idProduct}=="9039", GOTO="adbmtp"
   1.183 +ATTR{idProduct}=="904e", GOTO="adbptp"
   1.184 +ATTR{idProduct}=="90bb", GOTO="adbmidi"
   1.185 +ATTR{idProduct}=="90dc", GOTO="adb"
   1.186 +GOTO="android_usb_rules_end"
   1.187 +LABEL="not_Fairphone2"
   1.188 +
   1.189 +# Foxconn
   1.190 +#   Commtiva Z71, Geeksphone One
   1.191 +ATTR{idVendor}=="0489", ATTR{idProduct}=="c001", GOTO="adb"
   1.192 +
   1.193 +# Fujitsu/Fujitsu Toshiba (Need product specific rules)
   1.194 +#ATTR{idVendor}=="04c5", GOTO="user"
   1.195 +
   1.196 +# Fuzhou Rockchip Electronics
   1.197 +#   Mediacom Smartpad 715i
   1.198 +ATTR{idVendor}!="2207", GOTO="not_Fuzhou"
   1.199 +ATTR{idProduct}=="0000", GOTO="adb"
   1.200 +#   Ubislate 7Ci
   1.201 +ATTR{idProduct}=="0010", GOTO="adb"
   1.202 +#   Anbernic RG353P - AOSP12beta#1 (0003=rndis 0006=adb,chg 0007=mtp 0008=ptp 0013=adb,rndis 0017=adb,mtp 0018=adb,ptp)
   1.203 +ATTR{idProduct}=="0006", GOTO="adb"
   1.204 +ATTR{idProduct}=="0013", GOTO="adbrndis"
   1.205 +ATTR{idProduct}=="0017", GOTO="adbmtp"
   1.206 +ATTR{idProduct}=="0018", GOTO="adbptp"
   1.207 +GOTO="android_usb_rules_end"
   1.208 +LABEL="not_Fuzhou"
   1.209 +
   1.210 +# Fibocom
   1.211 +ATTR{idVendor}!="2cb7", GOTO="not_Fibocom"
   1.212 +#   FG180_NA
   1.213 +ATTR{idProduct}=="010b", GOTO="adbcdc"
   1.214 +GOTO="android_usb_rules_end"
   1.215 +LABEL="not_Fibocom"
   1.216 +
   1.217 +# Garmin-Asus (Need product specific rules)
   1.218 +#ATTR{idVendor}=="091e", GOTO="user"
   1.219 +
   1.220 +# Google
   1.221 +ATTR{idVendor}!="18d1", GOTO="not_Google"
   1.222 +#   Nexus, Pixel (/XL/2/2XL) (4ee1=mtp 4ee2=mtp,adb 4ee3=rndis 4ee4=rndis,adb 4ee5=ptp 4ee6=ptp,adb 4ee7=adb 4ee8=midi 4ee9=midi,adb 2d00=accessory 2d01=accessory,adb 2d03=audio,adb 2d05=accessory,audio,adb)
   1.223 +#   See https://android.googlesource.com/device/google/wahoo/+/master/usb/UsbGadget.cpp
   1.224 +#   OnePlus 6 (4ee1=charging 4ee2=mtp,adb 4ee6=ptp,adb 4ee7=charging,adb)
   1.225 +#   Onda V972 (0001=mass_storage 0006=mtp 0007=ptp 0008=camera)
   1.226 +#   Pico i.MX7 Dual Development Board 4ee7=debug
   1.227 +#   PinePhone (v1.2) (4ee0=fast 4ee1=mtp 4ee2=mtp,adb 4ee3=rndis 4ee4=rndis,adb 4ee5=ptp 4ee6=ptp,adb 4ee7=adb)
   1.228 +#   Yandex Phone 4ee7=debug
   1.229 +#   Fairphone3 (4ee1=mtp)
   1.230 +#   Motorola G3 (2d02=audio 2d03=audio,adb 4ee8=midi 4ee9=midi,adb)
   1.231 +ATTR{idProduct}=="4ee0", GOTO="adbfast"
   1.232 +ATTR{idProduct}=="4ee2", GOTO="adbmtp"
   1.233 +ATTR{idProduct}=="4ee4", GOTO="adbrndis"
   1.234 +ATTR{idProduct}=="4ee6", GOTO="adbptp"
   1.235 +ATTR{idProduct}=="4ee7", GOTO="adb"
   1.236 +ATTR{idProduct}=="4ee8", GOTO="midi"
   1.237 +ATTR{idProduct}=="4ee9", GOTO="adbmidi"
   1.238 +
   1.239 +#   Tensor Pixel phones (Pixel 7/7 pro/6/6A/6 Pro) 4eeb=cdc-ncm; 4eec=cdc-ncm,adb
   1.240 +ATTR{idProduct}=="4eec", GOTO="adbcdc"
   1.241 +ATTR{idProduct}=="4ee0", GOTO="adbfast"
   1.242 +
   1.243 +#   Tensor Pixel phones (Pixel 7/7 pro/6/6A/6 Pro) 4eed=uvc; 4eee=uvc,adb
   1.244 +ATTR{idProduct}=="4eed", GOTO="uvc"
   1.245 +ATTR{idProduct}=="4eee", GOTO="adbuvc"
   1.246 +
   1.247 +#   Pixel Watch 2 (4ee0=fastboot 4e11=adb)
   1.248 +ATTR{idProduct}=="4e11", GOTO="adb"
   1.249 +
   1.250 +#   Pixel C Tablet (5202=mtp 5203=mtp,adb)
   1.251 +ATTR{idProduct}=="5201", GOTO="adbfast"
   1.252 +ATTR{idProduct}=="5203", GOTO="adbmtp"
   1.253 +ATTR{idProduct}=="5208", GOTO="adb"
   1.254 +
   1.255 +#   Android Open Accessory device (2d00=accessory 2d01=accessory,adb 2d02=audio 2d03=audio,adb 2d04=accessory,audio 2d05=accessory,audio,adb)
   1.256 +ATTR{idProduct}=="2d00", GOTO="adb"
   1.257 +ATTR{idProduct}=="2d01", GOTO="adb"
   1.258 +ATTR{idProduct}=="2d03", GOTO="adbaud"
   1.259 +ATTR{idProduct}=="2d04", GOTO="adbaud"
   1.260 +ATTR{idProduct}=="2d05", GOTO="adbaud"
   1.261 +#   Nexus 7 (4e40=fastboot 4e41=mtp 4e42=mtp,adb 4e43=ptp) Nexus 7 2012 (4e44=ptp)
   1.262 +ATTR{idProduct}=="4e40", GOTO="adbfast"
   1.263 +ATTR{idProduct}=="4e42", GOTO="adbmtp"
   1.264 +#   Nexus S (4e20=fastboot 4e21=? 4e22=mass_storage,adb 4e24=rndis,adb)
   1.265 +#   See https://android.googlesource.com/device/samsung/crespo/+/android-4.1.2_r2.1/init.herring.usb.rc
   1.266 +ATTR{idProduct}=="4e20", GOTO="adbfast"
   1.267 +ATTR{idProduct}=="4e22", GOTO="adbmass"
   1.268 +ATTR{idProduct}=="4e24", GOTO="adbrndis"
   1.269 +ATTR{idProduct}=="4e20", GOTO="adbfast"
   1.270 +#   Galaxy Nexus, Galaxy Nexus (GSM) (4e30=fastboot)
   1.271 +ATTR{idProduct}=="4e30", GOTO="adbfast"
   1.272 +#   Nexus One (4e11=normal 4e12=mtp,adb 4e13=tether 0fff=debug)
   1.273 +ATTR{idProduct}=="4e12", GOTO="adbmtp"
   1.274 +ATTR{idProduct}=="0fff", GOTO="adbfast"
   1.275 +#   Xiaomi MiPhone Mi1/Mi1S (9024=ndis,adb 9025=mass_storage,adb 9026=mass storage f00e=ndis)
   1.276 +ATTR{idProduct}=="9024", GOTO="adb"
   1.277 +ATTR{idProduct}=="9025", GOTO="adbmass"
   1.278 +#   Generic and unspecified debug interface (test after d00?)
   1.279 +#   examples: Xiaomi Mi/Redmi 2, Anbernic RG353P
   1.280 +#   Xiaomi Mi2 (d00d=bootloader d002=charger), LG-V20 (d00d=bootloader)
   1.281 +ATTR{idProduct}=="d00d", GOTO="adbfast"
   1.282 +#   Nexus 4 (d001=fastboot d002=debug)
   1.283 +ATTR{idProduct}=="d001", GOTO="adbfast"
   1.284 +ATTR{idProduct}=="d002", GOTO="adb"
   1.285 +#   LG G2x (d109=mtp d10a=mtp,adb)
   1.286 +ATTR{idProduct}=="d10a", GOTO="adbmtp"
   1.287 +
   1.288 +# Other vendors that also used duplicated Google's idVendor code follows:
   1.289 +# IDEA XDS-1078 (debug=2c11)
   1.290 +ATTR{idProduct}=="2c11", GOTO="adb"
   1.291 +# Hisense U8G Smart TV (MTK MT5895)
   1.292 +ATTR{idProduct}=="0d02", GOTO="adbfast"
   1.293 +GOTO="android_usb_rules_end"
   1.294 +LABEL="not_Google"
   1.295 +
   1.296 +# Haier (Need product specific rules)
   1.297 +#ATTR{idVendor}=="201e", GOTO="user"
   1.298 +
   1.299 +# Hisense (includes Fairphone 1) (Need product specific rules)
   1.300 +#ATTR{idVendor}=="109b", GOTO="user"
   1.301 +
   1.302 +# Honeywell/Foxconn
   1.303 +ATTR{idVendor}!="0c2e", GOTO="not_Honeywell"
   1.304 +#   D70e
   1.305 +ATTR{idProduct}=="0ba3", GOTO="adb"
   1.306 +GOTO="android_usb_rules_end"
   1.307 +LABEL="not_Honeywell"
   1.308 +
   1.309 +# HTC
   1.310 +ATTR{idVendor}!="0bb4", GOTO="not_HTC"
   1.311 +#   Android phone (0fff=fastboot 0001=mass_storage)
   1.312 +ATTR{idProduct}=="0001", GOTO="mass"
   1.313 +ATTR{idProduct}=="0fff", GOTO="adbfast"
   1.314 +#   ADP1, Dream, G1, HD2, Magic, Tattoo (0c01=mass_storage, 0c02=mass_storage,adb)
   1.315 +#   Desire/desire HD/Hero (0ce5=debug 0fb4=rndis 0ff8=tether 0ff9=charge,mass_storage 0ffc=sync_manager 0ffe=modem)
   1.316 +#   NOTE: Amazon Kindle 8 2016 (giza) (fastboot=0bb4:0c01 conflicts with mass storage=0c01)
   1.317 +ATTR{idProduct}=="0c01", GOTO="mass"
   1.318 +ATTR{idProduct}=="0c02", GOTO="adbmass"
   1.319 +ATTR{idProduct}=="0ce5", GOTO="adb"
   1.320 +ATTR{idProduct}=="0ff9", GOTO="mass"
   1.321 +#   ChaCha
   1.322 +ATTR{idProduct}=="0cb2", GOTO="adbfast"
   1.323 +#   Desire (Bravo) (0c87=debug 0c99=debug)
   1.324 +ATTR{idProduct}=="0c87", GOTO="adb"
   1.325 +ATTR{idProduct}=="0c99", GOTO="adb"
   1.326 +#   Desire HD (0ca2=debug 0ff8=tether 0ff9=charge 0ffe=modem)
   1.327 +ATTR{idProduct}=="0ca2", GOTO="adb"
   1.328 +#   Desire S (Saga), Desire HD, Hero, Thunderbolt (0cab=syncmode 0ff9=charge)
   1.329 +ATTR{idProduct}=="0cab", SYMLINK+="android_adb"
   1.330 +#   Desire Z
   1.331 +ATTR{idProduct}=="0c91", GOTO="adbfast"
   1.332 +#   Evo Shift 4G (0c8d=debug 0ca5=?)
   1.333 +ATTR{idProduct}=="0c8d", GOTO="adb"
   1.334 +ATTR{idProduct}=="0ca5", SYMLINK+="android_adb"
   1.335 +#   Hero (GSM), Desire
   1.336 +ATTR{idProduct}=="0c99", SYMLINK+="android_adb"
   1.337 +#   Hero (CDMA)
   1.338 +ATTR{idProduct}=="0c9a", SYMLINK+="android_adb"
   1.339 +#   Incredible
   1.340 +ATTR{idProduct}=="0c9e", SYMLINK+="android_adb"
   1.341 +#   Incredible rev 0002
   1.342 +ATTR{idProduct}=="0c8d", SYMLINK+="android_adb"
   1.343 +#   MyTouch 4G
   1.344 +ATTR{idProduct}=="0c96", SYMLINK+="android_adb"
   1.345 +#   One (m7) && One (m8)
   1.346 +ATTR{idProduct}=="0c93", SYMLINK+="android_adb"
   1.347 +#   Sensation, One (0f87=mtp,?,adb)
   1.348 +ATTR{idProduct}=="0f87", GOTO="adbmtp"
   1.349 +ATTR{idProduct}=="0ff0", SYMLINK+="android_fastboot"
   1.350 +#   One X
   1.351 +ATTR{idProduct}=="0cd6", SYMLINK+="android_adb"
   1.352 +#   Slide
   1.353 +ATTR{idProduct}=="0e03", SYMLINK+="android_adb"
   1.354 +#   Vision
   1.355 +ATTR{idProduct}=="0c91", SYMLINK+="android_adb"
   1.356 +#   Wildfire
   1.357 +ATTR{idProduct}=="0c8b", GOTO="adbfast"
   1.358 +#   Wildfire S
   1.359 +ATTR{idProduct}=="0c86", GOTO="adbfast"
   1.360 +#   Zopo ZP900, Fairphone 1
   1.361 +ATTR{idProduct}=="0c03", GOTO="adbfast"
   1.362 +#   Zopo C2, Android phone via MTP [MT65xx] (2008=mtp)
   1.363 +ATTR{idProduct}=="2008", GOTO="mtp"
   1.364 +#   Android phone via PTP [Wiko Cink Peax 2] (200b=ptp)
   1.365 +ATTR{idProduct}=="200b", GOTO="ptp"
   1.366 +#   Desire 510 (05fd=mtp,adb)
   1.367 +ATTR{idProduct}=="05fd", GOTO="adbmtp"
   1.368 +#   Droid DNA (0dff=mtp,ums,adb 0ebd=mtp,ums)
   1.369 +ATTR{idProduct}=="0dff", GOTO="adbmtp"
   1.370 +ATTR{idProduct}=="0ebd", GOTO="mtp"
   1.371 +#   Droid Incredible 4G LTE (0e31=mtp 0e32=mtp,adb)
   1.372 +ATTR{idProduct}=="0e31", GOTO="mtp"
   1.373 +ATTR{idProduct}=="0e32", GOTO="adbmtp"
   1.374 +#   One (0dea=mtp,ums,adb 0f87=mtp,?,adb 0f5f=mtp,cdc,adb 0f60=mtp,cdc 0f63=mtp,adb 0f64=mtp)
   1.375 +ATTR{idProduct}=="0dea", GOTO="adbmtp"
   1.376 +ATTR{idProduct}=="0f87", GOTO="adbmtp"
   1.377 +ATTR{idProduct}=="0f5f", ENV{adb_adbcdc}="yes", GOTO="adbmtp"
   1.378 +ATTR{idProduct}=="0f60", ENV{adb_cdc}="yes", GOTO="mtp"
   1.379 +ATTR{idProduct}=="0f63", GOTO="adbmtp"
   1.380 +ATTR{idProduct}=="0f64", GOTO="mtp"
   1.381 +#   One M8 Google Play Edition (060b=mtp,adb)
   1.382 +ATTR{idProduct}=="060b", GOTO="adbmtp"
   1.383 +#   One M8 (061a=mtp,adb 0f25=mtp 0fb4=mtp,ums,adb 0fb5=mtp,ums)
   1.384 +ATTR{idProduct}=="061a", GOTO="adbmtp"
   1.385 +ATTR{idProduct}=="0f25", GOTO="mtp"
   1.386 +ATTR{idProduct}=="0fb4", GOTO="adbmtp"
   1.387 +ATTR{idProduct}=="0fb5", GOTO="mtp"
   1.388 +#   HP Touchpad (685c=mtp 6860=mtp,adb)
   1.389 +ATTR{idProduct}=="6860", GOTO="adbmtp"
   1.390 +ENV{adb_user}="yes"
   1.391 +GOTO="android_usb_rule_match"
   1.392 +LABEL="not_HTC"
   1.393 +
   1.394 +# Huawei
   1.395 +ATTR{idVendor}!="12d1", GOTO="not_Huawei"
   1.396 +#   IDEOS (1037=? 1038=debug 1039=tether)
   1.397 +ATTR{idProduct}=="1038", GOTO="adbfast"
   1.398 +#   U8850 Vision
   1.399 +ATTR{idProduct}=="1021", GOTO="adbfast"
   1.400 +#   HiKey (1050=usbnet 1057=adb)
   1.401 +ATTR{idProduct}=="1050", SYMLINK+="android_adb"
   1.402 +ATTR{idProduct}=="1057", GOTO="adb"
   1.403 +#   Honor 6
   1.404 +ATTR{idProduct}=="103a", SYMLINK+="android_adb"
   1.405 +ATTR{idProduct}=="1051", GOTO="mtp"
   1.406 +#   MediaPad M2-A01L
   1.407 +ATTR{idProduct}=="1052", GOTO="mtp"
   1.408 +#   P7-L10 (1052=?mtp 1053=ptp 1054=ptp,adb)
   1.409 +ATTR{idProduct}=="1054", GOTO="adbptp"
   1.410 +#   MediaPad T3
   1.411 +ATTR{idProduct}=="107d", SYMLINK+="android_adb"
   1.412 +#   P10 Lite
   1.413 +ATTR{idProduct}=="107e", SYMLINK+="android_adb"
   1.414 +#   Watch
   1.415 +ATTR{idProduct}=="1c2c", GOTO="adb"
   1.416 +#   Mate 9
   1.417 +ATTR{idProduct}=="107e", SYMLINK+="android_adb"
   1.418 +GOTO="android_usb_rules_end"
   1.419 +LABEL="not_Huawei"
   1.420 +
   1.421 +# Intel
   1.422 +ATTR{idVendor}!="8087", GOTO="not_Intel"
   1.423 +#   Geeksphone Revolution
   1.424 +ATTR{idProduct}=="0a16", GOTO="adb"
   1.425 +#   Chuwi Hi 10 Pro (HQ64)
   1.426 +ATTR{idProduct}=="2a65", GOTO="adb"
   1.427 +ATTR{idProduct}=="07ef", GOTO="adb"
   1.428 +#   Asus ZenFone 2 (ADB Sideload in TWRP Recovery)
   1.429 +ATTR{idProduct}=="0a5d", GOTO="adb"
   1.430 +#   ASUS MeMo Pad 7 ME176C/CX (DNX/Rescue mode)
   1.431 +ATTR{idProduct}=="0a65", GOTO="adbfast"
   1.432 +#   Reference Boards using kernelflinger
   1.433 +#   See https://github.com/intel/kernelflinger/blob/master/libefiusb/usb.c#L56
   1.434 +ATTR{idProduct}=="09ef", GOTO="adbfast"
   1.435 +GOTO="android_usb_rules_end"
   1.436 +LABEL="not_Intel"
   1.437 +
   1.438 +# IUNI
   1.439 +ATTR{idVendor}!="271d", GOTO="not_IUNI"
   1.440 +#   Gionee (3f11=mass,adb)
   1.441 +ATTR{idProduct}=="3f11", GOTO="adbmass"
   1.442 +#   U3
   1.443 +ATTR{idProduct}=="bf39", GOTO="adb"
   1.444 +GOTO="android_usb_rules_end"
   1.445 +LABEL="not_IUNI"
   1.446 +
   1.447 +# K-Touch (Need product specific rules)
   1.448 +#ATTR{idVendor}=="24e3", GOTO="user"
   1.449 +
   1.450 +# KT Tech (Need product specific rules)
   1.451 +#ATTR{idVendor}=="2116", GOTO="user"
   1.452 +
   1.453 +# Kyocera (Need product specific rules)
   1.454 +#ATTR{idVendor}=="0482", ENV{adb_user}="yes"
   1.455 +
   1.456 +# Lenovo
   1.457 +ATTR{idVendor}!="17ef", GOTO="not_Lenovo"
   1.458 +#   Lenovo Tab K10
   1.459 +ATTR{idProduct}=="201c", GOTO="adb"
   1.460 +GOTO="android_usb_rules_end"
   1.461 +LABEL="not_Lenovo"
   1.462 +
   1.463 +# LeTv (LeECo)
   1.464 +ATTR{idVendor}!="2b0e", GOTO="not_letv"
   1.465 +#   LEX720 LeEco Pro3 6GB (610c=normal,610d=debug, 610b=camera)
   1.466 +ATTR{idProduct}=="610d", GOTO="adbfast"
   1.467 +ENV{adb_user}="yes"
   1.468 +GOTO="android_usb_rule_match"
   1.469 +LABEL="not_letv"
   1.470 +
   1.471 +# LG
   1.472 +ATTR{idVendor}!="1004", GOTO="not_LG"
   1.473 +#   Ally, Vortex, P500, P500h (61c5=charge 618e=debug 618f=mass_storage)
   1.474 +ATTR{idProduct}=="618e", GOTO="adb"
   1.475 +ATTR{idProduct}=="618f", GOTO="mass"
   1.476 +#   G2 D802 (61f1=LG software mode)
   1.477 +ATTR{idProduct}=="61f1", SYMLINK+="android_adb"
   1.478 +#   G2 D803
   1.479 +ATTR{idProduct}=="618c", SYMLINK+="android_adb"
   1.480 +#   G2 D803 rogers (631f=charge)
   1.481 +ATTR{idProduct}=="631f", SYMLINK+="android_adb"
   1.482 +#   G3 (VS985), Android Phone (627f=mtp)
   1.483 +ATTR{idProduct}=="627f", GOTO="mtp"
   1.484 +#   LM-X420xxx/G2/Optimus (6300=charge 631c=charge 631d=ptp 631e=ptp 633e=mtp 6344=tether 6348=midi 6356=CDrom)
   1.485 +#   LG-V20 (62ce=mtp,cdc 633a=adp,cdc 18d1:d00d=fastboot)
   1.486 +ATTR{idProduct}=="631c", GOTO="adb"
   1.487 +ATTR{idProduct}=="631d", GOTO="ptp"
   1.488 +ATTR{idProduct}=="631e", GOTO="ptp"
   1.489 +ATTR{idProduct}=="633a", GOTO="adbcdc"
   1.490 +ATTR{idProduct}=="633e", GOTO="mtp"
   1.491 +ATTR{idProduct}=="6344", GOTO="rndis"
   1.492 +ATTR{idProduct}=="6348", GOTO="midi"
   1.493 +#   Optimus LTE (61f9=mtp 61fe=tether)
   1.494 +ATTR{idProduct}=="6315", SYMLINK+="android_adb"
   1.495 +ATTR{idProduct}=="61f9", GOTO="mtp"
   1.496 +#   Swift GT540
   1.497 +ATTR{idProduct}=="61b4", SYMLINK+="android_adb"
   1.498 +#   P500 CM10
   1.499 +ATTR{idProduct}=="61a6", SYMLINK+="android_adb"
   1.500 +#   L90 D410, Various (6300=charge)
   1.501 +ATTR{idProduct}=="6300", SYMLINK+="android_adb"
   1.502 +ENV{adb_user}="yes"
   1.503 +GOTO="android_usb_rule_match"
   1.504 +LABEL="not_LG"
   1.505 +
   1.506 +# Meizu
   1.507 +ATTR{idVendor}!="2a45", GOTO="not_Meizu"
   1.508 +#   M1E
   1.509 +ATTR{idProduct}=="0c01", GOTO="adb"
   1.510 +#   MX6
   1.511 +ATTR{idProduct}=="0c02", GOTO="adb"
   1.512 +#   M6T (untested; See <https://github.com/M0Rf30/android-udev-rules/issues/262>
   1.513 +ATTR{idProduct}=="201c", GOTO="adb"
   1.514 +GOTO="android_usb_rules_end"
   1.515 +LABEL="not_Meizu"
   1.516 +
   1.517 +# Micromax
   1.518 +ATTR{idVendor}!="2a96", GOTO="not_Micromax"
   1.519 +#   P702
   1.520 +ATTR{idProduct}=="201d", GOTO="adbfast"
   1.521 +GOTO="android_usb_rules_end"
   1.522 +LABEL="not_Micromax"
   1.523 +
   1.524 +# Microsoft
   1.525 +ATTR{idVendor}!="045e", GOTO="not_Microsoft"
   1.526 +#   Surface Duo
   1.527 +ATTR{idProduct}=="0c26", GOTO="adbfast"
   1.528 +#   False positive xbox controllers 028e, 02ea, 0719
   1.529 +ATTR{idProduct}=="02??", GOTO="android_usb_rules_end"
   1.530 +ATTR{idProduct}=="07??", GOTO="android_usb_rules_end"
   1.531 +ENV{adb_user}="yes"
   1.532 +GOTO="android_usb_rule_match"
   1.533 +LABEL="not_Microsoft"
   1.534 +
   1.535 +# Motorola
   1.536 +ATTR{idVendor}!="22b8", GOTO="not_Motorola"
   1.537 +#   CLIQ XT/Quench
   1.538 +ATTR{idProduct}=="2d66", SYMLINK+="android_adb"
   1.539 +#   Defy/MB525
   1.540 +ATTR{idProduct}=="428c", SYMLINK+="android_adb"
   1.541 +#   Droid
   1.542 +ATTR{idProduct}=="41db", SYMLINK+="android_adb"
   1.543 +#   Razr XT912
   1.544 +ATTR{idProduct}=="4362", GOTO="adbfast"
   1.545 +#   Droid Turbo 2
   1.546 +ATTR{idProduct}=="2ea4", GOTO="adbfast"
   1.547 +#   Atrix/Razr HD (2e32=mtp 2e33=mtp,adb)
   1.548 +#   Razr M (2e50=mtp 2e51=mtp,adb)
   1.549 +#   Moto G3 (2e76=mtp,adb 2e81=charge,adb 2e82=mtp 2e83=ptp 2e84=ptp,adb 2e24=rndis 2e25=rndis,adb)
   1.550 +#   Moto E/G dual sim (2e76=mtp,adb 2e80=fast 2e81=recovery 2e82=mtp 2e83=ptp 2e84=ptp,adb 2e24=rndis 2e25=rndis,adb)
   1.551 +#   Moto Z3 Play, beckham, XT1929
   1.552 +#     For details see: <https://github.com/M0Rf30/android-udev-rules/issues/264>
   1.553 +#     18d1:4ee8=midi; 18d1:4ee9=midi+adb
   1.554 +#     BP TOOLS: 2ee5=charging, mtp, ptp; 2ee6=charging+adb, mtp+adb, ptp+adb; 2ee7=rndis; 2ee8=rndis+adb; 18d1:4ee8=midi; 18d1:4ee9=midi+adb
   1.555 +#     QCOM: 05c6:9091=charing+adb, mtp+adb, ptp+adb; 05c6:9092=charging, mtp, ptp; 18d1:4ee8=midi; 18d1:4ee9=midi+adb; 22b8:2e24=rndis; 22b8:2e25=rndis+adb
   1.556 +ATTR{idProduct}=="2e24", GOTO="rndis"
   1.557 +ATTR{idProduct}=="2e25", GOTO="adbrndis"
   1.558 +ATTR{idProduct}=="2e33", GOTO="adbmtp"
   1.559 +ATTR{idProduct}=="2e51", GOTO="adbmtp"
   1.560 +ATTR{idProduct}=="2e76", GOTO="adbmtp"
   1.561 +ATTR{idProduct}=="2e80", GOTO="adbfast"
   1.562 +ATTR{idProduct}=="2e81", GOTO="adb"
   1.563 +ATTR{idProduct}=="2e84", GOTO="adbptp"
   1.564 +ATTR{idProduct}=="2eb7", GOTO="mass"
   1.565 +#   Xoom (70a8=mtp 70a9=mtp,adb 70ae=rndis 70af=rndis,adb 70b0=acm 70b1=acm,adb 70b2=acm,rndis 70b3=acm,rndis,adb 70b4=ptp 70b5ptp,adb)
   1.566 +ATTR{idProduct}=="70a9", GOTO="adbmtp"
   1.567 +ATTR{idProduct}=="70ae", GOTO="rndis"
   1.568 +ATTR{idProduct}=="70af", GOTO="adbrndis"
   1.569 +ATTR{idProduct}=="70b1", GOTO="adbcdc"
   1.570 +ATTR{idProduct}=="70b3", GOTO="adbrndis"
   1.571 +ATTR{idProduct}=="70b5", GOTO="adbptp"
   1.572 +#   XT890/907/Razr (710d=mtp 710e=mtp,adb 710f=mass)
   1.573 +ATTR{idProduct}=="710e", GOTO="adbmtp"
   1.574 +GOTO="android_usb_rules_end"
   1.575 +LABEL="not_Motorola"
   1.576 +
   1.577 +# MTK (MediaTek Inc)
   1.578 +ATTR{idVendor}!="0e8d", GOTO="not_MTK"
   1.579 +#   Umidigi F1 (201c=adbfast)
   1.580 +#   MT65xx/67xx (2000=cdc 2008=mtp 200a=mtp,cdc,adb 2012=mtp,cdc 201d=mtp,adb)
   1.581 +#   Moto E22i (2005=rndis,adb 200c=ptp,adb 2048=midi,adb 201c=adb 201d=mtp,adb)
   1.582 +ATTR{idProduct}=="2005", GOTO="adbrndis"
   1.583 +ATTR{idProduct}=="200a", ENV{adb_adbcdc}="yes", GOTO="adbmtp"
   1.584 +ATTR{idProduct}=="200c", GOTO="adbptp"
   1.585 +ATTR{idProduct}=="2048", GOTO="adbmidi"
   1.586 +ATTR{idProduct}=="201c", GOTO="adb"
   1.587 +ATTR{idProduct}=="201d", GOTO="adbmtp"
   1.588 +GOTO="android_usb_rules_end"
   1.589 +LABEL="not_MTK"
   1.590 +
   1.591 +# NEC LifeTouch Note (0300=? 0301=debug)
   1.592 +ATTR{idVendor}=="0409", ATTR{idProduct}=="0300", GOTO="user"
   1.593 +
   1.594 +# Nextbit (Need product specific rules)
   1.595 +#ATTR{idVendor}=="2c3f", GOTO="user"
   1.596 +
   1.597 +# Nintendo
   1.598 +ATTR{idVendor}!="057e", GOTO="not_Nintendo"
   1.599 +#   Switch
   1.600 +ATTR{idProduct}=="2000", GOTO="adb"
   1.601 +GOTO="android_usb_rules_end"
   1.602 +LABEL="not_Nintendo"
   1.603 +
   1.604 +# Nokia X (Need product specific rules)
   1.605 +#ATTR{idVendor}=="0421", GOTO="user"
   1.606 +
   1.607 +# Nokia 3 (Need product specific rules)
   1.608 +#ATTR{idVendor}=="2e04", GOTO="user"
   1.609 +
   1.610 +# Nook (Barnes & Noble) (Need product specific rules)
   1.611 +ATTR{idVendor}!="2080", GOTO="not_Nook"
   1.612 +#   Glowlight 3
   1.613 +ATTR{idProduct}=="000b", GOTO="adb"
   1.614 +GOTO="android_usb_rules_end"
   1.615 +LABEL="not_Nook"
   1.616 +
   1.617 +# Nvidia
   1.618 +ATTR{idVendor}!="0955", GOTO="not_Nvidia"
   1.619 +#   Audi SDIS Rear Seat Entertainment Tablet
   1.620 +#   Folio
   1.621 +ATTR{idProduct}=="7000", SYMLINK+="android_fastboot"
   1.622 +ATTR{idProduct}=="7100", GOTO="user"
   1.623 +#   SHIELD Tablet (cf05=mtp,adb cf06= cf07=mtp cf08= cf09=)
   1.624 +ATTR{idProduct}=="cf05", GOTO="adbmtp"
   1.625 +ATTR{idProduct}=="cf09", GOTO="adb"
   1.626 +#   Shield TV (b42a=mtp)
   1.627 +ATTR{idProduct}=="b442", SYMLINK+="android_fastboot"
   1.628 +ENV{adb_user}="yes"
   1.629 +GOTO="android_usb_rule_match"
   1.630 +LABEL="not_Nvidia"
   1.631 +
   1.632 +# Oculus
   1.633 +ATTR{idVendor}!="2833", GOTO="not_Oculus"
   1.634 +#   Oculus Go
   1.635 +ATTR{idProduct}=="0083", GOTO="user"
   1.636 +#   Oculus Quest
   1.637 +ATTR{idProduct}=="0183", GOTO="user"
   1.638 +#   Oculus Quest 2, Quest 3
   1.639 +ATTR{idProduct}=="0186", GOTO="user"
   1.640 +GOTO="android_usb_rules_end"
   1.641 +LABEL="not_Oculus"
   1.642 +
   1.643 +# Pico XR
   1.644 +ATTR{idVendor}!="2d40", GOTO="not_Pico"
   1.645 +#   Pico 4
   1.646 +ATTR{idProduct}=="00b7", GOTO="user"
   1.647 +GOTO="android_usb_rules_end"
   1.648 +LABEL="not_Pico"
   1.649 +
   1.650 +# OnePlus(Oreo)
   1.651 +ATTR{idVendor}!="2a70", GOTO="not_OnePlus"
   1.652 +#   Oneplus 3T/5T/6 (4ee7=charge,adb)
   1.653 +#   OnePlus 6, 4ee1=charging, 4ee2=MTP+debug, 4ee6=PTP+debug, 4ee7=charging+debug
   1.654 +ATTR{idProduct}=="4ee2", GOTO="adbmtp"
   1.655 +ATTR{idProduct}=="4ee6", GOTO="adbptp"
   1.656 +ATTR{idProduct}=="4ee7", GOTO="adb"
   1.657 +#   OnePlus 6T
   1.658 +ATTR{idProduct}=="d001", GOTO="adb"
   1.659 +#   OnePlus Nord N10 4G USB tethering mode
   1.660 +ATTR{idProduct}=="9024", GOTO="adb"
   1.661 +#   OnePlus 3T with Oreo MIDI mode 90bb=midi,adb 9011=mtp 904d=ptp 904e=ptp,adb
   1.662 +#   OnePlus 7T (9012=mtp,adb)
   1.663 +ATTR{idProduct}=="9011", GOTO="mtp"
   1.664 +ATTR{idProduct}=="9012", GOTO="adbmtp"
   1.665 +ATTR{idProduct}=="904d", GOTO="ptp"
   1.666 +ATTR{idProduct}=="904e", GOTO="adbptp"
   1.667 +ATTR{idProduct}=="90bb", GOTO="adbmidi"
   1.668 +GOTO="android_usb_rules_end"
   1.669 +LABEL="not_OnePlus"
   1.670 +
   1.671 +# Oppo
   1.672 +ATTR{idVendor}!="22d9", GOTO="not_Oppo"
   1.673 +#   Find 5 (2767=debug)
   1.674 +ATTR{idProduct}=="2767", GOTO="adb"
   1.675 +#   Realme 8, OnePlus 9 Pro, Watch=adb
   1.676 +ATTR{idProduct}=="2769", GOTO="adb"
   1.677 +ATTR{idProduct}=="2764", GOTO="mtp"
   1.678 +#   Oppo Watch, fastboot
   1.679 +ATTR{idProduct}=="2024", GOTO="user"
   1.680 +#   RMX3231 - Realme C11 20221, normal, rndis, mtp
   1.681 +ATTR{idProduct}=="200e", GOTO="user"
   1.682 +ATTR{idProduct}=="2028", GOTO="user"
   1.683 +ATTR{idProduct}=="2026", GOTO="user"
   1.684 +#   OnePlus 7a (2774=mass,adb)
   1.685 +#   OnePlus 7T (2765=adb,mtp 2766=rndis,adb)
   1.686 +#   OnePlus 8T (2771=adb,ptp 2772=adb,mtp)
   1.687 +ATTR{idProduct}=="2765", GOTO="adbmtp"
   1.688 +ATTR{idProduct}=="2766", GOTO="adbrndis"
   1.689 +ATTR{idProduct}=="2771", GOTO="adbptp"
   1.690 +ATTR{idProduct}=="2772", GOTO="adbmtp"
   1.691 +ATTR{idProduct}=="2774", GOTO="adbmass"
   1.692 +GOTO="android_usb_rules_end"
   1.693 +LABEL="not_Oppo"
   1.694 +
   1.695 +# OTGV (Need product specific rules)
   1.696 +#ATTR{idVendor}=="2257", GOTO="user"
   1.697 +
   1.698 +# Pantech (SK Teletech Co, Ltd.) (Need product specific rules)
   1.699 +#ATTR{idVendor}=="10a9", GOTO="user"
   1.700 +
   1.701 +# Parrot SA (Car HUD)
   1.702 +ATTR{idVendor}=="19cf", ATTR{idProduct}=="0001", GOTO="user"
   1.703 +
   1.704 +# Pegatron Chagall (5035=adb)
   1.705 +ATTR{idVendor}=="1d4d", ATTR{idProduct}=="5035", GOTO="adb"
   1.706 +
   1.707 +# Philips (and NXP) (Need product specific rules)
   1.708 +#ATTR{idVendor}=="0471", GOTO="user"
   1.709 +
   1.710 +# Pico (Need product specific rules)
   1.711 +#ATTR{idVendor}=="2d40", GOTO="user"
   1.712 +
   1.713 +# PMC-Sierra, (Panasonic Mobile communications, Matsushita) (Need product specific rules)
   1.714 +#ATTR{idVendor}=="04da", GOTO="user"
   1.715 +
   1.716 +# Point Mobile
   1.717 +ATTR{idVendor}!="2a48", GOTO="not_Point_Mobile"
   1.718 +#   PM90
   1.719 +ATTR{idProduct}=="5101", GOTO="user"
   1.720 +GOTO="android_usb_rules_end"
   1.721 +LABEL="not_Point_Mobile"
   1.722 +
   1.723 +# Polar
   1.724 +ATTR{idVendor}!="0da4", GOTO="not_Polar"
   1.725 +ENV{adb_user}="yes"
   1.726 +#   Polar M600 (0010=adb 000b=fastboot)
   1.727 +ATTR{idProduct}=="0010", GOTO="adb"
   1.728 +ATTR{idProduct}=="000b", GOTO="adbfast"
   1.729 +GOTO="android_usb_rules_end"
   1.730 +LABEL="not_Polar"
   1.731 +
   1.732 +# Qualcomm (Wearners also 05c6)
   1.733 +ATTR{idVendor}!="05c6", GOTO="not_Qualcomm"
   1.734 +#   Geeksphone Zero
   1.735 +ATTR{idProduct}=="9025", SYMLINK+="android_adb"
   1.736 +#   OnePlus One (6765=mtp,adb 6764=mtp)
   1.737 +ATTR{idProduct}=="6765", GOTO="adbmtp"
   1.738 +#   OnePlus Two
   1.739 +ATTR{idProduct}=="9011", SYMLINK+="android_adb"
   1.740 +#   OnePlus 3
   1.741 +ATTR{idProduct}=="900e", SYMLINK+="android_adb"
   1.742 +#   OnePlus 3T
   1.743 +ATTR{idProduct}=="676c", SYMLINK+="android_adb"
   1.744 +#   Snapdragon, OnePlus 3T w/ Oreo MIDI mode (9011=mtp 90bb=midi,adb 904e=ptp)
   1.745 +#   Xiaomi A1 (90bb=midi,adb)
   1.746 +ATTR{idProduct}=="90bb", GOTO="adbmidi"
   1.747 +ATTR{idProduct}=="90dc", GOTO="adb"
   1.748 +#   OnePlus 5 / 6 / 6T
   1.749 +ATTR{idProduct}=="9011", SYMLINK+="android_adb"
   1.750 +#   OnePlus 6 / Asia
   1.751 +ATTR{idProduct}=="f003", SYMLINK+="android_adb"
   1.752 +#   Yongnuo YN450m (identified in lsusb as Intex Aqua Fish & Jolla C Diagnostic Mode)
   1.753 +ATTR{idProduct}=="9091", GOTO="adb"
   1.754 +#   Wileyfox Swift 2 Plus
   1.755 +ATTR{idProduct}=="0001", GOTO="user"
   1.756 +ENV{adb_user}="yes"
   1.757 +GOTO="android_usb_rule_match"
   1.758 +LABEL="not_Qualcomm"
   1.759 +
   1.760 +# Quectel
   1.761 +ATTR{idVendor}!="2c7c", GOTO="not_Quectel"
   1.762 +#   EC25
   1.763 +ATTR{idProduct}=="0125", GOTO="adb"
   1.764 +GOTO="android_usb_rules_end"
   1.765 +LABEL="not_Quectel"
   1.766 +
   1.767 +# Razer USA, Ltd.
   1.768 +ATTR{idVendor}!="1532", GOTO="not_Razer"
   1.769 +#   Razer Phone 2
   1.770 +ATTR{idProduct}=="9050", GOTO="adbfast"
   1.771 +ATTR{idProduct}=="9051", GOTO="adb"
   1.772 +GOTO="android_usb_rules_end"
   1.773 +LABEL="not_Razer"
   1.774 +
   1.775 +# Research In Motion, Ltd.
   1.776 +ATTR{idVendor}!="0fca", GOTO="not_RIM"
   1.777 +#   BlackBerry DTEK60
   1.778 +ATTR{idProduct}=="8042", GOTO="adbfast"
   1.779 +GOTO="android_usb_rules_end"
   1.780 +LABEL="not_RIM"
   1.781 +
   1.782 +# Samsung
   1.783 +ATTR{idVendor}!="04e8", GOTO="not_Samsung"
   1.784 +#   False positive printer and other devices
   1.785 +ATTR{idProduct}!="6???", GOTO="android_usb_rules_end"
   1.786 +#   Galaxy i5700
   1.787 +ATTR{idProduct}=="681c", GOTO="adbfast"
   1.788 +#   Galaxy i5800 (681c=debug 6601=fastboot 68a0=mediaplayer)
   1.789 +ATTR{idProduct}=="681c", SYMLINK+="android_adb"
   1.790 +ATTR{idProduct}=="6601", SYMLINK+="android_fastboot"
   1.791 +ATTR{idProduct}=="68a9", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
   1.792 +#   Galaxy i7500
   1.793 +ATTR{idProduct}=="6640", GOTO="adbfast"
   1.794 +#   Galaxy i9000 S, i9300 S3
   1.795 +ATTR{idProduct}=="6601", SYMLINK+="android_adb"
   1.796 +ATTR{idProduct}=="685d", MODE="0660"
   1.797 +ATTR{idProduct}=="68c3", MODE="0660"
   1.798 +#   Galaxy Ace (S5830) "Cooper"
   1.799 +ATTR{idProduct}=="689e", GOTO="adbfast"
   1.800 +#   Galaxy Tab
   1.801 +ATTR{idProduct}=="6877", GOTO="adbfast"
   1.802 +#   Galaxy Nexus (GSM) (6860=mtp,adb 6864=rndis,adb 6866=ptp,adb)
   1.803 +#   Galaxy Core ([6860=mtp+6860=mtp,adb] 6863=tether 6864=tether,adb 6865=ptp 6866=ptp,adb)
   1.804 +#   Galaxy A5   ([6860=mtp+6860=mtp,adb] 6863=rndis 6864=rndis,adb 6865=ptp 6866=ptp,adb 686c=midi 686c=midi,adb)
   1.805 +ATTR{idProduct}=="6860", SYMLINK+="android_adb", GOTO="mtp"
   1.806 +ATTR{idProduct}=="6864", GOTO="adbrndis"
   1.807 +ATTR{idProduct}=="6866", GOTO="adbptp"
   1.808 +ATTR{idProduct}=="686c", GOTO="adbmidi"
   1.809 +#   Galaxy Core, Tab 10.1, i9100 S2, i9300 S3, N5100 Note (8.0), Galaxy S3 SHW-M440S 3G (Korea only)
   1.810 +ATTR{idProduct}=="685e", GOTO="adbfast"
   1.811 +#   Galaxy A5, S4 GT-I9500 (seems to be universally used for this purpose)
   1.812 +ATTR{idProduct}=="685d", GOTO="odin"
   1.813 +ENV{adb_user}="yes"
   1.814 +GOTO="android_usb_rule_match"
   1.815 +LABEL="not_Samsung"
   1.816 +
   1.817 +# Sharp (Need product specific rules)
   1.818 +#ATTR{idVendor}=="04dd", GOTO="user"
   1.819 +
   1.820 +# SHIFT GmbH
   1.821 +ATTR{idVendor}!="3360", GOTO="not_shift"
   1.822 +#   SHIFT5me
   1.823 +ATTR{idProduct}=="201c", GOTO="adb"
   1.824 +GOTO="android_usb_rules_end"
   1.825 +LABEL="not_shift"
   1.826 +
   1.827 +# SK Telesys
   1.828 +ATTR{idVendor}=="1f53", GOTO="user"
   1.829 +
   1.830 +# Sonim
   1.831 +ATTR{idVendor}=="1d9c", GOTO="user"
   1.832 +
   1.833 +# Sony
   1.834 +ATTR{idVendor}!="054c", GOTO="not_Sony"
   1.835 +# (Need product specific rules)
   1.836 +GOTO="android_usb_rules_end"
   1.837 +#   False positives dualshock 0268,05c4,05c5, adapters 0ba0, bluetooth 09cc, 0ce6, VR 09af
   1.838 +ATTR{idProduct}=="02??", GOTO="android_usb_rules_end"
   1.839 +ATTR{idProduct}=="05??", GOTO="android_usb_rules_end"
   1.840 +ATTR{idProduct}=="09??", GOTO="android_usb_rules_end"
   1.841 +ATTR{idProduct}=="0b??", GOTO="android_usb_rules_end"
   1.842 +ATTR{idProduct}=="0c??", GOTO="android_usb_rules_end"
   1.843 +ENV{adb_user}="yes"
   1.844 +GOTO="android_usb_rule_match"
   1.845 +LABEL="not_Sony"
   1.846 +
   1.847 +# Sony Ericsson
   1.848 +ATTR{idVendor}!="0fce", GOTO="not_Sony_Ericsson"
   1.849 +#   Xperia X10 mini (3137=mass_storage)
   1.850 +ATTR{idProduct}=="2137", SYMLINK+="android_adb"
   1.851 +#   Xperia X10 mini pro (3138=mass_storage)
   1.852 +ATTR{idProduct}=="2138", SYMLINK+="android_adb"
   1.853 +#   Xperia X8 (3149=mass_storage)
   1.854 +ATTR{idProduct}=="2149", SYMLINK+="android_adb"
   1.855 +#   Xperia X12 (e14f=mass_storage)
   1.856 +ATTR{idProduct}=="614f", SYMLINK+="android_adb"
   1.857 +#   Xperia Arc S
   1.858 +ATTR{idProduct}=="414f", GOTO="adbfast"
   1.859 +#   Xperia Neo V (6156=debug 0dde=fastboot)
   1.860 +ATTR{idProduct}=="6156", SYMLINK+="android_adb"
   1.861 +ATTR{idProduct}=="0dde", SYMLINK+="android_fastboot"
   1.862 +#   Xperia S
   1.863 +ATTR{idProduct}=="5169", GOTO="adbfast"
   1.864 +#   Xperia SP
   1.865 +ATTR{idProduct}=="6195", GOTO="adbfast"
   1.866 +#   Xperia L
   1.867 +ATTR{idProduct}=="5192", GOTO="adbfast"
   1.868 +#   Xperia Mini Pro
   1.869 +ATTR{idProduct}=="0166", GOTO="adbfast"
   1.870 +#   Xperia V
   1.871 +ATTR{idProduct}=="0186", GOTO="adbfast"
   1.872 +#   Xperia Acro S
   1.873 +ATTR{idProduct}=="5176", GOTO="adbfast"
   1.874 +#   Xperia Z1 Compact
   1.875 +ATTR{idProduct}=="51a7", GOTO="adbfast"
   1.876 +#   Xperia Z2
   1.877 +ATTR{idProduct}=="51ba", GOTO="adbfast"
   1.878 +#   Xperia Z3
   1.879 +ATTR{idProduct}=="01af", GOTO="adbfast"
   1.880 +#   Xperia Z3 Compact
   1.881 +ATTR{idProduct}=="01bb", GOTO="adbfast"
   1.882 +#   Xperia Z3+ Dual
   1.883 +ATTR{idProduct}=="51c9", GOTO="adbfast"
   1.884 +#   Xperia XZ
   1.885 +ATTR{idProduct}=="51e7", GOTO="adbfast"
   1.886 +#   Xperia XZ1 Compact
   1.887 +ATTR{idProduct}=="01f4", GOTO="adbfast"
   1.888 +#   Xperia XZ2 Compact
   1.889 +ATTR{idProduct}=="b00b", GOTO="adbfast"
   1.890 +#   Xperia 5 II
   1.891 +ATTR{idProduct}=="020d", GOTO="adbfast"
   1.892 +#   Xperia Z Ultra
   1.893 +ATTR{idProduct}=="519c", GOTO="adbfast"
   1.894 +#   Xperia Play
   1.895 +ATTR{idProduct}=="615d", GOTO="adbfast"
   1.896 +ENV{adb_user}="yes"
   1.897 +GOTO="android_usb_rule_match"
   1.898 +LABEL="not_Sony_Ericsson"
   1.899 +
   1.900 +# Spectralink
   1.901 +ATTR{idVendor}=="1973", GOTO="user"
   1.902 +
   1.903 +# Spreadtrum
   1.904 +ATTR{idVendor}!="1782", GOTO="not_Spreadtrum"
   1.905 +#   (Unisoc) Various devices (4001=mtp 4002=mtp,adb 4003=mtp,adb)
   1.906 +ATTR{idProduct}=="4002", GOTO="adbmtp"
   1.907 +ATTR{idProduct}=="4003", GOTO="adbmtp"
   1.908 +GOTO="android_usb_rules_end"
   1.909 +LABEL="not_Spreadtrum"
   1.910 +
   1.911 +# T & A Mobile Phones
   1.912 +ATTR{idVendor}!="1bbb", GOTO="not_T_A_Mobile"
   1.913 +#   Alcatel 1 2019 5033F
   1.914 +ATTR{idProduct}=="0c01", GOTO="adb"
   1.915 +#   Alcatel OT991D
   1.916 +ATTR{idProduct}=="00f2", GOTO="adb"
   1.917 +#   Alcatel OT6012A
   1.918 +ATTR{idProduct}=="0167", GOTO="adb"
   1.919 +#   Alcatel 5024L
   1.920 +ATTR{idProduct}=="4ee7", GOTO="adb"
   1.921 +ENV{adb_user}="yes"
   1.922 +GOTO="android_usb_rule_match"
   1.923 +LABEL="not_T_A_Mobile"
   1.924 +
   1.925 +# Teleepoch (Need product specific rules)
   1.926 +#ATTR{idVendor}=="2340", GOTO="user"
   1.927 +
   1.928 +# Texas Instruments UsbBoot
   1.929 +ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", GOTO="user"
   1.930 +ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", GOTO="user"
   1.931 +
   1.932 +# Toshiba (Need product specific rules)
   1.933 +#ATTR{idVendor}=="0930", GOTO="user"
   1.934 +
   1.935 +# Unitech Electronics
   1.936 +ATTR{idVendor}!="2e8e", GOTO="not_Unitech_Electronics"
   1.937 +#   EA630 (96e1=normal 96e7=debug)
   1.938 +ATTR{idProduct}=="96e7", GOTO="adb"
   1.939 +ENV{adb_user}="yes"
   1.940 +GOTO="android_usb_rule_match"
   1.941 +LABEL="not_Unitech_Electronics"
   1.942 +
   1.943 +# Vivo (Need product specific rules)
   1.944 +ATTR{idVendor}=="2d95", GOTO="user"
   1.945 +
   1.946 +# Wileyfox KAZAM Tornado 348 (0c03=mass,adb)
   1.947 +ATTR{idVendor}=="2970", ATTR{idProduct}=="0c03", GOTO="adb"
   1.948 +
   1.949 +# XiaoMi
   1.950 +ATTR{idVendor}!="2717", GOTO="not_XiaoMi"
   1.951 +#   Mi3
   1.952 +ATTR{idProduct}=="0368", GOTO="adbmtp"
   1.953 +#   RedMi 1S WCDMA (MTP+Debug)
   1.954 +ATTR{idProduct}=="1268", GOTO="adbmtp"
   1.955 +#   RedMi 1S / RedMi / RedMi Note WCDMA (1210=ptp 1218=ptp,adb 1220=CDrom 1228=usb,adb 1240=mtp 1248=mtp,adb)
   1.956 +ATTR{idProduct}=="1218", GOTO="adbptp"
   1.957 +ATTR{idProduct}=="1228", GOTO="adb"
   1.958 +ATTR{idProduct}=="1248", GOTO="adbmtp"
   1.959 +#   RedMi / RedMi Note 4G WCDMA (1311=ptp,adb 1328=usb,adb 1368=mtp,adb)
   1.960 +ATTR{idProduct}=="1318", GOTO="adbptp"
   1.961 +ATTR{idProduct}=="1328", GOTO="adb"
   1.962 +ATTR{idProduct}=="1368", GOTO="adbmtp"
   1.963 +#   Mi2 (f003=mtp,mass_storage 9039=mtp,adb,mass_storage 904d=ptp 904e=ptp,adb f000=mass_storage 9015=mass_storage,adb f00e=ndis 9024=ndis,adb f00f=ndis 803e=ndis,adb)
   1.964 +#   Mi2A / Mi2S (9039=mtp,adb, 904e=adb,ptp)
   1.965 +ATTR{idProduct}=="9039", GOTO="adbmtp"
   1.966 +ATTR{idProduct}=="904e", GOTO="adbptp"
   1.967 +ATTR{idProduct}=="9015", GOTO="adbmass"
   1.968 +ATTR{idProduct}=="9024", GOTO="adb"
   1.969 +ATTR{idProduct}=="803e", GOTO="adb"
   1.970 +#   Redmi Note 3 (ff08=adb)
   1.971 +#   Mi/Redmi (ff10=ptp ff18=ptp,adb ff40=mtp ff48=mtp,adb ff80=rndis ff88=rndis,adb)
   1.972 +#   Mi Mix / A1 (ff18=ptp,adb ff28=storage,adb ff48=mtp,adb ff88=rndis,adb)
   1.973 +ATTR{idProduct}=="ff08", GOTO="adb"
   1.974 +ATTR{idProduct}=="ff18", GOTO="adbptp"
   1.975 +ATTR{idProduct}=="ff28", GOTO="adbmass"
   1.976 +ATTR{idProduct}=="ff40", GOTO="mtp"
   1.977 +ATTR{idProduct}=="ff48", GOTO="adbmtp"
   1.978 +ATTR{idProduct}=="ff88", GOTO="adbrndis"
   1.979 +#   RedMi / RedMi Note 4G CDMA (ff68=usb,adb) / Mi4c / Mi5
   1.980 +ATTR{idProduct}=="ff68", GOTO="adb"
   1.981 +GOTO="android_usb_rules_end"
   1.982 +LABEL="not_XiaoMi"
   1.983 +
   1.984 +# Yota
   1.985 +ATTR{idVendor}!="2916", GOTO="not_Yota"
   1.986 +#   YotaPhone2 (f003=normal 9139=debug)
   1.987 +ATTR{idProduct}=="9139", GOTO="adb"
   1.988 +ENV{adb_user}="yes"
   1.989 +GOTO="android_usb_rule_match"
   1.990 +LABEL="not_Yota"
   1.991 +
   1.992 +# YU (Need product specific rules)
   1.993 +ATTR{idVendor}=="1ebf", GOTO="user"
   1.994 +
   1.995 +# Zebra
   1.996 +ATTR{idVendor}!="05e0", GOTO="not_Zebra"
   1.997 +#   TC55
   1.998 +ATTR{idProduct}=="2101", GOTO="adb"
   1.999 +#   TC72
  1.1000 +ATTR{idProduct}=="2106", GOTO="adb"
  1.1001 +#   TC78
  1.1002 +ATTR{idProduct}=="2107", GOTO="adb"
  1.1003 +GOTO="android_usb_rules_end"
  1.1004 +LABEL="not_Zebra"
  1.1005 +
  1.1006 +# ZTE
  1.1007 +ATTR{idVendor}!="19d2", GOTO="not_ZTE"
  1.1008 +#   ZTE Blade A5 2020 (0306=mtp,adb 0310=ptp,adb 0501=cdrom,adb 1352=charging,adb 1373=rndis,adb)
  1.1009 +ATTR{idProduct}=="0306", GOTO="adbmtp"
  1.1010 +ATTR{idProduct}=="0310", GOTO="adbptp"
  1.1011 +ATTR{idProduct}=="0501", GOTO="adb"
  1.1012 +ATTR{idProduct}=="1352", GOTO="adb"
  1.1013 +ATTR{idProduct}=="1373", GOTO="adbrndis"
  1.1014 +#   Blade (1351=debug 1353=normal)
  1.1015 +ATTR{idProduct}=="1351", GOTO="adb"
  1.1016 +#   Blade S (Crescent, Orange San Francisco 2) (1354=debug 1355=normal)
  1.1017 +ATTR{idProduct}=="1354", GOTO="adb"
  1.1018 +#   P685M LTE modem
  1.1019 +ATTR{idProduct}=="1275", GOTO="user"
  1.1020 +#   MF286[A] internal LTE modem
  1.1021 +ATTR{idProduct}=="1432", GOTO="user"
  1.1022 +#   MF286D internal LTE modem
  1.1023 +ATTR{idProduct}=="1485", GOTO="user"
  1.1024 +#   MF286R internal LTE modem
  1.1025 +ATTR{idProduct}=="1489", GOTO="user"
  1.1026 +#   Nubia / RedMagic Series (NX***)
  1.1027 +#   See https://github.com/TadiT7/nubia_nx619j_dump/blob/NX619J-user-9-PKQ1.180929.001-eng.nubia.20181220.181559-release-keys/vendor/etc/init/hw/init.nubia.usb.rc
  1.1028 +#   (... ffc0=diag,mass_storage,adb ffc1=adb ffcb=rndis,adb ffcd=mass_storage,adb ffcf=mtp,adb ffd1=ptp,adb)
  1.1029 +ATTR{idProduct}=="ffc0", GOTO="adbmass"
  1.1030 +ATTR{idProduct}=="ffc1", GOTO="adb"
  1.1031 +ATTR{idProduct}=="ffcb", GOTO="adbrndis"
  1.1032 +ATTR{idProduct}=="ffcd", GOTO="adbmass"
  1.1033 +ATTR{idProduct}=="ffcf", GOTO="adbmtp"
  1.1034 +ATTR{idProduct}=="ffd1", GOTO="adbptp"
  1.1035 +#   modem,service,nema,adb
  1.1036 +ATTR{idProduct}=="ffc9", GOTO="adb"
  1.1037 +#   modem,service,nema,mass_storage,adb
  1.1038 +ATTR{idProduct}=="ffc7", GOTO="adb"
  1.1039 +#   diag,modem,mass_storage,adb
  1.1040 +ATTR{idProduct}=="ffb0", GOTO="adb"
  1.1041 +#   diag,modem,service,mass_storage,adb
  1.1042 +ATTR{idProduct}=="ffb2", GOTO="adb"
  1.1043 +GOTO="android_usb_rules_end"
  1.1044 +LABEL="not_ZTE"
  1.1045 +
  1.1046 +# ZUK (Need product specific rules)
  1.1047 +#ATTR{idVendor}=="2b4c", GOTO="user"
  1.1048 +
  1.1049 +# Verifone
  1.1050 +ATTR{idVendor}=="11ca", GOTO="user"
  1.1051 +
  1.1052 +# No android devices found
  1.1053 +GOTO="android_usb_rules_end"
  1.1054 +
  1.1055 +# ADB Debug User (default)
  1.1056 +LABEL="adb", ENV{adb_adb}="yes", GOTO="android_usb_rule_match"
  1.1057 +
  1.1058 +# ADB Debug and Audio Source
  1.1059 +LABEL="adbaud", ENV{adb_adb}="yes", GOTO="android_usb_rule_match"
  1.1060 +
  1.1061 +# ADB Debug and AT-commands CDC Serial
  1.1062 +LABEL="adbcdc", ENV{adb_adbcdc}="yes", GOTO="android_usb_rule_match"
  1.1063 +
  1.1064 +# ADB Debug and USB Video Class
  1.1065 +LABEL="adbuvc", ENV{adb_adbuvc}="yes"
  1.1066 +LABEL="uvc", ENV{adb_uvc}="yes", GOTO="android_usb_rule_match"
  1.1067 +
  1.1068 +# ADB Debug and Fastboot mode
  1.1069 +LABEL="adbfast", ENV{adb_adbfast}="yes", GOTO="android_usb_rule_match"
  1.1070 +
  1.1071 +# ADB Debug and mass storage (note: generally android_ver<4.3; Moto Z3 Play when powered off)
  1.1072 +LABEL="adbmass", ENV{adb_adbmass}="yes"
  1.1073 +LABEL="mass", ENV{adb_mass}="yes", GOTO="android_usb_rule_match"
  1.1074 +
  1.1075 +# ADB Debug and MIDI mode (also check to see /dev/midi%n)
  1.1076 +LABEL="adbmidi", ENV{adb_adbmidi}="yes"
  1.1077 +LABEL="midi", ENV{adb_user}="yes", GOTO="android_usb_rule_match"
  1.1078 +
  1.1079 +# ADB Debug and MTP mode
  1.1080 +LABEL="adbmtp", ENV{adb_adbmtp}="yes"
  1.1081 +LABEL="mtp", ENV{adb_mtp}="yes", GOTO="android_usb_rule_match"
  1.1082 +
  1.1083 +# ADB Debug and PTP mode
  1.1084 +LABEL="adbptp", ENV{adb_adbptp}="yes"
  1.1085 +LABEL="ptp", ENV{adb_ptp}="yes", GOTO="android_usb_rule_match"
  1.1086 +
  1.1087 +# ADB Debug and Tether mode
  1.1088 +LABEL="adbrndis", ENV{adb_adb}="yes"
  1.1089 +LABEL="rndis", ENV{adb_user}="yes", GOTO="android_usb_rule_match"
  1.1090 +
  1.1091 +# Odin (Samsung-specific flashing protocol, add user SYMLINK)
  1.1092 +LABEL="odin"
  1.1093 +
  1.1094 +# Add "android" SYMLINK
  1.1095 +LABEL="user", ENV{adb_user}="yes"
  1.1096 +
  1.1097 +# Symlink common code to reduce steps above
  1.1098 +LABEL="android_usb_rule_match"
  1.1099 +ENV{adb_adbcdc}=="yes", ENV{adb_adb}="yes", SYMLINK+="android_cdc", SYMLINK+="android_cdc%n"
  1.1100 +ENV{adb_adbfast}=="yes", ENV{adb_adb}="yes", ENV{adb_fast}="yes"
  1.1101 +ENV{adb_adbmass}=="yes", ENV{adb_mass}="yes"
  1.1102 +ENV{adb_adbmtp}=="yes", ENV{adb_adb}="yes", ENV{adb_mtp}="yes"
  1.1103 +ENV{adb_adbptp}=="yes", ENV{adb_adb}="yes", ENV{adb_ptp}="yes"
  1.1104 +ENV{adb_adbmidi}=="yes", ENV{adb_adb}="yes", SYMLINK+="android_midi", SYMLINK+="android_midi0%n"
  1.1105 +ENV{adb_adbuvc}=="yes", ENV{adb_adb}="yes", ENV{adb_uvc}="yes"
  1.1106 +ENV{adb_adb}=="yes", ENV{adb_user}="yes", SYMLINK+="android_adb"
  1.1107 +ENV{adb_fast}=="yes", SYMLINK+="android_fastboot"
  1.1108 +ENV{adb_mass}=="yes", ENV{adb_mtp}="yes"
  1.1109 +ENV{adb_ptp}=="yes", ENV{adb_user}="yes", ATTR{bDeviceClass}=="00|02|06|ef|ff", ENV{adb_mtp}="yes"
  1.1110 +ENV{adb_mtp}=="yes", ENV{adb_user}="yes", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
  1.1111 +
  1.1112 +# Enable device as a user device if found (add an "android" SYMLINK)
  1.1113 +ENV{adb_user}=="yes", MODE="0660", GROUP="adbusers", TAG+="uaccess", SYMLINK+="android", SYMLINK+="android%n"
  1.1114 +
  1.1115 +# Devices listed here {begin...end} are connected by USB
  1.1116 +LABEL="android_usb_rules_end"