Ubuntu真机调试

  1. 查看真机
    bobby@bobby-master:~$ lsusb
    Bus 001 Device 002: ID 8087:8001 Intel Corp. 
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 002 Device 003: ID 04f2:b439 Chicony Electronics Co., Ltd 
    Bus 002 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
    Bus 002 Device 004: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II], GT-I9300 Phone [Galaxy S III], GT-P7500 [Galaxy Tab 10.1]
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  2. 配置.rules
    ~$ cd /etc/udev/rules.d/
    ~$ vim 50-android.rules
    #添加内容到50-android.rules
    SUBSYSTEM=="usb",SYSFS{idVendor}=="04e8",MODE="0666"
    #其中04e8就是你的lsusb的id
  3. 重启udev
    sudo /etc/init.d/udev restart
  4. 重启adb
    #配置android环境变量
    sudo ./adb kill-server
    sudo ./adb start-server
    #重新插入真机
    $ adb devices
    #over

你可能感兴趣的:(Ubuntu真机调试)