Ubuntu下 Android真机调试

首先非常不错到视频:

http://www.tudou.com/programs/view/ldKvE3BW7Lw/

上面到研究透即可。

配合的指令:  adb kill-server    adb devices

sudo service udev restart

lsusb


相关的官网参考: http://developer.android.com/guide/developing/device.html

  • If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of deviceyou want to use for development. In the rules file, each device manufactureris identified by a unique vendor ID, as specified by theATTR{idVendor} property. For a list of vendor IDs, see USB Vendor IDs, below. To set up device detection onUbuntu Linux:
    1. Log in as root and create this file: /etc/udev/rules.d/51-android.rules.

      Use this format to add each vendor to the file:
      SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"

      In this example, the vendor ID is for HTC. The MODEassignment specifies read/write permissions, andGROUP defineswhich Unix group owns the device node.

      Note: The rule syntaxmay vary slightly depending on your environment. Consult theudevdocumentation for your system as needed. For an overview of rule syntax, seethis guide towriting udevrules.

    2. Now execute:
      chmod a+r /etc/udev/rules.d/51-android.rules
  • 以上a,b两个步骤完成后,拔出手机USB后重新插入即可。

You can verify that your device is connected by executing adbdevices from your SDKplatform-tools/ directory. If connected,you'll see the device name listed as a "device."

If using Eclipse, run or debug your application as usual. You will bepresented with aDevice Chooser dialog that lists the availableemulator(s) and connected device(s). Select the device upon which you want toinstall and run the application.

If using the AndroidDebug Bridge (adb), you can issue commands with the -d flag totarget your connected device.

USB Vendor IDs

This table provides a reference to the vendor IDs needed in order to add USBdevice support on Linux. The USB Vendor ID is the value given to theATTR{idVendor} property in the rules file, as described above.

CompanyUSB Vendor ID
Acer0502
ASUS0B05
Dell413C
Foxconn0489
Garmin-Asus091E
Google18D1
HTC0BB4
Huawei12D1
K-Touch24E3
KT Tech2116
Kyocera0482
Lenevo17EF
LG1004
Motorola22B8
NEC0409
Nook2080
Nvidia0955
OTGV2257
Pantech10A9
Pegatron1D4D
Philips0471
PMC-Sierra04DA
Qualcomm05C6
SK Telesys1F53
Samsung04E8
Sharp04DD
Sony Ericsson0FCE
Toshiba0930
ZTE19D2


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值