wok-current view 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 source
1 # SPDX-FileCopyrightText: 2012-2023 JoesCat, M0Rf30 and contributors
2 # SPDX-License-Identifier: GPL-3.0-or-later
4 # Latest version can be found at:
5 # <https://github.com/M0Rf30/android-udev-rules>
7 # These rules refer to:
8 # <https://developer.android.com/studio/run/device.html>
9 # and include many suggestions from Arch Linux, GitHub and other Communities.
12 # Skip testing for android devices if device is not add, or usb
13 ACTION!="add", ACTION!="bind", GOTO="android_usb_rules_end"
14 SUBSYSTEM!="usb", GOTO="android_usb_rules_end"
16 # Skip testing for unexpected devices like hubs, controllers or printers
17 ATTR{bDeviceClass}=="09", GOTO="android_usb_rules_end"
18 ENV{ID_MODEL}=="Controller", GOTO="android_usb_rules_end"
19 ENV{ID_USB_INTERFACES}=="*:0701??:*", GOTO="android_usb_rules_end"
21 # Devices listed here are connected by USB
23 # Acer
24 ATTR{idVendor}!="0502", GOTO="not_Acer"
25 # Iconia Tab A1-830
26 ATTR{idProduct}=="3604", GOTO="adbfast"
27 # Iconia Tab A210 (33cc=normal,33cb=debug)
28 ATTR{idProduct}=="33cb", GOTO="adb"
29 # Iconia Tab A500
30 ATTR{idProduct}=="3325", GOTO="adbfast"
31 # Liquid (3202=normal,3203=debug)
32 ATTR{idProduct}=="3203", GOTO="adb"
33 GOTO="android_usb_rules_end"
34 LABEL="not_Acer"
36 # Actions Semiconductor Co., Ltd
37 # Denver TAD 70111
38 ATTR{idVendor}=="10d6", ATTR{idProduct}=="0c02", GOTO="adb"
40 # ADVANCE (Need product specific rules)
41 # S5
42 ATTR{idVendor}=="0a5c", ATTR{idProduct}=="e681", GOTO="adb"
44 # Allwinner Technology
45 ATTR{idVendor}!="1f3a", GOTO="not_Allwinner"
46 # Prestigio PER3464B ebook reader (Mass storage mode)
47 ATTR{idProduct}=="1000", GOTO="adbmtp"
48 # Allwinner Technology Android device in fastboot mode
49 ATTR{idProduct}=="1010", GOTO="adbfast"
50 GOTO="android_usb_rules_end"
51 LABEL="not_Allwinner"
53 # Amazon Lab126
54 ATTR{idVendor}!="1949", GOTO="not_Amazon"
55 # Amazon Kindle Fire
56 ATTR{idProduct}=="0006", GOTO="adbfast"
57 # Amazon Kindle 8 2016 (giza) (0bb4:0c01=fastboot 0231=mtp 0232=adb,mtp 0233=ptp 0234=adb,ptp)
58 ATTR{idProduct}=="0232", GOTO="adbmtp"
59 ATTR{idProduct}=="0234", GOTO="adbptp"
60 # 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)
61 ATTR{idProduct}=="05e0", GOTO="adbfast"
62 ATTR{idProduct}=="05e2", GOTO="adbmtp"
63 ATTR{idProduct}=="05e4", GOTO="adbptp"
64 ATTR{idProduct}=="05e8", GOTO="adb"
65 ATTR{idProduct}=="2048", GOTO="adbmidi"
66 # Amazon Fire TV Stick Lite (3rd gen)
67 ATTR{idProduct}=="03a8", GOTO="adbfast"
68 # Amazon Fire 7 (mustang)
69 ATTR{idProduct}=="03c8", GOTO="adbfast"
70 ATTR{idProduct}=="03cb", GOTO="adbfast"
71 # Amazon Fire HD 8 2018 (karnak)
72 ATTR{idProduct}=="0338", GOTO="adbfast"
73 ATTR{idProduct}=="033b", GOTO="adbfast"
74 # 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)
75 ATTR{idProduct}=="0582", GOTO="adbmtp"
76 ATTR{idProduct}=="0584", GOTO="adbptp"
77 ATTR{idProduct}=="0588", GOTO="adb"
78 ATTR{idProduct}=="2048", GOTO="adbmidi"
79 # Amazon Fire HD 8 2022 (raphite)
80 ATTR{idProduct}=="0658", GOTO="adbfast"
81 # Amazon Fire HD 10 2023 (tungsten)
82 ATTR{idProduct}=="06f8", GOTO="adbfast"
83 GOTO="android_usb_rules_end"
84 LABEL="not_Amazon"
86 # Archos
87 ATTR{idVendor}!="0e79", GOTO="not_Archos"
88 # 43
89 ATTR{idProduct}=="1417", GOTO="adbfast"
90 # 79 Xenon
91 ATTR{idProduct}=="303e", GOTO="adbfast"
92 # 101
93 ATTR{idProduct}=="1411", GOTO="adbfast"
94 # 101 xs
95 ATTR{idProduct}=="1549", GOTO="adbfast"
96 GOTO="android_usb_rules_end"
97 LABEL="not_Archos"
99 # Ascom
100 ATTR{idVendor}!="1768", GOTO="not_Ascom"
101 ATTR{idProduct}=="0007", GOTO="adb"
102 ATTR{idProduct}=="000e", GOTO="adb"
103 ATTR{idProduct}=="4ee7", GOTO="adb"
104 ATTR{idProduct}=="0013", GOTO="adb"
105 ATTR{idProduct}=="0011", GOTO="adb"
106 GOTO="android_usb_rules_end"
107 LABEL="not_Ascom"
109 # ASUSTeK
110 ATTR{idVendor}!="0b05", GOTO="not_Asus"
111 # False positive - accessory
112 ATTR{idProduct}=="1???", GOTO="android_usb_rules_end"
113 # 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)
114 # Zenfone GO (ZB500KL) (7772=mtp 7773=mtp,adb 7774=rndis 7775=rndis,adb 7776=ptp 7777=ptp,adb)
115 ATTR{idProduct}=="7770", GOTO="adb"
116 ATTR{idProduct}=="7771", GOTO="adbfast"
117 ATTR{idProduct}=="7773", GOTO="adbmtp"
118 ATTR{idProduct}=="7775", ENV{adb_adbmass}="yes", GOTO="adbrndis"
119 ATTR{idProduct}=="7777", GOTO="adbptp"
120 ATTR{idProduct}=="5F03", GOTO="adbmtp"
121 ATTR{idProduct}=="5F07", GOTO="adbptp"
122 ATTR{idProduct}=="5F05", ENV{adb_adbmass}="yes", GOTO="adbrndis"
123 # Zenphone 4 (581f=mtp,adb 583f=rndis,adb)
124 ATTR{idProduct}=="581f", GOTO="adbmtp"
125 ATTR{idProduct}=="583f", GOTO="adbrndis"
126 # TF300 (4c80=mtp 4c81=mtp,adb)
127 # TF700 (4c90=mtp 4c91=mtp,adb)
128 # Zenphone 5 (4c90=normal 4c91=debug 4daf=Fastboot 7780=mtp 7781=mtp,adb)
129 # TF701T (4ca0=mtp, 4ca1=mtp,adb)
130 # ME302KL (4cc0=mtp, 4cc1=mtp,adb)
131 # ME301T (4cd0=mtp, 4cd1=mtp,adb)
132 # Fonepad 6 (4ce0=mtp, 4ce1=mtp,adb)
133 ATTR{idProduct}=="4c81", GOTO="adbmtp"
134 ATTR{idProduct}=="4c91", GOTO="adbmtp"
135 ATTR{idProduct}=="4ca1", GOTO="adbmtp"
136 ATTR{idProduct}=="4cc1", GOTO="adbmtp"
137 ATTR{idProduct}=="4cd1", GOTO="adbmtp"
138 ATTR{idProduct}=="4ce1", GOTO="adbmtp"
139 ATTR{idProduct}=="4daf", GOTO="adbfast"
140 ATTR{idProduct}=="7781", GOTO="adbmtp"
141 # SL101 (4e00=mtp, 4e01=mtp,adb)
142 # TF101 (4e0f=mtp, 4e1f=mtp,adb)
143 ATTR{idProduct}=="4e1f", GOTO="adbmtp"
144 # Tegra APX
145 ATTR{idProduct}=="7030", GOTO="adb"
146 GOTO="android_usb_rules_end"
147 LABEL="not_Asus"
149 # BQ
150 ATTR{idVendor}!="2a47", GOTO="not_BQ"
151 # Aquaris 4.5, Krillin (0c02=mtp,adb 2008=mtp)
152 ATTR{idProduct}=="0c02", GOTO="adbmtp"
153 GOTO="android_usb_rules_end"
154 LABEL="not_BQ"
156 # Castles
157 ATTR{idVendor}!="0ca6", GOTO="not_Castles"
158 # Saturn1000-E
159 ATTR{idProduct}=="a051", GOTO="user"
160 GOTO="android_usb_rules_end"
161 LABEL="not_Castles"
163 # Dell (Need product specific rules)
164 #ATTR{idVendor}=="413c", ENV{adb_user}="yes"
166 # Essential
167 ATTR{idVendor}!="2e17", GOTO="not_Essential"
168 # Essential PH-1
169 ATTR{idProduct}=="c009", GOTO="adb"
170 ATTR{idProduct}=="c03[02]", GOTO="adb"
171 GOTO="android_usb_rules_end"
172 LABEL="not_Essential"
174 # Fairphone 1 (see Hisense 109b)
175 # 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
176 ATTR{idVendor}!="2ae5", GOTO="not_Fairphone2"
177 ATTR{idProduct}=="9015", GOTO="adb"
178 ATTR{idProduct}=="9024", GOTO="adbrndis"
179 ATTR{idProduct}=="9039", GOTO="adbmtp"
180 ATTR{idProduct}=="904e", GOTO="adbptp"
181 ATTR{idProduct}=="90bb", GOTO="adbmidi"
182 ATTR{idProduct}=="90dc", GOTO="adb"
183 GOTO="android_usb_rules_end"
184 LABEL="not_Fairphone2"
186 # Foxconn
187 # Commtiva Z71, Geeksphone One
188 ATTR{idVendor}=="0489", ATTR{idProduct}=="c001", GOTO="adb"
190 # Fujitsu/Fujitsu Toshiba (Need product specific rules)
191 #ATTR{idVendor}=="04c5", GOTO="user"
193 # Fuzhou Rockchip Electronics
194 # Mediacom Smartpad 715i
195 ATTR{idVendor}!="2207", GOTO="not_Fuzhou"
196 ATTR{idProduct}=="0000", GOTO="adb"
197 # Ubislate 7Ci
198 ATTR{idProduct}=="0010", GOTO="adb"
199 # Anbernic RG353P - AOSP12beta#1 (0003=rndis 0006=adb,chg 0007=mtp 0008=ptp 0013=adb,rndis 0017=adb,mtp 0018=adb,ptp)
200 ATTR{idProduct}=="0006", GOTO="adb"
201 ATTR{idProduct}=="0013", GOTO="adbrndis"
202 ATTR{idProduct}=="0017", GOTO="adbmtp"
203 ATTR{idProduct}=="0018", GOTO="adbptp"
204 GOTO="android_usb_rules_end"
205 LABEL="not_Fuzhou"
207 # Fibocom
208 ATTR{idVendor}!="2cb7", GOTO="not_Fibocom"
209 # FG180_NA
210 ATTR{idProduct}=="010b", GOTO="adbcdc"
211 GOTO="android_usb_rules_end"
212 LABEL="not_Fibocom"
214 # Garmin-Asus (Need product specific rules)
215 #ATTR{idVendor}=="091e", GOTO="user"
217 # Google
218 ATTR{idVendor}!="18d1", GOTO="not_Google"
219 # 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)
220 # See https://android.googlesource.com/device/google/wahoo/+/master/usb/UsbGadget.cpp
221 # OnePlus 6 (4ee1=charging 4ee2=mtp,adb 4ee6=ptp,adb 4ee7=charging,adb)
222 # Onda V972 (0001=mass_storage 0006=mtp 0007=ptp 0008=camera)
223 # Pico i.MX7 Dual Development Board 4ee7=debug
224 # PinePhone (v1.2) (4ee0=fast 4ee1=mtp 4ee2=mtp,adb 4ee3=rndis 4ee4=rndis,adb 4ee5=ptp 4ee6=ptp,adb 4ee7=adb)
225 # Yandex Phone 4ee7=debug
226 # Fairphone3 (4ee1=mtp)
227 # Motorola G3 (2d02=audio 2d03=audio,adb 4ee8=midi 4ee9=midi,adb)
228 ATTR{idProduct}=="4ee0", GOTO="adbfast"
229 ATTR{idProduct}=="4ee2", GOTO="adbmtp"
230 ATTR{idProduct}=="4ee4", GOTO="adbrndis"
231 ATTR{idProduct}=="4ee6", GOTO="adbptp"
232 ATTR{idProduct}=="4ee7", GOTO="adb"
233 ATTR{idProduct}=="4ee8", GOTO="midi"
234 ATTR{idProduct}=="4ee9", GOTO="adbmidi"
236 # Tensor Pixel phones (Pixel 7/7 pro/6/6A/6 Pro) 4eeb=cdc-ncm; 4eec=cdc-ncm,adb
237 ATTR{idProduct}=="4eec", GOTO="adbcdc"
238 ATTR{idProduct}=="4ee0", GOTO="adbfast"
240 # Tensor Pixel phones (Pixel 7/7 pro/6/6A/6 Pro) 4eed=uvc; 4eee=uvc,adb
241 ATTR{idProduct}=="4eed", GOTO="uvc"
242 ATTR{idProduct}=="4eee", GOTO="adbuvc"
244 # Pixel Watch 2 (4ee0=fastboot 4e11=adb)
245 ATTR{idProduct}=="4e11", GOTO="adb"
247 # Pixel C Tablet (5202=mtp 5203=mtp,adb)
248 ATTR{idProduct}=="5201", GOTO="adbfast"
249 ATTR{idProduct}=="5203", GOTO="adbmtp"
250 ATTR{idProduct}=="5208", GOTO="adb"
252 # Android Open Accessory device (2d00=accessory 2d01=accessory,adb 2d02=audio 2d03=audio,adb 2d04=accessory,audio 2d05=accessory,audio,adb)
253 ATTR{idProduct}=="2d00", GOTO="adb"
254 ATTR{idProduct}=="2d01", GOTO="adb"
255 ATTR{idProduct}=="2d03", GOTO="adbaud"
256 ATTR{idProduct}=="2d04", GOTO="adbaud"
257 ATTR{idProduct}=="2d05", GOTO="adbaud"
258 # Nexus 7 (4e40=fastboot 4e41=mtp 4e42=mtp,adb 4e43=ptp) Nexus 7 2012 (4e44=ptp)
259 ATTR{idProduct}=="4e40", GOTO="adbfast"
260 ATTR{idProduct}=="4e42", GOTO="adbmtp"
261 # Nexus S (4e20=fastboot 4e21=? 4e22=mass_storage,adb 4e24=rndis,adb)
262 # See https://android.googlesource.com/device/samsung/crespo/+/android-4.1.2_r2.1/init.herring.usb.rc
263 ATTR{idProduct}=="4e20", GOTO="adbfast"
264 ATTR{idProduct}=="4e22", GOTO="adbmass"
265 ATTR{idProduct}=="4e24", GOTO="adbrndis"
266 ATTR{idProduct}=="4e20", GOTO="adbfast"
267 # Galaxy Nexus, Galaxy Nexus (GSM) (4e30=fastboot)
268 ATTR{idProduct}=="4e30", GOTO="adbfast"
269 # Nexus One (4e11=normal 4e12=mtp,adb 4e13=tether 0fff=debug)
270 ATTR{idProduct}=="4e12", GOTO="adbmtp"
271 ATTR{idProduct}=="0fff", GOTO="adbfast"
272 # Xiaomi MiPhone Mi1/Mi1S (9024=ndis,adb 9025=mass_storage,adb 9026=mass storage f00e=ndis)
273 ATTR{idProduct}=="9024", GOTO="adb"
274 ATTR{idProduct}=="9025", GOTO="adbmass"
275 # Generic and unspecified debug interface (test after d00?)
276 # examples: Xiaomi Mi/Redmi 2, Anbernic RG353P
277 # Xiaomi Mi2 (d00d=bootloader d002=charger), LG-V20 (d00d=bootloader)
278 ATTR{idProduct}=="d00d", GOTO="adbfast"
279 # Nexus 4 (d001=fastboot d002=debug)
280 ATTR{idProduct}=="d001", GOTO="adbfast"
281 ATTR{idProduct}=="d002", GOTO="adb"
282 # LG G2x (d109=mtp d10a=mtp,adb)
283 ATTR{idProduct}=="d10a", GOTO="adbmtp"
285 # Other vendors that also used duplicated Google's idVendor code follows:
286 # IDEA XDS-1078 (debug=2c11)
287 ATTR{idProduct}=="2c11", GOTO="adb"
288 # Hisense U8G Smart TV (MTK MT5895)
289 ATTR{idProduct}=="0d02", GOTO="adbfast"
290 GOTO="android_usb_rules_end"
291 LABEL="not_Google"
293 # Haier (Need product specific rules)
294 #ATTR{idVendor}=="201e", GOTO="user"
296 # Hisense (includes Fairphone 1) (Need product specific rules)
297 #ATTR{idVendor}=="109b", GOTO="user"
299 # Honeywell/Foxconn
300 ATTR{idVendor}!="0c2e", GOTO="not_Honeywell"
301 # D70e
302 ATTR{idProduct}=="0ba3", GOTO="adb"
303 GOTO="android_usb_rules_end"
304 LABEL="not_Honeywell"
306 # HTC
307 ATTR{idVendor}!="0bb4", GOTO="not_HTC"
308 # Android phone (0fff=fastboot 0001=mass_storage)
309 ATTR{idProduct}=="0001", GOTO="mass"
310 ATTR{idProduct}=="0fff", GOTO="adbfast"
311 # ADP1, Dream, G1, HD2, Magic, Tattoo (0c01=mass_storage, 0c02=mass_storage,adb)
312 # Desire/desire HD/Hero (0ce5=debug 0fb4=rndis 0ff8=tether 0ff9=charge,mass_storage 0ffc=sync_manager 0ffe=modem)
313 # NOTE: Amazon Kindle 8 2016 (giza) (fastboot=0bb4:0c01 conflicts with mass storage=0c01)
314 ATTR{idProduct}=="0c01", GOTO="mass"
315 ATTR{idProduct}=="0c02", GOTO="adbmass"
316 ATTR{idProduct}=="0ce5", GOTO="adb"
317 ATTR{idProduct}=="0ff9", GOTO="mass"
318 # ChaCha
319 ATTR{idProduct}=="0cb2", GOTO="adbfast"
320 # Desire (Bravo) (0c87=debug 0c99=debug)
321 ATTR{idProduct}=="0c87", GOTO="adb"
322 ATTR{idProduct}=="0c99", GOTO="adb"
323 # Desire HD (0ca2=debug 0ff8=tether 0ff9=charge 0ffe=modem)
324 ATTR{idProduct}=="0ca2", GOTO="adb"
325 # Desire S (Saga), Desire HD, Hero, Thunderbolt (0cab=syncmode 0ff9=charge)
326 ATTR{idProduct}=="0cab", SYMLINK+="android_adb"
327 # Desire Z
328 ATTR{idProduct}=="0c91", GOTO="adbfast"
329 # Evo Shift 4G (0c8d=debug 0ca5=?)
330 ATTR{idProduct}=="0c8d", GOTO="adb"
331 ATTR{idProduct}=="0ca5", SYMLINK+="android_adb"
332 # Hero (GSM), Desire
333 ATTR{idProduct}=="0c99", SYMLINK+="android_adb"
334 # Hero (CDMA)
335 ATTR{idProduct}=="0c9a", SYMLINK+="android_adb"
336 # Incredible
337 ATTR{idProduct}=="0c9e", SYMLINK+="android_adb"
338 # Incredible rev 0002
339 ATTR{idProduct}=="0c8d", SYMLINK+="android_adb"
340 # MyTouch 4G
341 ATTR{idProduct}=="0c96", SYMLINK+="android_adb"
342 # One (m7) && One (m8)
343 ATTR{idProduct}=="0c93", SYMLINK+="android_adb"
344 # Sensation, One (0f87=mtp,?,adb)
345 ATTR{idProduct}=="0f87", GOTO="adbmtp"
346 ATTR{idProduct}=="0ff0", SYMLINK+="android_fastboot"
347 # One X
348 ATTR{idProduct}=="0cd6", SYMLINK+="android_adb"
349 # Slide
350 ATTR{idProduct}=="0e03", SYMLINK+="android_adb"
351 # Vision
352 ATTR{idProduct}=="0c91", SYMLINK+="android_adb"
353 # Wildfire
354 ATTR{idProduct}=="0c8b", GOTO="adbfast"
355 # Wildfire S
356 ATTR{idProduct}=="0c86", GOTO="adbfast"
357 # Zopo ZP900, Fairphone 1
358 ATTR{idProduct}=="0c03", GOTO="adbfast"
359 # Zopo C2, Android phone via MTP [MT65xx] (2008=mtp)
360 ATTR{idProduct}=="2008", GOTO="mtp"
361 # Android phone via PTP [Wiko Cink Peax 2] (200b=ptp)
362 ATTR{idProduct}=="200b", GOTO="ptp"
363 # Desire 510 (05fd=mtp,adb)
364 ATTR{idProduct}=="05fd", GOTO="adbmtp"
365 # Droid DNA (0dff=mtp,ums,adb 0ebd=mtp,ums)
366 ATTR{idProduct}=="0dff", GOTO="adbmtp"
367 ATTR{idProduct}=="0ebd", GOTO="mtp"
368 # Droid Incredible 4G LTE (0e31=mtp 0e32=mtp,adb)
369 ATTR{idProduct}=="0e31", GOTO="mtp"
370 ATTR{idProduct}=="0e32", GOTO="adbmtp"
371 # One (0dea=mtp,ums,adb 0f87=mtp,?,adb 0f5f=mtp,cdc,adb 0f60=mtp,cdc 0f63=mtp,adb 0f64=mtp)
372 ATTR{idProduct}=="0dea", GOTO="adbmtp"
373 ATTR{idProduct}=="0f87", GOTO="adbmtp"
374 ATTR{idProduct}=="0f5f", ENV{adb_adbcdc}="yes", GOTO="adbmtp"
375 ATTR{idProduct}=="0f60", ENV{adb_cdc}="yes", GOTO="mtp"
376 ATTR{idProduct}=="0f63", GOTO="adbmtp"
377 ATTR{idProduct}=="0f64", GOTO="mtp"
378 # One M8 Google Play Edition (060b=mtp,adb)
379 ATTR{idProduct}=="060b", GOTO="adbmtp"
380 # One M8 (061a=mtp,adb 0f25=mtp 0fb4=mtp,ums,adb 0fb5=mtp,ums)
381 ATTR{idProduct}=="061a", GOTO="adbmtp"
382 ATTR{idProduct}=="0f25", GOTO="mtp"
383 ATTR{idProduct}=="0fb4", GOTO="adbmtp"
384 ATTR{idProduct}=="0fb5", GOTO="mtp"
385 # HP Touchpad (685c=mtp 6860=mtp,adb)
386 ATTR{idProduct}=="6860", GOTO="adbmtp"
387 ENV{adb_user}="yes"
388 GOTO="android_usb_rule_match"
389 LABEL="not_HTC"
391 # Huawei
392 ATTR{idVendor}!="12d1", GOTO="not_Huawei"
393 # IDEOS (1037=? 1038=debug 1039=tether)
394 ATTR{idProduct}=="1038", GOTO="adbfast"
395 # U8850 Vision
396 ATTR{idProduct}=="1021", GOTO="adbfast"
397 # HiKey (1050=usbnet 1057=adb)
398 ATTR{idProduct}=="1050", SYMLINK+="android_adb"
399 ATTR{idProduct}=="1057", GOTO="adb"
400 # Honor 6
401 ATTR{idProduct}=="103a", SYMLINK+="android_adb"
402 ATTR{idProduct}=="1051", GOTO="mtp"
403 # MediaPad M2-A01L
404 ATTR{idProduct}=="1052", GOTO="mtp"
405 # P7-L10 (1052=?mtp 1053=ptp 1054=ptp,adb)
406 ATTR{idProduct}=="1054", GOTO="adbptp"
407 # MediaPad T3
408 ATTR{idProduct}=="107d", SYMLINK+="android_adb"
409 # P10 Lite
410 ATTR{idProduct}=="107e", SYMLINK+="android_adb"
411 # Watch
412 ATTR{idProduct}=="1c2c", GOTO="adb"
413 # Mate 9
414 ATTR{idProduct}=="107e", SYMLINK+="android_adb"
415 GOTO="android_usb_rules_end"
416 LABEL="not_Huawei"
418 # Intel
419 ATTR{idVendor}!="8087", GOTO="not_Intel"
420 # Geeksphone Revolution
421 ATTR{idProduct}=="0a16", GOTO="adb"
422 # Chuwi Hi 10 Pro (HQ64)
423 ATTR{idProduct}=="2a65", GOTO="adb"
424 ATTR{idProduct}=="07ef", GOTO="adb"
425 # Asus ZenFone 2 (ADB Sideload in TWRP Recovery)
426 ATTR{idProduct}=="0a5d", GOTO="adb"
427 # ASUS MeMo Pad 7 ME176C/CX (DNX/Rescue mode)
428 ATTR{idProduct}=="0a65", GOTO="adbfast"
429 # Reference Boards using kernelflinger
430 # See https://github.com/intel/kernelflinger/blob/master/libefiusb/usb.c#L56
431 ATTR{idProduct}=="09ef", GOTO="adbfast"
432 GOTO="android_usb_rules_end"
433 LABEL="not_Intel"
435 # IUNI
436 ATTR{idVendor}!="271d", GOTO="not_IUNI"
437 # Gionee (3f11=mass,adb)
438 ATTR{idProduct}=="3f11", GOTO="adbmass"
439 # U3
440 ATTR{idProduct}=="bf39", GOTO="adb"
441 GOTO="android_usb_rules_end"
442 LABEL="not_IUNI"
444 # K-Touch (Need product specific rules)
445 #ATTR{idVendor}=="24e3", GOTO="user"
447 # KT Tech (Need product specific rules)
448 #ATTR{idVendor}=="2116", GOTO="user"
450 # Kyocera (Need product specific rules)
451 #ATTR{idVendor}=="0482", ENV{adb_user}="yes"
453 # Lenovo
454 ATTR{idVendor}!="17ef", GOTO="not_Lenovo"
455 # Lenovo Tab K10
456 ATTR{idProduct}=="201c", GOTO="adb"
457 GOTO="android_usb_rules_end"
458 LABEL="not_Lenovo"
460 # LeTv (LeECo)
461 ATTR{idVendor}!="2b0e", GOTO="not_letv"
462 # LEX720 LeEco Pro3 6GB (610c=normal,610d=debug, 610b=camera)
463 ATTR{idProduct}=="610d", GOTO="adbfast"
464 ENV{adb_user}="yes"
465 GOTO="android_usb_rule_match"
466 LABEL="not_letv"
468 # LG
469 ATTR{idVendor}!="1004", GOTO="not_LG"
470 # Ally, Vortex, P500, P500h (61c5=charge 618e=debug 618f=mass_storage)
471 ATTR{idProduct}=="618e", GOTO="adb"
472 ATTR{idProduct}=="618f", GOTO="mass"
473 # G2 D802 (61f1=LG software mode)
474 ATTR{idProduct}=="61f1", SYMLINK+="android_adb"
475 # G2 D803
476 ATTR{idProduct}=="618c", SYMLINK+="android_adb"
477 # G2 D803 rogers (631f=charge)
478 ATTR{idProduct}=="631f", SYMLINK+="android_adb"
479 # G3 (VS985), Android Phone (627f=mtp)
480 ATTR{idProduct}=="627f", GOTO="mtp"
481 # LM-X420xxx/G2/Optimus (6300=charge 631c=charge 631d=ptp 631e=ptp 633e=mtp 6344=tether 6348=midi 6356=CDrom)
482 # LG-V20 (62ce=mtp,cdc 633a=adp,cdc 18d1:d00d=fastboot)
483 ATTR{idProduct}=="631c", GOTO="adb"
484 ATTR{idProduct}=="631d", GOTO="ptp"
485 ATTR{idProduct}=="631e", GOTO="ptp"
486 ATTR{idProduct}=="633a", GOTO="adbcdc"
487 ATTR{idProduct}=="633e", GOTO="mtp"
488 ATTR{idProduct}=="6344", GOTO="rndis"
489 ATTR{idProduct}=="6348", GOTO="midi"
490 # Optimus LTE (61f9=mtp 61fe=tether)
491 ATTR{idProduct}=="6315", SYMLINK+="android_adb"
492 ATTR{idProduct}=="61f9", GOTO="mtp"
493 # Swift GT540
494 ATTR{idProduct}=="61b4", SYMLINK+="android_adb"
495 # P500 CM10
496 ATTR{idProduct}=="61a6", SYMLINK+="android_adb"
497 # L90 D410, Various (6300=charge)
498 ATTR{idProduct}=="6300", SYMLINK+="android_adb"
499 ENV{adb_user}="yes"
500 GOTO="android_usb_rule_match"
501 LABEL="not_LG"
503 # Meizu
504 ATTR{idVendor}!="2a45", GOTO="not_Meizu"
505 # M1E
506 ATTR{idProduct}=="0c01", GOTO="adb"
507 # MX6
508 ATTR{idProduct}=="0c02", GOTO="adb"
509 # M6T (untested; See <https://github.com/M0Rf30/android-udev-rules/issues/262>
510 ATTR{idProduct}=="201c", GOTO="adb"
511 GOTO="android_usb_rules_end"
512 LABEL="not_Meizu"
514 # Micromax
515 ATTR{idVendor}!="2a96", GOTO="not_Micromax"
516 # P702
517 ATTR{idProduct}=="201d", GOTO="adbfast"
518 GOTO="android_usb_rules_end"
519 LABEL="not_Micromax"
521 # Microsoft
522 ATTR{idVendor}!="045e", GOTO="not_Microsoft"
523 # Surface Duo
524 ATTR{idProduct}=="0c26", GOTO="adbfast"
525 # False positive xbox controllers 028e, 02ea, 0719
526 ATTR{idProduct}=="02??", GOTO="android_usb_rules_end"
527 ATTR{idProduct}=="07??", GOTO="android_usb_rules_end"
528 ENV{adb_user}="yes"
529 GOTO="android_usb_rule_match"
530 LABEL="not_Microsoft"
532 # Motorola
533 ATTR{idVendor}!="22b8", GOTO="not_Motorola"
534 # CLIQ XT/Quench
535 ATTR{idProduct}=="2d66", SYMLINK+="android_adb"
536 # Defy/MB525
537 ATTR{idProduct}=="428c", SYMLINK+="android_adb"
538 # Droid
539 ATTR{idProduct}=="41db", SYMLINK+="android_adb"
540 # Razr XT912
541 ATTR{idProduct}=="4362", GOTO="adbfast"
542 # Droid Turbo 2
543 ATTR{idProduct}=="2ea4", GOTO="adbfast"
544 # Atrix/Razr HD (2e32=mtp 2e33=mtp,adb)
545 # Razr M (2e50=mtp 2e51=mtp,adb)
546 # Moto G3 (2e76=mtp,adb 2e81=charge,adb 2e82=mtp 2e83=ptp 2e84=ptp,adb 2e24=rndis 2e25=rndis,adb)
547 # Moto E/G dual sim (2e76=mtp,adb 2e80=fast 2e81=recovery 2e82=mtp 2e83=ptp 2e84=ptp,adb 2e24=rndis 2e25=rndis,adb)
548 # Moto Z3 Play, beckham, XT1929
549 # For details see: <https://github.com/M0Rf30/android-udev-rules/issues/264>
550 # 18d1:4ee8=midi; 18d1:4ee9=midi+adb
551 # 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
552 # 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
553 ATTR{idProduct}=="2e24", GOTO="rndis"
554 ATTR{idProduct}=="2e25", GOTO="adbrndis"
555 ATTR{idProduct}=="2e33", GOTO="adbmtp"
556 ATTR{idProduct}=="2e51", GOTO="adbmtp"
557 ATTR{idProduct}=="2e76", GOTO="adbmtp"
558 ATTR{idProduct}=="2e80", GOTO="adbfast"
559 ATTR{idProduct}=="2e81", GOTO="adb"
560 ATTR{idProduct}=="2e84", GOTO="adbptp"
561 ATTR{idProduct}=="2eb7", GOTO="mass"
562 # 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)
563 ATTR{idProduct}=="70a9", GOTO="adbmtp"
564 ATTR{idProduct}=="70ae", GOTO="rndis"
565 ATTR{idProduct}=="70af", GOTO="adbrndis"
566 ATTR{idProduct}=="70b1", GOTO="adbcdc"
567 ATTR{idProduct}=="70b3", GOTO="adbrndis"
568 ATTR{idProduct}=="70b5", GOTO="adbptp"
569 # XT890/907/Razr (710d=mtp 710e=mtp,adb 710f=mass)
570 ATTR{idProduct}=="710e", GOTO="adbmtp"
571 GOTO="android_usb_rules_end"
572 LABEL="not_Motorola"
574 # MTK (MediaTek Inc)
575 ATTR{idVendor}!="0e8d", GOTO="not_MTK"
576 # Umidigi F1 (201c=adbfast)
577 # MT65xx/67xx (2000=cdc 2008=mtp 200a=mtp,cdc,adb 2012=mtp,cdc 201d=mtp,adb)
578 # Moto E22i (2005=rndis,adb 200c=ptp,adb 2048=midi,adb 201c=adb 201d=mtp,adb)
579 ATTR{idProduct}=="2005", GOTO="adbrndis"
580 ATTR{idProduct}=="200a", ENV{adb_adbcdc}="yes", GOTO="adbmtp"
581 ATTR{idProduct}=="200c", GOTO="adbptp"
582 ATTR{idProduct}=="2048", GOTO="adbmidi"
583 ATTR{idProduct}=="201c", GOTO="adb"
584 ATTR{idProduct}=="201d", GOTO="adbmtp"
585 GOTO="android_usb_rules_end"
586 LABEL="not_MTK"
588 # NEC LifeTouch Note (0300=? 0301=debug)
589 ATTR{idVendor}=="0409", ATTR{idProduct}=="0300", GOTO="user"
591 # Nextbit (Need product specific rules)
592 #ATTR{idVendor}=="2c3f", GOTO="user"
594 # Nintendo
595 ATTR{idVendor}!="057e", GOTO="not_Nintendo"
596 # Switch
597 ATTR{idProduct}=="2000", GOTO="adb"
598 GOTO="android_usb_rules_end"
599 LABEL="not_Nintendo"
601 # Nokia X (Need product specific rules)
602 #ATTR{idVendor}=="0421", GOTO="user"
604 # Nokia 3 (Need product specific rules)
605 #ATTR{idVendor}=="2e04", GOTO="user"
607 # Nook (Barnes & Noble) (Need product specific rules)
608 ATTR{idVendor}!="2080", GOTO="not_Nook"
609 # Glowlight 3
610 ATTR{idProduct}=="000b", GOTO="adb"
611 GOTO="android_usb_rules_end"
612 LABEL="not_Nook"
614 # Nvidia
615 ATTR{idVendor}!="0955", GOTO="not_Nvidia"
616 # Audi SDIS Rear Seat Entertainment Tablet
617 # Folio
618 ATTR{idProduct}=="7000", SYMLINK+="android_fastboot"
619 ATTR{idProduct}=="7100", GOTO="user"
620 # SHIELD Tablet (cf05=mtp,adb cf06= cf07=mtp cf08= cf09=)
621 ATTR{idProduct}=="cf05", GOTO="adbmtp"
622 ATTR{idProduct}=="cf09", GOTO="adb"
623 # Shield TV (b42a=mtp)
624 ATTR{idProduct}=="b442", SYMLINK+="android_fastboot"
625 ENV{adb_user}="yes"
626 GOTO="android_usb_rule_match"
627 LABEL="not_Nvidia"
629 # Oculus
630 ATTR{idVendor}!="2833", GOTO="not_Oculus"
631 # Oculus Go
632 ATTR{idProduct}=="0083", GOTO="user"
633 # Oculus Quest
634 ATTR{idProduct}=="0183", GOTO="user"
635 # Oculus Quest 2, Quest 3
636 ATTR{idProduct}=="0186", GOTO="user"
637 GOTO="android_usb_rules_end"
638 LABEL="not_Oculus"
640 # Pico XR
641 ATTR{idVendor}!="2d40", GOTO="not_Pico"
642 # Pico 4
643 ATTR{idProduct}=="00b7", GOTO="user"
644 GOTO="android_usb_rules_end"
645 LABEL="not_Pico"
647 # OnePlus(Oreo)
648 ATTR{idVendor}!="2a70", GOTO="not_OnePlus"
649 # Oneplus 3T/5T/6 (4ee7=charge,adb)
650 # OnePlus 6, 4ee1=charging, 4ee2=MTP+debug, 4ee6=PTP+debug, 4ee7=charging+debug
651 ATTR{idProduct}=="4ee2", GOTO="adbmtp"
652 ATTR{idProduct}=="4ee6", GOTO="adbptp"
653 ATTR{idProduct}=="4ee7", GOTO="adb"
654 # OnePlus 6T
655 ATTR{idProduct}=="d001", GOTO="adb"
656 # OnePlus Nord N10 4G USB tethering mode
657 ATTR{idProduct}=="9024", GOTO="adb"
658 # OnePlus 3T with Oreo MIDI mode 90bb=midi,adb 9011=mtp 904d=ptp 904e=ptp,adb
659 # OnePlus 7T (9012=mtp,adb)
660 ATTR{idProduct}=="9011", GOTO="mtp"
661 ATTR{idProduct}=="9012", GOTO="adbmtp"
662 ATTR{idProduct}=="904d", GOTO="ptp"
663 ATTR{idProduct}=="904e", GOTO="adbptp"
664 ATTR{idProduct}=="90bb", GOTO="adbmidi"
665 GOTO="android_usb_rules_end"
666 LABEL="not_OnePlus"
668 # Oppo
669 ATTR{idVendor}!="22d9", GOTO="not_Oppo"
670 # Find 5 (2767=debug)
671 ATTR{idProduct}=="2767", GOTO="adb"
672 # Realme 8, OnePlus 9 Pro, Watch=adb
673 ATTR{idProduct}=="2769", GOTO="adb"
674 ATTR{idProduct}=="2764", GOTO="mtp"
675 # Oppo Watch, fastboot
676 ATTR{idProduct}=="2024", GOTO="user"
677 # RMX3231 - Realme C11 20221, normal, rndis, mtp
678 ATTR{idProduct}=="200e", GOTO="user"
679 ATTR{idProduct}=="2028", GOTO="user"
680 ATTR{idProduct}=="2026", GOTO="user"
681 # OnePlus 7a (2774=mass,adb)
682 # OnePlus 7T (2765=adb,mtp 2766=rndis,adb)
683 # OnePlus 8T (2771=adb,ptp 2772=adb,mtp)
684 ATTR{idProduct}=="2765", GOTO="adbmtp"
685 ATTR{idProduct}=="2766", GOTO="adbrndis"
686 ATTR{idProduct}=="2771", GOTO="adbptp"
687 ATTR{idProduct}=="2772", GOTO="adbmtp"
688 ATTR{idProduct}=="2774", GOTO="adbmass"
689 GOTO="android_usb_rules_end"
690 LABEL="not_Oppo"
692 # OTGV (Need product specific rules)
693 #ATTR{idVendor}=="2257", GOTO="user"
695 # Pantech (SK Teletech Co, Ltd.) (Need product specific rules)
696 #ATTR{idVendor}=="10a9", GOTO="user"
698 # Parrot SA (Car HUD)
699 ATTR{idVendor}=="19cf", ATTR{idProduct}=="0001", GOTO="user"
701 # Pegatron Chagall (5035=adb)
702 ATTR{idVendor}=="1d4d", ATTR{idProduct}=="5035", GOTO="adb"
704 # Philips (and NXP) (Need product specific rules)
705 #ATTR{idVendor}=="0471", GOTO="user"
707 # Pico (Need product specific rules)
708 #ATTR{idVendor}=="2d40", GOTO="user"
710 # PMC-Sierra, (Panasonic Mobile communications, Matsushita) (Need product specific rules)
711 #ATTR{idVendor}=="04da", GOTO="user"
713 # Point Mobile
714 ATTR{idVendor}!="2a48", GOTO="not_Point_Mobile"
715 # PM90
716 ATTR{idProduct}=="5101", GOTO="user"
717 GOTO="android_usb_rules_end"
718 LABEL="not_Point_Mobile"
720 # Polar
721 ATTR{idVendor}!="0da4", GOTO="not_Polar"
722 ENV{adb_user}="yes"
723 # Polar M600 (0010=adb 000b=fastboot)
724 ATTR{idProduct}=="0010", GOTO="adb"
725 ATTR{idProduct}=="000b", GOTO="adbfast"
726 GOTO="android_usb_rules_end"
727 LABEL="not_Polar"
729 # Qualcomm (Wearners also 05c6)
730 ATTR{idVendor}!="05c6", GOTO="not_Qualcomm"
731 # Geeksphone Zero
732 ATTR{idProduct}=="9025", SYMLINK+="android_adb"
733 # OnePlus One (6765=mtp,adb 6764=mtp)
734 ATTR{idProduct}=="6765", GOTO="adbmtp"
735 # OnePlus Two
736 ATTR{idProduct}=="9011", SYMLINK+="android_adb"
737 # OnePlus 3
738 ATTR{idProduct}=="900e", SYMLINK+="android_adb"
739 # OnePlus 3T
740 ATTR{idProduct}=="676c", SYMLINK+="android_adb"
741 # Snapdragon, OnePlus 3T w/ Oreo MIDI mode (9011=mtp 90bb=midi,adb 904e=ptp)
742 # Xiaomi A1 (90bb=midi,adb)
743 ATTR{idProduct}=="90bb", GOTO="adbmidi"
744 ATTR{idProduct}=="90dc", GOTO="adb"
745 # OnePlus 5 / 6 / 6T
746 ATTR{idProduct}=="9011", SYMLINK+="android_adb"
747 # OnePlus 6 / Asia
748 ATTR{idProduct}=="f003", SYMLINK+="android_adb"
749 # Yongnuo YN450m (identified in lsusb as Intex Aqua Fish & Jolla C Diagnostic Mode)
750 ATTR{idProduct}=="9091", GOTO="adb"
751 # Wileyfox Swift 2 Plus
752 ATTR{idProduct}=="0001", GOTO="user"
753 ENV{adb_user}="yes"
754 GOTO="android_usb_rule_match"
755 LABEL="not_Qualcomm"
757 # Quectel
758 ATTR{idVendor}!="2c7c", GOTO="not_Quectel"
759 # EC25
760 ATTR{idProduct}=="0125", GOTO="adb"
761 GOTO="android_usb_rules_end"
762 LABEL="not_Quectel"
764 # Razer USA, Ltd.
765 ATTR{idVendor}!="1532", GOTO="not_Razer"
766 # Razer Phone 2
767 ATTR{idProduct}=="9050", GOTO="adbfast"
768 ATTR{idProduct}=="9051", GOTO="adb"
769 GOTO="android_usb_rules_end"
770 LABEL="not_Razer"
772 # Research In Motion, Ltd.
773 ATTR{idVendor}!="0fca", GOTO="not_RIM"
774 # BlackBerry DTEK60
775 ATTR{idProduct}=="8042", GOTO="adbfast"
776 GOTO="android_usb_rules_end"
777 LABEL="not_RIM"
779 # Samsung
780 ATTR{idVendor}!="04e8", GOTO="not_Samsung"
781 # False positive printer and other devices
782 ATTR{idProduct}!="6???", GOTO="android_usb_rules_end"
783 # Galaxy i5700
784 ATTR{idProduct}=="681c", GOTO="adbfast"
785 # Galaxy i5800 (681c=debug 6601=fastboot 68a0=mediaplayer)
786 ATTR{idProduct}=="681c", SYMLINK+="android_adb"
787 ATTR{idProduct}=="6601", SYMLINK+="android_fastboot"
788 ATTR{idProduct}=="68a9", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
789 # Galaxy i7500
790 ATTR{idProduct}=="6640", GOTO="adbfast"
791 # Galaxy i9000 S, i9300 S3
792 ATTR{idProduct}=="6601", SYMLINK+="android_adb"
793 ATTR{idProduct}=="685d", MODE="0660"
794 ATTR{idProduct}=="68c3", MODE="0660"
795 # Galaxy Ace (S5830) "Cooper"
796 ATTR{idProduct}=="689e", GOTO="adbfast"
797 # Galaxy Tab
798 ATTR{idProduct}=="6877", GOTO="adbfast"
799 # Galaxy Nexus (GSM) (6860=mtp,adb 6864=rndis,adb 6866=ptp,adb)
800 # Galaxy Core ([6860=mtp+6860=mtp,adb] 6863=tether 6864=tether,adb 6865=ptp 6866=ptp,adb)
801 # Galaxy A5 ([6860=mtp+6860=mtp,adb] 6863=rndis 6864=rndis,adb 6865=ptp 6866=ptp,adb 686c=midi 686c=midi,adb)
802 ATTR{idProduct}=="6860", SYMLINK+="android_adb", GOTO="mtp"
803 ATTR{idProduct}=="6864", GOTO="adbrndis"
804 ATTR{idProduct}=="6866", GOTO="adbptp"
805 ATTR{idProduct}=="686c", GOTO="adbmidi"
806 # Galaxy Core, Tab 10.1, i9100 S2, i9300 S3, N5100 Note (8.0), Galaxy S3 SHW-M440S 3G (Korea only)
807 ATTR{idProduct}=="685e", GOTO="adbfast"
808 # Galaxy A5, S4 GT-I9500 (seems to be universally used for this purpose)
809 ATTR{idProduct}=="685d", GOTO="odin"
810 ENV{adb_user}="yes"
811 GOTO="android_usb_rule_match"
812 LABEL="not_Samsung"
814 # Sharp (Need product specific rules)
815 #ATTR{idVendor}=="04dd", GOTO="user"
817 # SHIFT GmbH
818 ATTR{idVendor}!="3360", GOTO="not_shift"
819 # SHIFT5me
820 ATTR{idProduct}=="201c", GOTO="adb"
821 GOTO="android_usb_rules_end"
822 LABEL="not_shift"
824 # SK Telesys
825 ATTR{idVendor}=="1f53", GOTO="user"
827 # Sonim
828 ATTR{idVendor}=="1d9c", GOTO="user"
830 # Sony
831 ATTR{idVendor}!="054c", GOTO="not_Sony"
832 # (Need product specific rules)
833 GOTO="android_usb_rules_end"
834 # False positives dualshock 0268,05c4,05c5, adapters 0ba0, bluetooth 09cc, 0ce6, VR 09af
835 ATTR{idProduct}=="02??", GOTO="android_usb_rules_end"
836 ATTR{idProduct}=="05??", GOTO="android_usb_rules_end"
837 ATTR{idProduct}=="09??", GOTO="android_usb_rules_end"
838 ATTR{idProduct}=="0b??", GOTO="android_usb_rules_end"
839 ATTR{idProduct}=="0c??", GOTO="android_usb_rules_end"
840 ENV{adb_user}="yes"
841 GOTO="android_usb_rule_match"
842 LABEL="not_Sony"
844 # Sony Ericsson
845 ATTR{idVendor}!="0fce", GOTO="not_Sony_Ericsson"
846 # Xperia X10 mini (3137=mass_storage)
847 ATTR{idProduct}=="2137", SYMLINK+="android_adb"
848 # Xperia X10 mini pro (3138=mass_storage)
849 ATTR{idProduct}=="2138", SYMLINK+="android_adb"
850 # Xperia X8 (3149=mass_storage)
851 ATTR{idProduct}=="2149", SYMLINK+="android_adb"
852 # Xperia X12 (e14f=mass_storage)
853 ATTR{idProduct}=="614f", SYMLINK+="android_adb"
854 # Xperia Arc S
855 ATTR{idProduct}=="414f", GOTO="adbfast"
856 # Xperia Neo V (6156=debug 0dde=fastboot)
857 ATTR{idProduct}=="6156", SYMLINK+="android_adb"
858 ATTR{idProduct}=="0dde", SYMLINK+="android_fastboot"
859 # Xperia S
860 ATTR{idProduct}=="5169", GOTO="adbfast"
861 # Xperia SP
862 ATTR{idProduct}=="6195", GOTO="adbfast"
863 # Xperia L
864 ATTR{idProduct}=="5192", GOTO="adbfast"
865 # Xperia Mini Pro
866 ATTR{idProduct}=="0166", GOTO="adbfast"
867 # Xperia V
868 ATTR{idProduct}=="0186", GOTO="adbfast"
869 # Xperia Acro S
870 ATTR{idProduct}=="5176", GOTO="adbfast"
871 # Xperia Z1 Compact
872 ATTR{idProduct}=="51a7", GOTO="adbfast"
873 # Xperia Z2
874 ATTR{idProduct}=="51ba", GOTO="adbfast"
875 # Xperia Z3
876 ATTR{idProduct}=="01af", GOTO="adbfast"
877 # Xperia Z3 Compact
878 ATTR{idProduct}=="01bb", GOTO="adbfast"
879 # Xperia Z3+ Dual
880 ATTR{idProduct}=="51c9", GOTO="adbfast"
881 # Xperia XZ
882 ATTR{idProduct}=="51e7", GOTO="adbfast"
883 # Xperia XZ1 Compact
884 ATTR{idProduct}=="01f4", GOTO="adbfast"
885 # Xperia XZ2 Compact
886 ATTR{idProduct}=="b00b", GOTO="adbfast"
887 # Xperia 5 II
888 ATTR{idProduct}=="020d", GOTO="adbfast"
889 # Xperia Z Ultra
890 ATTR{idProduct}=="519c", GOTO="adbfast"
891 # Xperia Play
892 ATTR{idProduct}=="615d", GOTO="adbfast"
893 ENV{adb_user}="yes"
894 GOTO="android_usb_rule_match"
895 LABEL="not_Sony_Ericsson"
897 # Spectralink
898 ATTR{idVendor}=="1973", GOTO="user"
900 # Spreadtrum
901 ATTR{idVendor}!="1782", GOTO="not_Spreadtrum"
902 # (Unisoc) Various devices (4001=mtp 4002=mtp,adb 4003=mtp,adb)
903 ATTR{idProduct}=="4002", GOTO="adbmtp"
904 ATTR{idProduct}=="4003", GOTO="adbmtp"
905 GOTO="android_usb_rules_end"
906 LABEL="not_Spreadtrum"
908 # T & A Mobile Phones
909 ATTR{idVendor}!="1bbb", GOTO="not_T_A_Mobile"
910 # Alcatel 1 2019 5033F
911 ATTR{idProduct}=="0c01", GOTO="adb"
912 # Alcatel OT991D
913 ATTR{idProduct}=="00f2", GOTO="adb"
914 # Alcatel OT6012A
915 ATTR{idProduct}=="0167", GOTO="adb"
916 # Alcatel 5024L
917 ATTR{idProduct}=="4ee7", GOTO="adb"
918 ENV{adb_user}="yes"
919 GOTO="android_usb_rule_match"
920 LABEL="not_T_A_Mobile"
922 # Teleepoch (Need product specific rules)
923 #ATTR{idVendor}=="2340", GOTO="user"
925 # Texas Instruments UsbBoot
926 ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", GOTO="user"
927 ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", GOTO="user"
929 # Toshiba (Need product specific rules)
930 #ATTR{idVendor}=="0930", GOTO="user"
932 # Unitech Electronics
933 ATTR{idVendor}!="2e8e", GOTO="not_Unitech_Electronics"
934 # EA630 (96e1=normal 96e7=debug)
935 ATTR{idProduct}=="96e7", GOTO="adb"
936 ENV{adb_user}="yes"
937 GOTO="android_usb_rule_match"
938 LABEL="not_Unitech_Electronics"
940 # Vivo (Need product specific rules)
941 ATTR{idVendor}=="2d95", GOTO="user"
943 # Wileyfox KAZAM Tornado 348 (0c03=mass,adb)
944 ATTR{idVendor}=="2970", ATTR{idProduct}=="0c03", GOTO="adb"
946 # XiaoMi
947 ATTR{idVendor}!="2717", GOTO="not_XiaoMi"
948 # Mi3
949 ATTR{idProduct}=="0368", GOTO="adbmtp"
950 # RedMi 1S WCDMA (MTP+Debug)
951 ATTR{idProduct}=="1268", GOTO="adbmtp"
952 # RedMi 1S / RedMi / RedMi Note WCDMA (1210=ptp 1218=ptp,adb 1220=CDrom 1228=usb,adb 1240=mtp 1248=mtp,adb)
953 ATTR{idProduct}=="1218", GOTO="adbptp"
954 ATTR{idProduct}=="1228", GOTO="adb"
955 ATTR{idProduct}=="1248", GOTO="adbmtp"
956 # RedMi / RedMi Note 4G WCDMA (1311=ptp,adb 1328=usb,adb 1368=mtp,adb)
957 ATTR{idProduct}=="1318", GOTO="adbptp"
958 ATTR{idProduct}=="1328", GOTO="adb"
959 ATTR{idProduct}=="1368", GOTO="adbmtp"
960 # 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)
961 # Mi2A / Mi2S (9039=mtp,adb, 904e=adb,ptp)
962 ATTR{idProduct}=="9039", GOTO="adbmtp"
963 ATTR{idProduct}=="904e", GOTO="adbptp"
964 ATTR{idProduct}=="9015", GOTO="adbmass"
965 ATTR{idProduct}=="9024", GOTO="adb"
966 ATTR{idProduct}=="803e", GOTO="adb"
967 # Redmi Note 3 (ff08=adb)
968 # Mi/Redmi (ff10=ptp ff18=ptp,adb ff40=mtp ff48=mtp,adb ff80=rndis ff88=rndis,adb)
969 # Mi Mix / A1 (ff18=ptp,adb ff28=storage,adb ff48=mtp,adb ff88=rndis,adb)
970 ATTR{idProduct}=="ff08", GOTO="adb"
971 ATTR{idProduct}=="ff18", GOTO="adbptp"
972 ATTR{idProduct}=="ff28", GOTO="adbmass"
973 ATTR{idProduct}=="ff40", GOTO="mtp"
974 ATTR{idProduct}=="ff48", GOTO="adbmtp"
975 ATTR{idProduct}=="ff88", GOTO="adbrndis"
976 # RedMi / RedMi Note 4G CDMA (ff68=usb,adb) / Mi4c / Mi5
977 ATTR{idProduct}=="ff68", GOTO="adb"
978 GOTO="android_usb_rules_end"
979 LABEL="not_XiaoMi"
981 # Yota
982 ATTR{idVendor}!="2916", GOTO="not_Yota"
983 # YotaPhone2 (f003=normal 9139=debug)
984 ATTR{idProduct}=="9139", GOTO="adb"
985 ENV{adb_user}="yes"
986 GOTO="android_usb_rule_match"
987 LABEL="not_Yota"
989 # YU (Need product specific rules)
990 ATTR{idVendor}=="1ebf", GOTO="user"
992 # Zebra
993 ATTR{idVendor}!="05e0", GOTO="not_Zebra"
994 # TC55
995 ATTR{idProduct}=="2101", GOTO="adb"
996 # TC72
997 ATTR{idProduct}=="2106", GOTO="adb"
998 # TC78
999 ATTR{idProduct}=="2107", GOTO="adb"
1000 GOTO="android_usb_rules_end"
1001 LABEL="not_Zebra"
1003 # ZTE
1004 ATTR{idVendor}!="19d2", GOTO="not_ZTE"
1005 # ZTE Blade A5 2020 (0306=mtp,adb 0310=ptp,adb 0501=cdrom,adb 1352=charging,adb 1373=rndis,adb)
1006 ATTR{idProduct}=="0306", GOTO="adbmtp"
1007 ATTR{idProduct}=="0310", GOTO="adbptp"
1008 ATTR{idProduct}=="0501", GOTO="adb"
1009 ATTR{idProduct}=="1352", GOTO="adb"
1010 ATTR{idProduct}=="1373", GOTO="adbrndis"
1011 # Blade (1351=debug 1353=normal)
1012 ATTR{idProduct}=="1351", GOTO="adb"
1013 # Blade S (Crescent, Orange San Francisco 2) (1354=debug 1355=normal)
1014 ATTR{idProduct}=="1354", GOTO="adb"
1015 # P685M LTE modem
1016 ATTR{idProduct}=="1275", GOTO="user"
1017 # MF286[A] internal LTE modem
1018 ATTR{idProduct}=="1432", GOTO="user"
1019 # MF286D internal LTE modem
1020 ATTR{idProduct}=="1485", GOTO="user"
1021 # MF286R internal LTE modem
1022 ATTR{idProduct}=="1489", GOTO="user"
1023 # Nubia / RedMagic Series (NX***)
1024 # 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
1025 # (... ffc0=diag,mass_storage,adb ffc1=adb ffcb=rndis,adb ffcd=mass_storage,adb ffcf=mtp,adb ffd1=ptp,adb)
1026 ATTR{idProduct}=="ffc0", GOTO="adbmass"
1027 ATTR{idProduct}=="ffc1", GOTO="adb"
1028 ATTR{idProduct}=="ffcb", GOTO="adbrndis"
1029 ATTR{idProduct}=="ffcd", GOTO="adbmass"
1030 ATTR{idProduct}=="ffcf", GOTO="adbmtp"
1031 ATTR{idProduct}=="ffd1", GOTO="adbptp"
1032 # modem,service,nema,adb
1033 ATTR{idProduct}=="ffc9", GOTO="adb"
1034 # modem,service,nema,mass_storage,adb
1035 ATTR{idProduct}=="ffc7", GOTO="adb"
1036 # diag,modem,mass_storage,adb
1037 ATTR{idProduct}=="ffb0", GOTO="adb"
1038 # diag,modem,service,mass_storage,adb
1039 ATTR{idProduct}=="ffb2", GOTO="adb"
1040 GOTO="android_usb_rules_end"
1041 LABEL="not_ZTE"
1043 # ZUK (Need product specific rules)
1044 #ATTR{idVendor}=="2b4c", GOTO="user"
1046 # Verifone
1047 ATTR{idVendor}=="11ca", GOTO="user"
1049 # No android devices found
1050 GOTO="android_usb_rules_end"
1052 # ADB Debug User (default)
1053 LABEL="adb", ENV{adb_adb}="yes", GOTO="android_usb_rule_match"
1055 # ADB Debug and Audio Source
1056 LABEL="adbaud", ENV{adb_adb}="yes", GOTO="android_usb_rule_match"
1058 # ADB Debug and AT-commands CDC Serial
1059 LABEL="adbcdc", ENV{adb_adbcdc}="yes", GOTO="android_usb_rule_match"
1061 # ADB Debug and USB Video Class
1062 LABEL="adbuvc", ENV{adb_adbuvc}="yes"
1063 LABEL="uvc", ENV{adb_uvc}="yes", GOTO="android_usb_rule_match"
1065 # ADB Debug and Fastboot mode
1066 LABEL="adbfast", ENV{adb_adbfast}="yes", GOTO="android_usb_rule_match"
1068 # ADB Debug and mass storage (note: generally android_ver<4.3; Moto Z3 Play when powered off)
1069 LABEL="adbmass", ENV{adb_adbmass}="yes"
1070 LABEL="mass", ENV{adb_mass}="yes", GOTO="android_usb_rule_match"
1072 # ADB Debug and MIDI mode (also check to see /dev/midi%n)
1073 LABEL="adbmidi", ENV{adb_adbmidi}="yes"
1074 LABEL="midi", ENV{adb_user}="yes", GOTO="android_usb_rule_match"
1076 # ADB Debug and MTP mode
1077 LABEL="adbmtp", ENV{adb_adbmtp}="yes"
1078 LABEL="mtp", ENV{adb_mtp}="yes", GOTO="android_usb_rule_match"
1080 # ADB Debug and PTP mode
1081 LABEL="adbptp", ENV{adb_adbptp}="yes"
1082 LABEL="ptp", ENV{adb_ptp}="yes", GOTO="android_usb_rule_match"
1084 # ADB Debug and Tether mode
1085 LABEL="adbrndis", ENV{adb_adb}="yes"
1086 LABEL="rndis", ENV{adb_user}="yes", GOTO="android_usb_rule_match"
1088 # Odin (Samsung-specific flashing protocol, add user SYMLINK)
1089 LABEL="odin"
1091 # Add "android" SYMLINK
1092 LABEL="user", ENV{adb_user}="yes"
1094 # Symlink common code to reduce steps above
1095 LABEL="android_usb_rule_match"
1096 ENV{adb_adbcdc}=="yes", ENV{adb_adb}="yes", SYMLINK+="android_cdc", SYMLINK+="android_cdc%n"
1097 ENV{adb_adbfast}=="yes", ENV{adb_adb}="yes", ENV{adb_fast}="yes"
1098 ENV{adb_adbmass}=="yes", ENV{adb_mass}="yes"
1099 ENV{adb_adbmtp}=="yes", ENV{adb_adb}="yes", ENV{adb_mtp}="yes"
1100 ENV{adb_adbptp}=="yes", ENV{adb_adb}="yes", ENV{adb_ptp}="yes"
1101 ENV{adb_adbmidi}=="yes", ENV{adb_adb}="yes", SYMLINK+="android_midi", SYMLINK+="android_midi0%n"
1102 ENV{adb_adbuvc}=="yes", ENV{adb_adb}="yes", ENV{adb_uvc}="yes"
1103 ENV{adb_adb}=="yes", ENV{adb_user}="yes", SYMLINK+="android_adb"
1104 ENV{adb_fast}=="yes", SYMLINK+="android_fastboot"
1105 ENV{adb_mass}=="yes", ENV{adb_mtp}="yes"
1106 ENV{adb_ptp}=="yes", ENV{adb_user}="yes", ATTR{bDeviceClass}=="00|02|06|ef|ff", ENV{adb_mtp}="yes"
1107 ENV{adb_mtp}=="yes", ENV{adb_user}="yes", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
1109 # Enable device as a user device if found (add an "android" SYMLINK)
1110 ENV{adb_user}=="yes", MODE="0660", GROUP="adbusers", TAG+="uaccess", SYMLINK+="android", SYMLINK+="android%n"
1112 # Devices listed here {begin...end} are connected by USB
1113 LABEL="android_usb_rules_end"