3

I'm trying to run an android app but it's throwing these three lines in red.

[2012-07-08 20:39:23 - myapp] Failed to install myapp.apk on device 'emulator-5554': An attempt was made to access a socket in a way forbidden by its access permissions
[2012-07-08 20:39:23 - myapp] java.io.IOException: An attempt was made to access a socket in a way forbidden by its access permissions
[2012-07-08 20:39:23 - myapp] Launch canceled!

I've put the tools and plateform folder into enviormental variable and also tried every possible thing which can be done but nothing change.

I've tried it installing manually and its says by "adb install myapp.apk" and I get

protocol error
rm failed for /data/local/tmp/myapp.apk, No such file or directory

Edited: I can't install anything using SDK Manager I m getting

Fetching URL: http://developer.sonymobile.com/edk/android/repository.xml
Permission denied: recv failed
Done. Nothing was installed.

kindly help me to resolve it

thanks

MZH
  • 1,414
  • 4
  • 29
  • 57
  • 1
    Disable firewall and try again :) – COD3BOY Jul 08 '12 at 15:45
  • Are you using the intel emulator image? I've seen similar complaints about the filesystem with that, went in with adb and system seemed seriously broken. Maybe try restarting without any snapshot, or an arm image (even though it's slower). – Chris Stratton Jul 08 '12 at 16:16
  • disable firwall doesn't work, also I downloaded the sdk around 6 months before and today I tried to run it so it asked me to install revision 12 and 20(which was also not installing so I downloaded and paste it into tools and plateform-tools folder), I've also reinstalled my windows recently win 7 – MZH Jul 08 '12 at 16:34
  • What type of OS and PC are you using? You might have to adjust a setting that will allow incoming connections to port 5444 on your local machine. – BlackHatSamurai Jul 09 '12 at 18:15
  • windows 7 and dell laptop, I've also disabled the firewall – MZH Jul 15 '12 at 06:58
  • I'm experiencing the same problem. Any solutions? – SMBiggs Oct 11 '12 at 16:07

3 Answers3

1

Try window->show view->devices->view menu->Reset adb and again run application.

AnilPatel
  • 2,356
  • 1
  • 24
  • 40
0

Two primary reasons for ADB's protocol error are:

  1. Zombie ADB process (e.g. adb.exe in Windows's task-manager or just adb in Linux ps -aux)
  2. Default ADB port (e.g. 5037, 5554, 5555 etc) being occupied by some other process(es).

For both of these issues, the easiest solution is to kill the zombie or the port-blocking process. I explained the steps for both Windows and Linux here: adb kill-server not responding?

You may also try launching ADB with a non-default port. The steps are explained here: Changing default port (i.e. 5037) on which adb server runs

On Windows, I started getting this issue out of nowhere and was driving me nuts. I am happy that I could find the root of the issue. Hope this helps you too. Cheers!

Community
  • 1
  • 1
gsbabil
  • 7,505
  • 3
  • 26
  • 28
0

Was having the same issue, turns out was simply because I was using a USB extension cable. Removing that fixed it.

Brad English
  • 109
  • 1
  • 9