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.