Connect to the Android phone under Ubuntu

Source: Internet
Author: User

After connecting to the G11 mobile phone through a USB cable in Ubuntu, ADB may not be able to identify the device. Follow these steps to solve the problem.

1. Enter lsusb under Terminal

The result is similar to the following:

Bus 001 device 008: Id 0bb4: 0c02 high tech Computer Corp.

 

2. Enter sudo Vim/etc/udev/rules. d/50-android.rules.

Add the following text to the open file:

Subsystem = "USB", sysfs {"high tech Computer Corp." }== "0bb4", mode = "0666"

 

3. Enter the following command in terminal:

 

Sudo chmod A + Rx/etc/udev/rules. d/50-android.rules

Sudo/etc/init. d/udev restart

 

4. Run it in the tools directory of the android SDK (this step is very important and must be sudo, otherwise it will not work)

Sudo./ADB kill-Server

Sudo./ADB Devices

 

Then you can execute commands such as ADB shell for debugging.

If you still cannot connect

VI ~ /. Android/adb_usb.ini

Add the device ID mentioned above and try again:

0x0bb4

Remember to restart Ubuntu

If you find that after you restart the system:

Run the ADB devices command in Ubuntu (9.10). The returned result is:
List of devices attached
???????????? No Permissions

This means that USB-connected devices can be identified. After Google, I learned that the ADB server needs to be started with the root permission, so I had the following command:
Brian @ Brian-LAPTOP :~ /Developer/Java/Android/android-sdk-linux_86/tools $./ADB kill-Server
Brian @ Brian-LAPTOP :~ /Developer/Java/Android/android-sdk-linux_86/tools $Sudo./ADB start-Server
* Daemon not running. Starting it now *
* Daemon started successfully *

The first command is used to kill the currently running server. The second command starts the new server with the root permission. We can view the devices again:
Brian @ Brian-LAPTOP :~ /Developer/Java/Android/android-sdk-linux_86/tools $./ADB Devices
List of devices attached
Ht848kv04386 Device

The device was correctly identified this time. Naturally, tools like ddms can also be used.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.