Ubuntu配置adb

通配。

安装adb后

添加文件/etc/udev/rules/51-android.rules

sudo chmod 755 /etc/udev/rules/51-android.rules

sudo /etc/init.d/udev restart

adb kill-server

adb start-server

# These rules refer: https://developer.android.com/studio/run/device.html
# and include many suggestions from Arch Linux, GitHub and other Communities.
# Latest version can be found at: https://github.com/M0Rf30/android-udev-rules
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# Skip testing for android devices if device is not add, or usb
ACTION!="add", GOTO="android_usb_rules_end"
SUBSYSTEM!="usb", GOTO="android_usb_rules_end"

# For Android devices that enable this universal rule suggested here:
# http://ktnr74.blogspot.com/2013/04/universal-udev-rule-for-all-android.html
# Commented as a reminder (we prefer a punctual device detection)
# ENV{ID_USB_INTERFACES}=="*:ff420?:*", SYMLINK+="android/$env{ID_SERIAL_SHORT}", GOTO="android_usb_rule_match"

# Skip testing for unexpected devices like hubs or printers
ATTR{bDeviceClass}=="09", GOTO="android_usb_rules_end"
ENV{ID_USB_INTERFACES}=="*:0701??:*", ENV{adb_adb}="yes", GOTO="android_usb_rules_end"

LABEL="android_usb_rules_begin"
# Devices listed here in android_usb_rules_{begin...end} are connected by USB
#	Acer
ATTR{idVendor}!="0502", GOTO="not_Acer"
#		Iconia Tab A1-830
ATTR{idProduct}=="3604", ENV{adb_adbfast}="yes"
#		Iconia Tab A500
ATTR{idProduct}=="3325", ENV{adb_adbfast}="yes"
#		Liquid (3202=normal,3203=debug)
ATTR{idProduct}=="3203", ENV{adb_user}="yes"
GOTO="android_usb_rule_match"
LABEL="not_Acer"

#	Actions Semiconductor Co., Ltd
#		Denver TAD 70111
ATTR{idVendor}=="10d6", ATTR{idProduct}=="0c02", ENV{adb_adb}="yes"

#	ADVANCE (Need product specific rules)
#		S5
ATTR{idVendor}=="0a5c", ATTR{idProduct}=="e681", ENV{adb_adb}="yes"

#	Amazon Lab126
#		Amazon Kindle Fire
ATTR{idVendor}=="1949", ATTR{idProduct}=="0006", ENV{adb_adbfast}="yes"

#	Archos
ATTR{idVendor}!="0e79", GOTO="not_Archos"
#		43
ATTR{idProduct}=="1417", ENV{adb_adbfast}="yes"
#		101
ATTR{idProduct}=="1411", ENV{adb_adbfast}="yes"
#		101 xs
ATTR{idProduct}=="1549", ENV{adb_adbfast}="yes"
GOTO="android_usb_rule_match"
LABEL="not_Archos"

#	ASUSTeK
ATTR{idVendor}!="0b05", GOTO="not_Asus"
#		False positive - accessory
ATTR{idProduct}=="1???", GOTO="android_usb_rules_end"
ENV{adb_user}="yes"
#		Zenphone 2 (ZE500CL) (7770=adb 7773=mtp,adb 7777=ptp,adb  7775=rndis,adb,mass_storage 5F03=mtp,adb,pclink,mass_storage 5F07=ptp,adb,pclink 5F05=rndis,adb,pclink,mass_storage
ATTR{idProduct}=="7770", SYMLINK+="android_adb"
ATTR{idProduct}=="7773", SYMLINK+="android_adb"
ATTR{idProduct}=="7777", SYMLINK+="android_adb"
ATTR{idProduct}=="7775", SYMLINK+="android_adb"
ATTR{idProduct}=="5F03", SYMLINK+="android_adb"
ATTR{idProduct}=="5F07", SYMLINK+="android_adb"
ATTR{idProduct}=="5F05", SYMLINK+="android_adb"
#		Zenphone 4 (581f=mtp,adb 583f=rndis,adb)
ATTR{idProduct}=="581f", SYMLINK+="android_adb"
ATTR{idProduct}=="583f", SYMLINK+="android_adb"
#		Zenphone 5 (4c90=normal,4c91=debug,4daf=Fastboot)
ATTR{idProduct}=="4c91", SYMLINK+="android_adb"
ATTR{idProduct}=="4daf", SYMLINK+="android_fastboot"
#		Tegra APX
ATTR{idProduct}=="7030", SYMLINK+="android_adb"
GOTO="android_usb_rule_match"
LABEL="not_Asus"

#	Azpen Onda
ATTR{idVendor}=="1f3a", ENV{adb_user}="yes"

#	BQ
ATTR{idVendor}!="2a47", GOTO="not_BQ"
#		Aquaris 4.5
ATTR{idProduct}=="0c02", ENV{adb_adbfast}="yes"
ATTR{idProduct}=="2008", ENV{adb_adbfast}="yes"
GOTO="android_usb_rule_match"
LABEL="not_BQ"

#	Castles
ATTR{idVendor}!="0ca6", GOTO="not_Castles"
#		Saturn1000-E
ATTR{idProduct}=="a051", ENV{adb_user}="yes"
GOTO="android_usb_rule_match"
LABEL="not_Castles"

#	Dell (Need product specific rules)
#ATTR{idVendor}=="413c", ENV{adb_user}="yes"

#	Essential
ATTR{idVendor}!="2e17", GOTO="not_Essential"
#		Essential PH-1
ATTR{idProduct}=="c009", ENV{adb_adb}="yes"
ATTR{idProduct}=="c03[02]", ENV{adb_adb}="yes"
GOTO="android_usb_rule_match"
LABEL="not_Essential"

#	Fairphone 2
ATTR{idVendor}
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值