在ubuntu 12.04tls android 开发 nexus s实体机测试 nexus s手机是18d1
2012-08-06 20:13
162 查看
第一步:安装eclipse ;配置jdk;配置sdk路径。安装adt。。(这些都是android开发的前提。相信你已经做好)
第二步:
Declare your application as "debuggable" in your Android Manifest.
When using Eclipse, you can skip this step, because running your app directly fromthe Eclipse IDE automatically enables debugging.
In the
相信你能看懂。。就是在manifest文件里加入debuggable=“ture”;但别忘了在发布前把这句话去掉。。
第三步: 在手机里找到开发者选项并打勾。
Turn on "USB Debugging" on your device.
On the device, go to Settings > Applications > Development and enableUSB debugging (on an Android 4.0 device, the setting is located inSettings > Developer options).
第四步:创建文件51.android.rules文件。并作修改
Log in as root and create this file:
第五步:加权限
第六步:
本文参照:开发者联盟 http://developer.android.com/tools/device.html#VendorIds
--
Persist in the end and
never give up
第二步:
Declare your application as "debuggable" in your Android Manifest.
When using Eclipse, you can skip this step, because running your app directly fromthe Eclipse IDE automatically enables debugging.
In the
AndroidManifest.xmlfile, add
android:debuggable="true"tothe
<application>element.
相信你能看懂。。就是在manifest文件里加入debuggable=“ture”;但别忘了在发布前把这句话去掉。。
第三步: 在手机里找到开发者选项并打勾。
Turn on "USB Debugging" on your device.
On the device, go to Settings > Applications > Development and enableUSB debugging (on an Android 4.0 device, the setting is located inSettings > Developer options).
第四步:创建文件51.android.rules文件。并作修改
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"
{idVendor}是生产手机的公司。我的是nexus s ,属于三星和google配出来的,三星是公,google是母的。 但是!!!生出的孩子是姓google的。。所以设备号是18d1。
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.
Company | USB Vendor ID |
---|---|
Acer | 0502 |
ASUS | 0b05 |
Dell | 413c |
Foxconn | 0489 |
Fujitsu | 04c5 |
Fujitsu Toshiba | 04c5 |
Garmin-Asus | 091e |
18d1 | |
Hisense | 109b |
HTC | 0bb4 |
Huawei | 12d1 |
K-Touch | 24e3 |
KT Tech | 2116 |
Kyocera | 0482 |
Lenovo | 17ef |
LG | 1004 |
Motorola | 22b8 |
NEC | 0409 |
Nook | 2080 |
Nvidia | 0955 |
OTGV | 2257 |
Pantech | 10a9 |
Pegatron | 1d4d |
Philips | 0471 |
PMC-Sierra | 04da |
Qualcomm | 05c6 |
SK Telesys | 1f53 |
Samsung | 04e8 |
Sharp | 04dd |
Sony | 054c |
Sony Ericsson | 0fce |
Teleepoch | 2340 |
Toshiba | 0930 |
ZTE | 19d2 |
sudo chmod a+rx /etc/udev/rules.d/51-android.rules
第六步:
打开eclipse,在eclipse中,选择window -> show view -> other...->device 然后插上手机就可以识别了。然后右键你的工程选择run as-> android application.这样你的eclipse里的android程序就可以在手机里测试了。快去试试吧。
本文参照:开发者联盟 http://developer.android.com/tools/device.html#VendorIds
--
Persist in the end and
never give up
相关文章推荐
- Ubuntu下Android如何将手机通过USB连接PC开发测试
- ubuntu 12.04(64位)下搭建android2.3/android4.0开发环境
- android 开发环境 ubuntu 12.04
- Ubuntu 12.04 搭建Android开发环境
- 实体环境中配置Android项目Ubuntu开发环境指南
- Ubuntu 12.04 搭建 Eclipse Android 开发环境
- ubuntu 12.04(64位)下搭建android2.3/android4.2/4.1/4.0开发环境
- Gstreamer学习历程(一):Ubuntu 12.04安装Gstreamer开发环境并测试
- Ubuntu 12.04(64位)上搭建android 开发环境 (ADT 、android-studio)
- ubuntu 12.04(64位)下搭建了android2.3/android4.0开发环境
- Ubuntu 12.04上搭建android 开发环境 (ADT 、android-studio)
- Ubuntu 12.04安装MySQL,JDK 7,Eclipse搭建android开发环境
- Linux(ubuntu 12.04桌面版) 搭建Android开发环境
- Ubuntu 12.04安装MySQL,JDK 7,Eclipse搭建android开发环境
- ubuntu 12.04(64位)下搭建android2.3/android4.2/4.1/4.0开发环境
- ubuntu 12.04(64位)下搭建 android2.3/android4.0开发环境
- ubuntu 12.04(64位 server)下搭建 android2.3/android4.0开发环境及遇到的编译问题
- Android开发环境,Eclipse+SDK ,For Ubuntu 12.04, 新手指南
- ubuntu 12.04(64位)下搭建android2.3/android4.2/4.1/4.0开发环境
- Ubuntu 12.04搭建Android开发环境