Test todayProgramRun a problem on the virtual machine, so the real machine is used for testing, but it is found that it is not recognized under Ubuntu .. The call./ADB devices is shown as follows .. The result cannot be tested on a real machine.
List of devices attached
Emulator-5554 Device
???????????? No Permissions
Google Xiaomi real machine test fruitless, Google Ubuntu Android real machine test found the clue (http://www.linuxidc.com/Linux/2011-04/34131.htm), but wondered again, he listed the deviceCodeIf there is no Xiaomi mobile phone, continue to Google, and there is no result. Then you can find a solution and list the solution first:
First, run the command lsusb without connecting your phone to your computer. The result is as follows:
Alfredtofu @ alfredtofu-LAPTOP :~ /MyApp/Eclipse/android-sdk-linux_x86/platform-tools $ lsusbbus 002 device 002: Id 8087: 0024 bus 002 device 001: Id 1d6b: 0002 Linux Foundation 2.0 root hubbus 001 device 009: id 093a: 2510 pixart imaging, Inc. hama optical mousebus 001 device 004: Id 058f: B002 Alcor micro Corp. bus 001 device 002: Id 8087: 0024 bus 001 device 001: Id 1d6b: 0002 Linux Foundation 2.0 root Hub
Connect your mobile phone to your computer and run lsusb again. The result is as follows:
Alfredtofu @ alfredtofu-LAPTOP:/$ lsusbbus 002 device 005: Id 18d1: 9025 bus 002 device 002: Id 8087: 0024 bus 002 device 001: Id 1d6b: 0002 Linux Foundation 2.0 root hubbus 001 device 009: Id 093a: 2510 pixart imaging, Inc. hama optical mousebus 001 device 004: Id 058f: B002 Alcor micro Corp. bus 001 device 002: Id 8087: 0024 bus 001 device 001: Id 1d6b: 0002 Linux Foundation 2.0 root Hub
Compared with the reference website, we found that 18d1 is the device ID, and the problem is easily solved.
Sudo Vim/etc/udev/rules. d/51-android.rules
Add the following content:
Ubsystem = "USB", sysfs {idvendor} = "18d1", mode = "0666"
For the above commands, you only need to change sysfs {idvendor} = "18d1" to 18d1 in different mobile phones. As for how to find this code, we have introduced it above.
Sudo chmod A + R/etc/udev/rules. d/51-android.rules
Sudo/etc/init. d/udev restart
Sudo./ADB kill-Server
Sudo./ADB Devices
The final result is as follows:
* Daemon not running. Starting it now on port 5037 ** daemon started successfully * List of devices attached emulator-5554device00c49bd2device
So we can use a real machine for testing.