1

I've just installed the SDK on linux. I've used it before as I did some android work last year, and I had no trouble with the tools at that time.

But the current installation will not install onto the emulator. avd is fired up and an emulator is running:

> adb devices
List of devices attached 
emulator-5554   device

> adb install blahblah.apk
error: protocol fault (no status)
- waiting for device -

Hangs until I kill it. Then:

> adb devices
List of devices attached

> adb kill-server
> adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *

> adb devices
List of devices attached 
emulator-5554   device

> adb -s emulator-5554 install blahblah.adk
error: protocol fault (no status)
- waiting for device -

I must have gone through this a dozen or so times, as normal user and root. I read this Q&A and tried the same thing with ADB_TRACE on. This made a strange difference when killing and re-starting the server:

> adb start-server
system/core/adb/adb.c::main():Handling commandline()
system/core/adb/adb_client.c::_adb_connect():_adb_connect: host:version
system/core/adb/adb_client.c::adb_connect():adb_connect: service host:start-server
* daemon not running. starting it now on port 5037 *
ADB server didn't ACK
* failed to start daemon *

Without the trace on, it is always "daemon started successfully". But a subsequent adb devices shows the emulator again. Trying adb install now produces copious debugging output, and right before the "error: protocol fault (no status)":

system/core/adb/transport.c::readx():readx: fd=3 disconnected
system/core/adb/adb_client.c::adb_connect():adb_connect: return fd -1
error: protocol fault (no status)

Then before "waiting for device":

system/core/adb/transport.c::readx():readx: fd=3 wanted=4 got=4
4641494c FAIL
system/core/adb/transport.c::readx():readx: fd=3 wanted=4
system/core/adb/transport.c::readx():readx: fd=3 wanted=4 got=4
30303130 0010
system/core/adb/transport.c::readx():readx: fd=3 wanted=16
system/core/adb/transport.c::readx():readx: fd=3 wanted=16 got=16
646576696365206e6f7420666f756e64 device not found
system/core/adb/adb_client.c::switch_socket_transport():Switch transport failed
system/core/adb/adb_client.c::adb_connect():adb_connect: return fd -1

I have not found any similar reports on line.

Community
  • 1
  • 1
CodeClown42
  • 11,194
  • 1
  • 32
  • 67

1 Answers1

1

Out of desperation, I unpacked the SDK again, hoping it had been corrupted by pulling it from the .zip without opening the whole thing (why do you have to download the ADT bundle anyway?).

I then ran the SDK manager and noticed that last time I did not install the updated armeabi-v7a system image , so I did that. I then ran diff -rq on the two SDK directories (this one, and the one from this morning) and the only thing reported was the stuff in the armeabi-v7f image directory (looking at build.prop, one is a month older).

But installing an .apk to the emulator worked no problems on the first time, hooray. Perhaps there was a bug in the old system-image -- if so strange there isn't more reports of this online.

CodeClown42
  • 11,194
  • 1
  • 32
  • 67
  • Hey I think I'm having a similar issue. It's sporadically hanging, but when it does I notice the same transport.c::readx() stuff. Can you elaborate a little more on how you resolved it? Could be a little different since I'm using a device and not an emulator, but worth a shot. – isick Jan 29 '14 at 00:18
  • @isick I didn't have any more such problems while working with that SDK installation daily through the end of last year (I replaced the whole system a few weeks ago). So I have to conclude it was the difference between the system image that shipped with it at that time, and the one that was immediately available as an update. Looking at the SDK Manager now, I don't see multiple versions of the ARM EABI image for API 18, which is what that would have been, so I presume one replaced the other... – CodeClown42 Jan 29 '14 at 13:18
  • ...Maybe because of stuff like this? Someone somewhere knows, lol. Looking through the `system-images/` I notice they aren't versioned beyond the API they go with (and I guess a date in `build.prop`), so there is no history to learn about there. I did just search online again to see if other people had reported the same issue and didn't find anything but **[there is this](http://stackoverflow.com/questions/18150637/cant-show-android-device-in-ubuntu-13-04)**, which I imagine you've seen? – CodeClown42 Jan 29 '14 at 13:24
  • I did see that, but my issue isn't with recognizing the device, it's with installing to it. I'll look into updating the SDKs, but I just did a clean install last wednesday when this problem started so I'm skeptical that's the problem... Anyway, thanks for getting back to me! If you care for a more detailed explanation of my problem I have an [open SO question](http://stackoverflow.com/questions/21296305/adb-commandline-hanging-during-install-phonegap). – isick Jan 29 '14 at 15:38