“adb install” returns error: protocol fault (no st

2020-03-26 05:52发布

问题:

I have created and ran a couple of android emulators, now I'd like to install application on them. Here is the story of me trying it a couple of times:

$ adb -s emulator-5562 install xxx.apk 
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: protocol fault (no status)
- waiting for device -
^C
$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
emulator-5554   device
emulator-5556   device
emulator-5558   device
emulator-5560   device
emulator-5562   device
$ adb -s emulator-5562 install xxx.apk 
error: protocol fault (no status)
- waiting for device -
^C
$ killall adb
$ killall adb
adb: no process found
$ adb -s emulator-5562 install xxx.apk 
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
3748 KB/s (766384 bytes in 0.199s)
    pkg: /data/local/tmp/xxx.apk <- sometime it reaches upto here but it stays there for ever
^C

can you please help me what else I can do to check the problem? thank you

回答1:

“adb install” returns error: protocol fault (no status) :

Solution is

Goto \platform-tools using Terminal and execute below commands

set ADB_TRACE=1
adb start-server

To remove emulator from list of ADB Devices :

Open "Android Virtual Device Manager" -> Select the Emulator which you want to delete -> click on Delete button.

See below Image



回答2:

For me it turned out to be an outdated ADB service (outdated Platform-tools).
It still could be an outdated driver, but since the drivers aren't updated most of the time, make sure you've installed the latest version of your Android SDK Platform-tools via the SDK Manager:

I also read that the problem could appear, when you install the Android Studio. Then you have to disable the ADB integration via "Tools -> Android" (uncheck). After that, restart you adb server by using adb kill-serveror simply restart your computer.



回答3:

I ran into it because there was more than one ADB device connected.

Disconnecting all but the device I was working with worked for me.



标签: android adb avd