3

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

rahman
  • 4,820
  • 16
  • 52
  • 86
  • Hey try with `\platform-tools>set ADB_TRACE=1` then ` \platform-tools>adb start-server` commnads – Pankaj Kumar Sep 05 '13 at 05:46
  • @PankajKumar by `\platform-tools>set ADB_TRACE=1` did you mean `set` is another special sdk command ? I guess not. anyway, no, it didn't help – rahman Sep 05 '13 at 05:57
  • are you able to get the `adb shell` for each emulator ? – Rilwan Sep 05 '13 at 06:01
  • @PankajKumar your comment actually worked. I was specifying to a dead emulator's port(but I don't know how an emulator can be removed from the list of `adb devices` , I didn't close it) thanks for the answer. I will appreciate if you make an answer out of your comment + explain a bit more what the cause of the error was and how that setting helped. thank you – rahman Sep 05 '13 at 06:10
  • @rahman Answer added for your both question.. – Pankaj Kumar Sep 05 '13 at 06:31
  • You can see this issue for help. https://code.google.com/p/android/issues/detail?id=219085 – DysaniazzZ Dec 12 '16 at 03:38

3 Answers3

6

“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 enter image description here

Pankaj Kumar
  • 81,967
  • 29
  • 167
  • 186
  • About closing the emulator, I actually meant: I don't know how it was suddenly removed from my list of devices without me doing anything. – rahman Sep 05 '13 at 06:56
  • ohh my mistake.. http://developmentality.wordpress.com/2010/09/13/android-disappearing-emulator-restart-adb-server/ is a very good article about that – Pankaj Kumar Sep 05 '13 at 07:05
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: Android 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. Android Studio

jAC
  • 5,195
  • 6
  • 40
  • 55
0

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.

Brian
  • 6,910
  • 8
  • 44
  • 82