关于adb "no serial number"的解决方案

今天华为麦芒4(LC00)售后给刷机,刷机回来连接eclipse调试一个安卓应用,直接报“no serial number”,检查自己的手机调试模式已经打开了,但是eclipse无法真正识别手机,这也导致无法用真机调试。总结网上经验:http://stackoverflow.com/questions/30691237/android-device-has-no-serial-number#

简答说下解决步骤:

$ adb usb
restarting in USB mode

$ adb devices
List of devices attached
????????????    device

$ adb tcpip 5555
restarting in TCP mode port: 5555

Now find the phone's IP address via Settings → About → Status → IP address.//找到你自己的手机IP地址  我的是192.168.1.100

$ adb connect YOUR_IP_ADDRESS
connected to YOUR_IP_ADDRESS:5555

$ adb devices
List of devices attached 
????????????    device
YOUR_IP_ADDRESS:5555 device

重新用真机调试APP,发现已经能识别真机了。

需要说明一下:命令行控制方式;手机连接电脑,如果是mac在终端中输入命令,如果是windows在cmd中输入命令。



重新补充下,我上面只是一种解决方案,一个更好的方案网上大咖已经给出,我这里说明下

错误信息:Failed to install JavaNetTest.apk on device '(no serial number)': adb rejected install command with: device '(no serial number)' not found

com.android.ddmlib.AdbCommandRejectedException: device '(no serial number)' not found

Launch canceled!

解决方案:

拨号:*#*#2846579#*#*  (华为工程指令)
ProjectMenu->后台设置->USB端口配置->Google 模式

猜你喜欢

转载自blog.csdn.net/vr_jia/article/details/70333447