chore: use more specific adb GOTOs for misc (#283)

Reduce several generic links down to more specifics
by changing "assumed match" due to vendor code, to
"assumed exits" using GOTO="android_usb_rules_end".
This should help reduce false positives that perhaps
should be handled elsewhere like cameras, keypads,
keyboards, mice, or other devices, etc, etc, etc.

Some vendor info is very ambigous and needs more info
therefore commented-out code (needs more info).

Some vendors left as-is since they appear specific to
a product type and it might break a line of something
which may be better left for now, looked at in future.

merged in some idProduct details from linux-usb.org,
device hunt, and also libmtp.

Cleaned up some commenting for more consistency.
This commit is contained in:
Joe 2023-08-28 05:36:08 -07:00 committed by GitHub
parent 7d09e779fa
commit 66d21f0e69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 96 additions and 98 deletions

View File

@ -123,8 +123,8 @@ ATTR{idProduct}=="7030", GOTO="adb"
GOTO="android_usb_rules_end" GOTO="android_usb_rules_end"
LABEL="not_Asus" LABEL="not_Asus"
# Azpen Onda # Azpen Onda (Need product specific rules)
ATTR{idVendor}=="1f3a", GOTO="user" #ATTR{idVendor}=="1f3a", GOTO="user"
# BQ # BQ
ATTR{idVendor}!="2a47", GOTO="not_BQ" ATTR{idVendor}!="2a47", GOTO="not_BQ"
@ -168,8 +168,8 @@ LABEL="not_Fairphone2"
# Commtiva Z71, Geeksphone One # Commtiva Z71, Geeksphone One
ATTR{idVendor}=="0489", ATTR{idProduct}=="c001", GOTO="adb" ATTR{idVendor}=="0489", ATTR{idProduct}=="c001", GOTO="adb"
# Fujitsu/Fujitsu Toshiba # Fujitsu/Fujitsu Toshiba (Need product specific rules)
ATTR{idVendor}=="04c5", GOTO="user" #ATTR{idVendor}=="04c5", GOTO="user"
# Fuzhou Rockchip Electronics # Fuzhou Rockchip Electronics
# Mediacom Smartpad 715i # Mediacom Smartpad 715i
@ -185,8 +185,8 @@ ATTR{idProduct}=="0018", GOTO="adbptp"
GOTO="android_usb_rules_end" GOTO="android_usb_rules_end"
LABEL="not_Fuzhou" LABEL="not_Fuzhou"
# Garmin-Asus # Garmin-Asus (Need product specific rules)
ATTR{idVendor}=="091e", GOTO="user" #ATTR{idVendor}=="091e", GOTO="user"
# Google # Google
ATTR{idVendor}!="18d1", GOTO="not_Google" ATTR{idVendor}!="18d1", GOTO="not_Google"
@ -253,11 +253,11 @@ ATTR{idProduct}=="2c11", GOTO="adb"
GOTO="android_usb_rules_end" GOTO="android_usb_rules_end"
LABEL="not_Google" LABEL="not_Google"
# Haier # Haier (Need product specific rules)
ATTR{idVendor}=="201e", GOTO="user" #ATTR{idVendor}=="201e", GOTO="user"
# Hisense (includes Fairphone 1) # Hisense (includes Fairphone 1) (Need product specific rules)
ATTR{idVendor}=="109b", GOTO="user" #ATTR{idVendor}=="109b", GOTO="user"
# Honeywell/Foxconn # Honeywell/Foxconn
ATTR{idVendor}!="0c2e", GOTO="not_Honeywell" ATTR{idVendor}!="0c2e", GOTO="not_Honeywell"
@ -272,10 +272,12 @@ ATTR{idVendor}!="0bb4", GOTO="not_HTC"
ATTR{idProduct}=="0001", GOTO="mass" ATTR{idProduct}=="0001", GOTO="mass"
ATTR{idProduct}=="0fff", GOTO="adbfast" ATTR{idProduct}=="0fff", GOTO="adbfast"
# ADP1, Dream, G1, HD2, Magic, Tatoo (0c01=mass_storage, 0c02=mass_storage,adb) # ADP1, Dream, G1, HD2, Magic, Tatoo (0c01=mass_storage, 0c02=mass_storage,adb)
# Desire/desire HD/Hero (0ff8=tether 0ff9=charge 0ffe=modem 0fb4=rndis) # Desire/desire HD/Hero (0ce5=debug 0fb4=rndis 0ff8=tether 0ff9=charge,mass_storage 0ffc=sync_manager 0ffe=modem)
# NOTE: Amazon Kindle 8 2016 (giza) (fastboot=0bb4:0c01 conflicts with mass storage=0c01) # NOTE: Amazon Kindle 8 2016 (giza) (fastboot=0bb4:0c01 conflicts with mass storage=0c01)
ATTR{idProduct}=="0c01", GOTO="mass" ATTR{idProduct}=="0c01", GOTO="mass"
ATTR{idProduct}=="0c02", GOTO="adbmass" ATTR{idProduct}=="0c02", GOTO="adbmass"
ATTR{idProduct}=="0ce5", GOTO="adb"
ATTR{idProduct}=="0ff9", GOTO="mass"
# ChaCha # ChaCha
ATTR{idProduct}=="0cb2", GOTO="adbfast" ATTR{idProduct}=="0cb2", GOTO="adbfast"
# Desire (Bravo) (0c87=debug 0c99=debug) # Desire (Bravo) (0c87=debug 0c99=debug)
@ -302,11 +304,9 @@ ATTR{idProduct}=="0c8d", SYMLINK+="android_adb"
ATTR{idProduct}=="0c96", SYMLINK+="android_adb" ATTR{idProduct}=="0c96", SYMLINK+="android_adb"
# One (m7) && One (m8) # One (m7) && One (m8)
ATTR{idProduct}=="0c93", SYMLINK+="android_adb" ATTR{idProduct}=="0c93", SYMLINK+="android_adb"
# Sensation # Sensation, One (0f87=mtp,?,adb)
ATTR{idProduct}=="0f87", SYMLINK+="android_adb" ATTR{idProduct}=="0f87", GOTO="adbmtp"
ATTR{idProduct}=="0ff0", SYMLINK+="android_fastboot" ATTR{idProduct}=="0ff0", SYMLINK+="android_fastboot"
# One V
ATTR{idProduct}=="0ce5", SYMLINK+="android_adb"
# One X # One X
ATTR{idProduct}=="0cd6", SYMLINK+="android_adb" ATTR{idProduct}=="0cd6", SYMLINK+="android_adb"
# Slide # Slide
@ -353,19 +353,18 @@ LABEL="not_HTC"
# Huawei # Huawei
ATTR{idVendor}!="12d1", GOTO="not_Huawei" ATTR{idVendor}!="12d1", GOTO="not_Huawei"
# IDEOS # IDEOS (1037=? 1038=debug 1039=tether)
ATTR{idProduct}=="1038", GOTO="adbfast" ATTR{idProduct}=="1038", GOTO="adbfast"
# U8850 Vision # U8850 Vision
ATTR{idProduct}=="1021", GOTO="adbfast" ATTR{idProduct}=="1021", GOTO="adbfast"
# HiKey adb # HiKey (1050=usbnet 1057=adb)
ATTR{idProduct}=="1057", SYMLINK+="android_adb"
# HiKey usbnet
ATTR{idProduct}=="1050", SYMLINK+="android_adb" ATTR{idProduct}=="1050", SYMLINK+="android_adb"
ATTR{idProduct}=="1057", GOTO="adb"
# Honor 6 # Honor 6
ATTR{idProduct}=="103a", SYMLINK+="android_adb" ATTR{idProduct}=="103a", SYMLINK+="android_adb"
ATTR{idProduct}=="1051", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" ATTR{idProduct}=="1051", GOTO="mtp"
# MediaPad M2-A01L # MediaPad M2-A01L
ATTR{idProduct}=="1052", SYMLINK+="android_adb" ATTR{idProduct}=="1052", GOTO="mtp"
# MediaPad T3 # MediaPad T3
ATTR{idProduct}=="107d", SYMLINK+="android_adb" ATTR{idProduct}=="107d", SYMLINK+="android_adb"
# P10 Lite # P10 Lite
@ -374,8 +373,7 @@ ATTR{idProduct}=="107e", SYMLINK+="android_adb"
ATTR{idProduct}=="1c2c", SYMLINK+="android_adb" ATTR{idProduct}=="1c2c", SYMLINK+="android_adb"
# Mate 9 # Mate 9
ATTR{idProduct}=="107e", SYMLINK+="android_adb" ATTR{idProduct}=="107e", SYMLINK+="android_adb"
ENV{adb_user}="yes" GOTO="android_usb_rules_end"
GOTO="android_usb_rule_match"
LABEL="not_Huawei" LABEL="not_Huawei"
# Intel # Intel
@ -404,17 +402,17 @@ ATTR{idProduct}=="bf39", GOTO="adb"
GOTO="android_usb_rules_end" GOTO="android_usb_rules_end"
LABEL="not_IUNI" LABEL="not_IUNI"
# K-Touch # K-Touch (Need product specific rules)
ATTR{idVendor}=="24e3", GOTO="user" #ATTR{idVendor}=="24e3", GOTO="user"
# KT Tech # KT Tech (Need product specific rules)
ATTR{idVendor}=="2116", GOTO="user" #ATTR{idVendor}=="2116", GOTO="user"
# Kyocera # Kyocera (Need product specific rules)
#ATTR{idVendor}=="0482", ENV{adb_user}="yes" #ATTR{idVendor}=="0482", ENV{adb_user}="yes"
# Lenovo # Lenovo (Need product specific rules)
ATTR{idVendor}=="17ef", GOTO="user" #ATTR{idVendor}=="17ef", GOTO="user"
# LeTv (LeECo) # LeTv (LeECo)
ATTR{idVendor}!="2b0e", GOTO="not_letv" ATTR{idVendor}!="2b0e", GOTO="not_letv"
@ -426,7 +424,7 @@ LABEL="not_letv"
# LG # LG
ATTR{idVendor}!="1004", GOTO="not_LG" ATTR{idVendor}!="1004", GOTO="not_LG"
# Ally, Vortex, P500, P500h (618e=debug 618f=mass_storage) # Ally, Vortex, P500, P500h (61c5=charge 618e=debug 618f=mass_storage)
ATTR{idProduct}=="618e", GOTO="adb" ATTR{idProduct}=="618e", GOTO="adb"
ATTR{idProduct}=="618f", GOTO="mass" ATTR{idProduct}=="618f", GOTO="mass"
# G2 D802 (61f1=LG software mode) # G2 D802 (61f1=LG software mode)
@ -435,7 +433,7 @@ ATTR{idProduct}=="61f1", SYMLINK+="android_adb"
ATTR{idProduct}=="618c", SYMLINK+="android_adb" ATTR{idProduct}=="618c", SYMLINK+="android_adb"
# G2 D803 rogers (631f=charge) # G2 D803 rogers (631f=charge)
ATTR{idProduct}=="631f", SYMLINK+="android_adb" ATTR{idProduct}=="631f", SYMLINK+="android_adb"
# G3 (VS985) Android Phone (627f=mtp) # G3 (VS985), Android Phone (627f=mtp)
ATTR{idProduct}=="627f", GOTO="mtp" ATTR{idProduct}=="627f", GOTO="mtp"
# LM-X420xxx/G2/Optimus (6300=charge 631c=charge 631d=ptp 631e=ptp 633e=mtp 6344=tether 6348=midi 6356=CDrom) # LM-X420xxx/G2/Optimus (6300=charge 631c=charge 631d=ptp 631e=ptp 633e=mtp 6344=tether 6348=midi 6356=CDrom)
ATTR{idProduct}=="631c", GOTO="adb" ATTR{idProduct}=="631c", GOTO="adb"
@ -447,8 +445,6 @@ ATTR{idProduct}=="6348", GOTO="midi"
# Optimus LTE (61f9=mtp 61fe=tether) # Optimus LTE (61f9=mtp 61fe=tether)
ATTR{idProduct}=="6315", SYMLINK+="android_adb" ATTR{idProduct}=="6315", SYMLINK+="android_adb"
ATTR{idProduct}=="61f9", GOTO="mtp" ATTR{idProduct}=="61f9", GOTO="mtp"
# Optimus One
ATTR{idProduct}=="61c5", SYMLINK+="android_adb"
# Swift GT540 # Swift GT540
ATTR{idProduct}=="61b4", SYMLINK+="android_adb" ATTR{idProduct}=="61b4", SYMLINK+="android_adb"
# P500 CM10 # P500 CM10
@ -541,20 +537,20 @@ ATTR{idProduct}=="201d", GOTO="adbmtp"
GOTO="android_usb_rules_end" GOTO="android_usb_rules_end"
LABEL="not_MTK" LABEL="not_MTK"
# NEC # NEC LifeTouch Note (0300=? 0301=debug)
ATTR{idVendor}=="0409", GOTO="user" ATTR{idVendor}=="0409", ATTR{idProduct}=="0300", GOTO="user"
# Nextbit # Nextbit (Need product specific rules)
ATTR{idVendor}=="2c3f", GOTO="user" #ATTR{idVendor}=="2c3f", GOTO="user"
# Nokia X # Nokia X (Need product specific rules)
ATTR{idVendor}=="0421", GOTO="user" #ATTR{idVendor}=="0421", GOTO="user"
# Nokia 3 # Nokia 3 (Need product specific rules)
ATTR{idVendor}=="2e04", GOTO="user" #ATTR{idVendor}=="2e04", GOTO="user"
# Nook (Barnes & Noble) # Nook (Barnes & Noble) (Need product specific rules)
ATTR{idVendor}=="2080", GOTO="user" #ATTR{idVendor}=="2080", GOTO="user"
# Nvidia # Nvidia
ATTR{idVendor}!="0955", GOTO="not_Nvidia" ATTR{idVendor}!="0955", GOTO="not_Nvidia"
@ -571,8 +567,8 @@ ENV{adb_user}="yes"
GOTO="android_usb_rule_match" GOTO="android_usb_rule_match"
LABEL="not_Nvidia" LABEL="not_Nvidia"
# Oculus # Oculus (Need product specific rules)
ATTR{idVendor}=="2833", GOTO="user" #ATTR{idVendor}=="2833", GOTO="user"
# OnePlus(Oreo) # OnePlus(Oreo)
ATTR{idVendor}!="2a70", GOTO="not_OnePlus" ATTR{idVendor}!="2a70", GOTO="not_OnePlus"
@ -590,7 +586,7 @@ ATTR{idProduct}=="9012", GOTO="adbmtp"
ATTR{idProduct}=="904d", GOTO="ptp" ATTR{idProduct}=="904d", GOTO="ptp"
ATTR{idProduct}=="904e", GOTO="adbptp" ATTR{idProduct}=="904e", GOTO="adbptp"
ATTR{idProduct}=="90bb", GOTO="adbmidi" ATTR{idProduct}=="90bb", GOTO="adbmidi"
GOTO="android_usb_rule_match" GOTO="android_usb_rules_end"
LABEL="not_OnePlus" LABEL="not_OnePlus"
# Oppo # Oppo
@ -599,9 +595,7 @@ ATTR{idVendor}!="22d9", GOTO="not_Oppo"
ATTR{idProduct}=="2767", GOTO="adb" ATTR{idProduct}=="2767", GOTO="adb"
# Realme 8 # Realme 8
ATTR{idProduct}=="2769", GOTO="adb" ATTR{idProduct}=="2769", GOTO="adb"
ATTR{idProduct}=="2764", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" ATTR{idProduct}=="2764", GOTO="mtp"
# A94 5G
ATTR{idProduct}=="2769", GOTO="adb"
# Oppo Watch, fastboot # Oppo Watch, fastboot
ATTR{idProduct}=="2024", GOTO="user" ATTR{idProduct}=="2024", GOTO="user"
# RMX3231 - Realme C11 20221, normal, rndis, mtp # RMX3231 - Realme C11 20221, normal, rndis, mtp
@ -613,29 +607,29 @@ ATTR{idProduct}=="2026", GOTO="user"
ATTR{idProduct}=="2771", GOTO="adbptp" ATTR{idProduct}=="2771", GOTO="adbptp"
ATTR{idProduct}=="2772", GOTO="adbmtp" ATTR{idProduct}=="2772", GOTO="adbmtp"
ATTR{idProduct}=="2774", GOTO="adbmass" ATTR{idProduct}=="2774", GOTO="adbmass"
GOTO="android_usb_rule_match" GOTO="android_usb_rules_end"
LABEL="not_Oppo" LABEL="not_Oppo"
# OTGV # OTGV (Need product specific rules)
ATTR{idVendor}=="2257", GOTO="user" #ATTR{idVendor}=="2257", GOTO="user"
# Pantech (SK Teletech Co, Ltd.) # Pantech (SK Teletech Co, Ltd.) (Need product specific rules)
ATTR{idVendor}=="10a9", GOTO="user" #ATTR{idVendor}=="10a9", GOTO="user"
# Parrot SA (Car HUD) # Parrot SA (Car HUD)
ATTR{idVendor}=="19cf", GOTO="user" ATTR{idVendor}=="19cf", ATTR{idProduct}=="0001", GOTO="user"
# Pegatron # Pegatron Chagall (5035=adb)
ATTR{idVendor}=="1d4d", GOTO="user" ATTR{idVendor}=="1d4d", ATTR{idProduct}=="5035", GOTO="adb"
# Philips (and NXP) # Philips (and NXP) (Need product specific rules)
ATTR{idVendor}=="0471", GOTO="user" #ATTR{idVendor}=="0471", GOTO="user"
# Pico # Pico (Need product specific rules)
ATTR{idVendor}=="2d40", GOTO="user" #ATTR{idVendor}=="2d40", GOTO="user"
# PMC-Sierra, (Panasonic Mobile communications, Matsushita) # PMC-Sierra, (Panasonic Mobile communications, Matsushita) (Need product specific rules)
ATTR{idVendor}=="04da", GOTO="user" #ATTR{idVendor}=="04da", GOTO="user"
# Point Mobile # Point Mobile
ATTR{idVendor}!="2a48", GOTO="not_Point_Mobile" ATTR{idVendor}!="2a48", GOTO="not_Point_Mobile"
@ -647,17 +641,17 @@ LABEL="not_Point_Mobile"
# Polar # Polar
ATTR{idVendor}!="0da4", GOTO="not_Polar" ATTR{idVendor}!="0da4", GOTO="not_Polar"
ENV{adb_user}="yes" ENV{adb_user}="yes"
# Polar M600 (0010=adb,000b=fastboot) # Polar M600 (0010=adb 000b=fastboot)
ATTR{idProduct}=="0010", SYMLINK+="android_adb" ATTR{idProduct}=="0010", GOTO="adb"
ATTR{idProduct}=="000b", SYMLINK+="android_fastboot" ATTR{idProduct}=="000b", GOTO="adbfast"
GOTO="android_usb_rule_match" GOTO="android_usb_rules_end"
LABEL="not_Polar" LABEL="not_Polar"
# Qualcomm (Wearners also 05c6) # Qualcomm (Wearners also 05c6)
ATTR{idVendor}!="05c6", GOTO="not_Qualcomm" ATTR{idVendor}!="05c6", GOTO="not_Qualcomm"
# Geeksphone Zero # Geeksphone Zero
ATTR{idProduct}=="9025", SYMLINK+="android_adb" ATTR{idProduct}=="9025", SYMLINK+="android_adb"
# OnePlus One (6765=mtp,adb, 6764=mtp) # OnePlus One (6765=mtp,adb 6764=mtp)
ATTR{idProduct}=="6765", GOTO="adbmtp" ATTR{idProduct}=="6765", GOTO="adbmtp"
# OnePlus Two # OnePlus Two
ATTR{idProduct}=="9011", SYMLINK+="android_adb" ATTR{idProduct}=="9011", SYMLINK+="android_adb"
@ -665,8 +659,8 @@ ATTR{idProduct}=="9011", SYMLINK+="android_adb"
ATTR{idProduct}=="900e", SYMLINK+="android_adb" ATTR{idProduct}=="900e", SYMLINK+="android_adb"
# OnePlus 3T # OnePlus 3T
ATTR{idProduct}=="676c", SYMLINK+="android_adb" ATTR{idProduct}=="676c", SYMLINK+="android_adb"
# Snapdragon, OnePlus 3T w/ Oreo MIDI mode (90bb=adb,midi, 9011=MTP, 904e=PTP) # Snapdragon, OnePlus 3T w/ Oreo MIDI mode (9011=mtp 90bb=midi,adb 904e=ptp)
# Xiaomi A1 (90bb=midi+adb) # Xiaomi A1 (90bb=midi,adb)
ATTR{idProduct}=="90bb", GOTO="adbmidi" ATTR{idProduct}=="90bb", GOTO="adbmidi"
ATTR{idProduct}=="90dc", GOTO="adb" ATTR{idProduct}=="90dc", GOTO="adb"
# OnePlus 5 / 6 / 6T # OnePlus 5 / 6 / 6T
@ -702,7 +696,7 @@ ATTR{idVendor}!="04e8", GOTO="not_Samsung"
ATTR{idProduct}!="6???", GOTO="android_usb_rules_end" ATTR{idProduct}!="6???", GOTO="android_usb_rules_end"
# Galaxy i5700 # Galaxy i5700
ATTR{idProduct}=="681c", GOTO="adbfast" ATTR{idProduct}=="681c", GOTO="adbfast"
# Galaxy i5800 (681c=debug,6601=fastboot,68a0=mediaplayer) # Galaxy i5800 (681c=debug 6601=fastboot 68a0=mediaplayer)
ATTR{idProduct}=="681c", SYMLINK+="android_adb" ATTR{idProduct}=="681c", SYMLINK+="android_adb"
ATTR{idProduct}=="6601", SYMLINK+="android_fastboot" ATTR{idProduct}=="6601", SYMLINK+="android_fastboot"
ATTR{idProduct}=="68a9", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" ATTR{idProduct}=="68a9", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
@ -729,8 +723,8 @@ ENV{adb_user}="yes"
GOTO="android_usb_rule_match" GOTO="android_usb_rule_match"
LABEL="not_Samsung" LABEL="not_Samsung"
# Sharp # Sharp (Need product specific rules)
ATTR{idVendor}=="04dd", GOTO="user" #ATTR{idVendor}=="04dd", GOTO="user"
# SK Telesys # SK Telesys
ATTR{idVendor}=="1f53", GOTO="user" ATTR{idVendor}=="1f53", GOTO="user"
@ -740,6 +734,8 @@ ATTR{idVendor}=="1d9c", GOTO="user"
# Sony # Sony
ATTR{idVendor}!="054c", GOTO="not_Sony" ATTR{idVendor}!="054c", GOTO="not_Sony"
# (Need product specific rules)
GOTO="android_usb_rules_end"
# False positives dualshock 0268,05c4,05c5, adapters 0ba0, bluetooth 09cc, 0ce6, VR 09af # False positives dualshock 0268,05c4,05c5, adapters 0ba0, bluetooth 09cc, 0ce6, VR 09af
ATTR{idProduct}=="02??", GOTO="android_usb_rules_end" ATTR{idProduct}=="02??", GOTO="android_usb_rules_end"
ATTR{idProduct}=="05??", GOTO="android_usb_rules_end" ATTR{idProduct}=="05??", GOTO="android_usb_rules_end"
@ -762,7 +758,7 @@ ATTR{idProduct}=="2149", SYMLINK+="android_adb"
ATTR{idProduct}=="614f", SYMLINK+="android_adb" ATTR{idProduct}=="614f", SYMLINK+="android_adb"
# Xperia Arc S # Xperia Arc S
ATTR{idProduct}=="414f", GOTO="adbfast" ATTR{idProduct}=="414f", GOTO="adbfast"
# Xperia Neo V (6156=debug,0dde=fastboot) # Xperia Neo V (6156=debug 0dde=fastboot)
ATTR{idProduct}=="6156", SYMLINK+="android_adb" ATTR{idProduct}=="6156", SYMLINK+="android_adb"
ATTR{idProduct}=="0dde", SYMLINK+="android_fastboot" ATTR{idProduct}=="0dde", SYMLINK+="android_fastboot"
# Xperia S # Xperia S
@ -805,7 +801,12 @@ LABEL="not_Sony_Ericsson"
ATTR{idVendor}=="1973", GOTO="user" ATTR{idVendor}=="1973", GOTO="user"
# Spreadtrum # Spreadtrum
ATTR{idVendor}=="1782", GOTO="user" ATTR{idVendor}=="1782", GOTO="not_Spreadtrum"
# (Unisoc) Various devices (4001=mtp 4002=mtp,adb 4003=mtp,adb)
ATTR{idProduct}=="4002", GOTO="adbmtp"
ATTR{idProduct}=="4003", GOTO="adbmtp"
GOTO="android_usb_rules_end"
LABEL="not_Spreadtrum"
# T & A Mobile Phones # T & A Mobile Phones
ATTR{idVendor}!="1bbb", GOTO="not_T_A_Mobile" ATTR{idVendor}!="1bbb", GOTO="not_T_A_Mobile"
@ -819,29 +820,29 @@ ENV{adb_user}="yes"
GOTO="android_usb_rule_match" GOTO="android_usb_rule_match"
LABEL="not_T_A_Mobile" LABEL="not_T_A_Mobile"
# Teleepoch # Teleepoch (Need product specific rules)
ATTR{idVendor}=="2340", GOTO="user" #ATTR{idVendor}=="2340", GOTO="user"
# Texas Instruments UsbBoot # Texas Instruments UsbBoot
ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", GOTO="user" ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", GOTO="user"
ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", GOTO="user" ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", GOTO="user"
# Toshiba # Toshiba (Need product specific rules)
ATTR{idVendor}=="0930", GOTO="user" #ATTR{idVendor}=="0930", GOTO="user"
# Unitech Electronics # Unitech Electronics
ATTR{idVendor}!="2e8e", GOTO="not_Unitech_Electronics" ATTR{idVendor}!="2e8e", GOTO="not_Unitech_Electronics"
# EA630 (96e1=normal,96e7=debug) # EA630 (96e1=normal 96e7=debug)
ATTR{idProduct}=="96e7", GOTO="adb" ATTR{idProduct}=="96e7", GOTO="adb"
ENV{adb_user}="yes" ENV{adb_user}="yes"
GOTO="android_usb_rule_match" GOTO="android_usb_rule_match"
LABEL="not_Unitech_Electronics" LABEL="not_Unitech_Electronics"
# Vivo # Vivo (Need product specific rules)
ATTR{idVendor}=="2d95", GOTO="user" ATTR{idVendor}=="2d95", GOTO="user"
# Wileyfox # Wileyfox (Need product specific rules)
ATTR{idVendor}=="2970", GOTO="user" #ATTR{idVendor}=="2970", GOTO="user"
# XiaoMi # XiaoMi
ATTR{idVendor}!="2717", GOTO="not_XiaoMi" ATTR{idVendor}!="2717", GOTO="not_XiaoMi"
@ -854,16 +855,13 @@ ATTR{idProduct}=="0368", SYMLINK+="android_adb"
ATTR{idProduct}=="1268", GOTO="adbmtp" ATTR{idProduct}=="1268", GOTO="adbmtp"
# RedMi / RedMi Note WCDMA (MTP+Debug) # RedMi / RedMi Note WCDMA (MTP+Debug)
ATTR{idProduct}=="1248", GOTO="adbmtp" ATTR{idProduct}=="1248", GOTO="adbmtp"
# RedMi 1S / RedMi / RedMi Note WCDMA (PTP+Debug) # RedMi 1S / RedMi / RedMi Note WCDMA (1218=ptp,adb 1228=usb,adb)
ATTR{idProduct}=="1218", GOTO="adbptp" ATTR{idProduct}=="1218", GOTO="adbptp"
# RedMi 1S /RedMi / RedMi Note WCDMA (Usb+Debug) ATTR{idProduct}=="1228", GOTO="adb"
ATTR{idProduct}=="1228", SYMLINK+="android_adb" # RedMi / RedMi Note 4G WCDMA (1311=ptp,adb 1328=usb,adb 1368=mtp,adb)
# RedMi / RedMi Note 4G WCDMA (MTP+Debug)
ATTR{idProduct}=="1368", GOTO="adbmtp"
# RedMi / RedMi Note 4G WCDMA (PTP+Debug)
ATTR{idProduct}=="1318", GOTO="adbptp" ATTR{idProduct}=="1318", GOTO="adbptp"
# RedMi / RedMi Note 4G WCDMA (Usb+Debug)
ATTR{idProduct}=="1328", GOTO="adb" ATTR{idProduct}=="1328", GOTO="adb"
ATTR{idProduct}=="1368", GOTO="adbmtp"
# 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) # 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)
ATTR{idProduct}=="9039", GOTO="adbmtp" ATTR{idProduct}=="9039", GOTO="adbmtp"
ATTR{idProduct}=="904e", GOTO="adbptp" ATTR{idProduct}=="904e", GOTO="adbptp"
@ -879,7 +877,7 @@ ATTR{idProduct}=="ff28", GOTO="adbmass"
ATTR{idProduct}=="ff40", GOTO="mtp" ATTR{idProduct}=="ff40", GOTO="mtp"
ATTR{idProduct}=="ff48", GOTO="adbmtp" ATTR{idProduct}=="ff48", GOTO="adbmtp"
ATTR{idProduct}=="ff88", GOTO="adbrndis" ATTR{idProduct}=="ff88", GOTO="adbrndis"
# RedMi / RedMi Note 4G CDMA (Usb+Debug) / Mi4c / Mi5 # RedMi / RedMi Note 4G CDMA (ff68=usb,adb) / Mi4c / Mi5
ATTR{idProduct}=="ff68", GOTO="adb" ATTR{idProduct}=="ff68", GOTO="adb"
ENV{adb_user}="yes" ENV{adb_user}="yes"
GOTO="android_usb_rule_match" GOTO="android_usb_rule_match"
@ -887,13 +885,13 @@ LABEL="not_XiaoMi"
# Yota # Yota
ATTR{idVendor}!="2916", GOTO="not_Yota" ATTR{idVendor}!="2916", GOTO="not_Yota"
# YotaPhone2 (f003=normal,9139=debug) # YotaPhone2 (f003=normal 9139=debug)
ATTR{idProduct}=="9139", GOTO="adb" ATTR{idProduct}=="9139", GOTO="adb"
ENV{adb_user}="yes" ENV{adb_user}="yes"
GOTO="android_usb_rule_match" GOTO="android_usb_rule_match"
LABEL="not_Yota" LABEL="not_Yota"
# YU # YU (Need product specific rules)
ATTR{idVendor}=="1ebf", GOTO="user" ATTR{idVendor}=="1ebf", GOTO="user"
# Zebra # Zebra
@ -913,9 +911,9 @@ ATTR{idProduct}=="0310", GOTO="adbptp"
ATTR{idProduct}=="0501", GOTO="adb" ATTR{idProduct}=="0501", GOTO="adb"
ATTR{idProduct}=="1352", GOTO="adb" ATTR{idProduct}=="1352", GOTO="adb"
ATTR{idProduct}=="1373", GOTO="adbrndis" ATTR{idProduct}=="1373", GOTO="adbrndis"
# Blade (1353=normal,1351=debug) # Blade (1351=debug 1353=normal)
ATTR{idProduct}=="1351", GOTO="adb" ATTR{idProduct}=="1351", GOTO="adb"
# Blade S (Crescent, Orange San Francisco 2) (1355=normal,1354=debug) # Blade S (Crescent, Orange San Francisco 2) (1354=debug 1355=normal)
ATTR{idProduct}=="1354", GOTO="adb" ATTR{idProduct}=="1354", GOTO="adb"
# P685M LTE modem # P685M LTE modem
ATTR{idProduct}=="1275", GOTO="user" ATTR{idProduct}=="1275", GOTO="user"
@ -945,8 +943,8 @@ ATTR{idProduct}=="ffb2", GOTO="adb"
GOTO="android_usb_rules_end" GOTO="android_usb_rules_end"
LABEL="not_ZTE" LABEL="not_ZTE"
# ZUK # ZUK (Need product specific rules)
ATTR{idVendor}=="2b4c", GOTO="user" #ATTR{idVendor}=="2b4c", GOTO="user"
# Verifone # Verifone
ATTR{idVendor}=="11ca", GOTO="user" ATTR{idVendor}=="11ca", GOTO="user"