如果下面的文章不好使,建议读一这个文章:http://forum.xda-developers.com/xperia-u/general/howto-usb-connection-to-ubuntu-t1574551

以下内容有时候会导致,有的时候手机无法识别,请读上面的文章。

默认情况下 Ubuntu系统无法识别android手机。

运行 adb devices 将会出现一堆 ???号

在这种情况下你可以按照如下方法解决

1.首先查看你手机的ID号

在terminal下运行lsusb命令

再将手机连接上电脑

再次运行lsusb就会多出一个usb信息。该信息即为你手机的usb信息

Bus 002 Device 007: ID 18d1:4e21

PS:红色字体为手机的ID号,同一款手机的ID号是一样的。本人手机为(NS)

2  .创建配置文件

sudo vim /etc/udev/rules.d/XXX.rules

XXX为你自定义的文件名

输入以下 内容

SUBSYSTEM=="usb", SYSFS{"idVendor"}=="18d1", MODE="0666"

在红色字体的部分 添加上 你 自己手机的id

sudo chmod a+rx /etc/udev/rules.d/XXX.rules

sudo /etc/init.d/udev restart

3.重启adb服务(必须为sudo 已配置android环境变量)

sudo ./adb kill-server

sudo ./adb devices

给梦想一点时间
---------------------------------------------------------------------
you want MTP support on Ubuntu, try this:
  1. Connect Xperia S to an USB2 port.
  2. Use the "lsusb" command to list your devices in a terminal
    One of the lines should look like this:

    Code:
    Bus 002 Device 012: ID 0fce:5169 Sony Ericsson Mobile Communications AB
  3. Note your vendor- and product id. Usually this is "0fce" for the vendor and "5169" for the product id. If you have USB debugging disabled, product id will be "0169".
  4. unplug your phone
  5. read this thread: humans-enabled.com
    Install the newest Version of "libmtp" and copy the 69-libmtp.rules file to /etc/udev/rules.d as described
  6. Edit: This step may not be necessary for you!
    Xperia S support is implementet in the libmtp-1.1.3. release. If you use the newest version from sourceforge.net skip this and go to step 7.

    type following to edit the copied file as root:

    Code:
    sudo gedit /etc/udev/rules.d/69-libmtp.rules

    Add the following text somewhere around the sony ericsson devices that are in this file. You can find them by searching for "0fce". Remember to set the correct vendor and product id:

    Code:
    # Sony Xperia S
    ATTR{idVendor}=="0fce", ATTR{idProduct}=="5169", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
    ATTR{idVendor}=="0fce", ATTR{idProduct}=="0169", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
  7. reboot, or use
    Code:
    sudo udevadm control --reload-rules

    to actualise.

  8. Plug in your device to a USB2 port, it will mount automatically. Use nautlius to copy files around.

ubuntu下设置Android手机驱动的更多相关文章

  1. ubuntu下管理android手机

    1.安装adb apt-get install android-tools-adb 2.配置 1)运行lsusb Bus 001 Device 002: ID 8087:0024 Intel Corp ...

  2. [转]设置Android手机以使用ARM Streamline进行性能分析(一)

    本博客第一次转载的文章,原文访问不到了,这篇是从google cache里挖出来的,为有需要的同学准备.原文地址     Posted by Fang Bao,(鲍方) 4 Comments 11 J ...

  3. 【转载】菜鸟Ubuntu下安装Android Studio

    原文:http://forum.android-studio.org/forum.php?mod=viewthread&tid=236&extra=page%3D1%26filter% ...

  4. ubuntu下搭建android开发环境之超顺畅模拟器

    如果说android系统的卡,像耳边蚊子让人抓狂,那么android模拟器的卡,那就像午睡时的苍蝇.大概就是一样的恶心~~ 那么,这样的问题对于开发者肯定忍无可忍,我也一样,虽然我还没有入门,但我也一 ...

  5. Windows下修改Android手机的hosts

    Windows下修改Android手机的hosts 1.首先,手机是Root过的. 2.连接手机和电脑, adb shell 进入命令行. 3.获取root用户权限: su -root 4.不知道为何 ...

  6. 如何在Ubuntu下搭建Android NDK开发环境

    1 搭建Android SDK开发环境 参考在在Ubuntu下搭建Android SDK开发环境(图文)首先在Ubuntu下搭建Android SDK开发环境. 2 下载NDK开发包 打开官网: ht ...

  7. Ubuntu下安装nvidia显卡驱动

    layout: post title: Ubuntu下安装nvidia显卡驱动 date: 2015-10-02 17:19:06 categories: 常用命令 tags: 显卡 驱动 最近一直在 ...

  8. ubuntu下设置jupyter notebook 2017年07月29日 19:28:34 小旋锋 阅读数:8329 标签: ubuntu 更多 个人分类: python 二三事 来源:http://blog.csdn.net/suzyu12345/article/details/51037905 Ipython Notebook现在已经改名为Ipython jupyter,是最知名最好用的

    ubuntu下设置jupyter notebook     来源:http://blog.csdn.net/suzyu12345/article/details/51037905 Ipython No ...

  9. ubuntu下设置DNS服务器

    当网卡通过DHCP获取IP地址时,DHCP会根据DHCP服务器配置,自动给系统分配DNS服务器地址,此时执行 ping www.baidu.com 动作,会将百度的域名在本地转换成ip地址,然后走路由 ...

随机推荐

  1. SpringMVC配置

    博客园 闪存 首页 新随笔 联系 管理 订阅 随笔- 4  文章- 1  评论- 0  搭建springmvc框架的另一种思路 在一个完整的项目里搭建springmvc框架的时候, 通常情况下,初学者 ...

  2. Windows Server 2008 显示桌面图标

    相信有朋友们有安装使用过windows 2008 server服务器,刚安装好的时候,桌面上只有一个回收站的图标,它没有像windows 7或windows 8一样可以直接通过右击鼠标的菜单来设置,要 ...

  3. NOIP 2012 T5 借教室 [洛谷P1083]

    题目描述 在大学期间,经常需要租借教室.大到院系举办活动,小到学习小组自习讨论,都需要 向学校申请借教室.教室的大小功能不同,借教室人的身份不同,借教室的手续也不一样. 面对海量租借教室的信息,我们自 ...

  4. 获取本机IP_考虑多网卡的情况

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.D ...

  5. Android消息通知(notification)和PendingIntent传值

    通知栏的自定义布局:转:http://blog.csdn.net/vipzjyno1/article/details/25248021 拓展 实现自定义的通知栏效果: 这里要用到RemoteViews ...

  6. ModSecurity SQL注入攻击

    ModSecurity是 一个入侵探测与阻止的引擎,它主要是用于Web应用程序所以也可以叫做Web应用程序防火墙.它可以作为Apache Web服务器的一个模块或单独的应用程序来运行.ModSecur ...

  7. python之BIF函数在列表中的应用

    1 Python 3.3.4 (v3.3.4:7ff62415e426, Feb 10 2014, 18:13:51) [MSC v.1600 64 bit (AMD64)] on win32 2 T ...

  8. Jni中C++和Java的参数传递 参数对照

    Jni中C++和Java的参数传递 如何使用JNI的一些基本方法和过程在网上多如牛毛,如果你对Jni不甚了解,不知道Jni是做什么的,如何建立一个基本的jni程序,或许可以参考下面下面这些文章:利用V ...

  9. Power of Cryptography(用double的泰勒公式可行分析)

    Power of Cryptography Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onli ...

  10. js获取中国日期-农历

    /* var bsYear; var bsDate; var bsWeek; var arrLen=8; //数组长度 var sValue=0; //当年的秒数 var dayiy=0; //当年第 ...