`
seya
  • 浏览: 355864 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

enable android deviceconnection under linux

阅读更多


开发环境搭建完毕,Eclipse,Java,ADT都已经折腾好了,但是发现手机设备在Eclipse的DDMS中被识别为“Unknow”,看来是设备未被正确识别,没办法,继续Google方法吧。


原因大概是这样的:



没安装驱动的话Ubuntu系统是不认识这不设备的


解决方法是这样的:



既然不认识,那就让他认识喽。查了下官方文档,原文在这里



不过据测试过的朋友说这方法不是很好用,于是我就又找了一个详细的方法,原文在这里 ,我稍微整理了下。



1)在如下位置建立如下文件:”/etc/udev/rules.d/51-android.rules “



2)确保手机设备已经与电脑连接,在Terminal输入lsusb,会出现手机设备的信息如

”Bus 001 Device 008: ID 0bb4:0c02 High Tech Computer Corp.“

(Drinking补充注意不同的设备不同信息 我的手机是moto )

找到该信息并找到”ID“字段信息。



3)在”51-android.rules “文件中添加如下信息

SUBSYSTEM=="usb", SYSFS{idVendor}=="设备代码", MODE="0666"
(Drinking补充 我的moto 设备代码是22b8 注意引号要用英文的 否则不能成功)



4) 运行以下命令:

sudo chmod a+rx /etc/udev/rules.d/50-android.rules
sudo /etc/init.d/udev restart



5) 在 android sdk 的 tools 目录下运行 (这一步很重要,必须要sudo,否则没效果)

(Drinking补充 adb 不在tools文件夹里的话 去platform-tools里面去执行下面的话)
sudo ./adb kill-server
sudo ./adb devices


然后,就可以直接用 adb 来进行操作了。
分享到:
评论

相关推荐

    how to enable android usb host api

    how to enable android usb host api

    fastboot 2020年 android10版本 ubuntu linux平台

    fastboot android10版本 ubuntu linux平台 fastboot version 28.0.2-PD02.200305.0422 $ fastboot -h usage: fastboot [OPTION...] COMMAND... flashing: update ZIP Flash all partitions from an update.zip ...

    Android13 wifi adb相关介绍和相关源码

    通过代码分析发现Android13 上对 网络adb 进行了限制! Android13原生代码要求:必现连接上某个...之前以为设置端口号和persist.adb.tls_server.enable 属性就ok了,但是还是有些小bug,还是要完全研究一遍具体流程。

    linux_PE_Protected_Enable

    linux_PE_Protected_Enable

    Linux enable命令用法详解

    Linux enable命令 Linux enable命令用于启动或关闭 shell 内建指令。 若要执行的文件名称与shell内建指令相同,可用enable -n来关闭shell内建指令。若不加-n参数,enable可重新启动关闭的指令。 语法enable [-n][-...

    Essential Linux Device Drivers

    Given the soaring popularity of Linux in the embedded space, it's likely that you'll use the device driver skills that you acquire from this book, to enable embedded devices. Chapter 18, "User Mode ...

    Essential Linux-DeviceDrivers

    Given the soaring popularity of Linux in the embedded space, it’s more likely that you will use the device driver skills that you acquire from this book to enable embedded systems. Chapter 19, ...

    Android 蓝牙协议栈使能enable -init流程图。将Android 源码使用流程图的形式画了出来,使Android

    Android 蓝牙协议栈使能enable -init流程图,将Android 源码使用流程图的形式画了出来,使Android 蓝牙开发者更清楚数据收发走向,代码流程更加形象生动,能够很快的熟悉Android 蓝牙源码,利于后面问题处理和BUG...

    disable/enable adb codes

    disable/enable adb codes

    arm-linux-gcc交叉编译器 3.4.1

    -with-float=soft --with-headers=/opt/crosstool/arm-linux/gcc-3.4.1-glibc-2.3.2/arm-linux/include --with-local-prefix=/opt/crosstool/arm-linux/gcc-3.4.1-glibc-2.3.2/arm-linux --disable-nls --enable-...

    Android代码-adbWireless

    adbWireless enable ADB wireless connection to connect to the phone as if connected by USB. used a method already known to enable the wireless connection through: 03-17-2010: http://goo.gl/iK77 04-10-...

    arm-linux-gcc-3.4.1(交叉编译器)

    -with-float=soft --with-headers=/opt/crosstool/arm-linux/gcc-3.4.1-glibc-2.3.2/arm-linux/include --with-local-prefix=/opt/crosstool/arm-linux/gcc-3.4.1-glibc-2.3.2/arm-linux --disable-nls --enable-...

    bluedroid enable流程

    bluedroid enable流程

    Linux FTP服务配置

     data_connection_timeout=120 设置数据传输超时时间  nopriv_user=ftpsecure 运行vsftpd需要的非特权系统用户默认是nobody  async_abor_enable=YES 是否允许运行特殊的ftp命令async ABOR.这里我翻译的不爽,...

    Android代码-uiautomator

    uiautomator This module is a Python wrapper of Android uiautomator testing framework. It works on Android 4.1 ...Enable ADB setting on device and connect your android device using usb with your PC.

    arm-2014.05-29-arm-none-linux-gnueabi-linux

    Configured with: /scratch/maciej/arm-linux-2014.05-rel/src/gcc-4.8-2014.05/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libm ...

    android 5.0 api 21 sqlite3 not found sqlite3_enable_load_extension

    2.CANNOT LINK EXECUTABLE: cannot locate symbol "sqlite3_enable_load_extension" referenced by "sqlite3" 适用于android 5.0 API 21版本,使用方法 1. 包含3个文件 sqlite3,lib sqlite_jni.so,libsqlite.so 2....

    Android代码-交通资产管理系统

    Transportation Asset System Management (TAMS) Android Application <!------>...If you will be using an Android device for testing the application, you will have to enable Developer Opti

    arm-linux-gcc-4.3.2(交叉编译器)

    -with-float=soft --with-headers=/opt/crosstool/arm-linux/gcc-3.4.1-glibc-2.3.2/arm-linux/include --with-local-prefix=/opt/crosstool/arm-linux/gcc-3.4.1-glibc-2.3.2/arm-linux --disable-nls --enable-...

    ffmpeg 资源 for android

    在Linux环境下编译的ffmpeg for android 设置 enable--freetype

Global site tag (gtag.js) - Google Analytics