10

I am trying to install an apk on api level 17 emulator using adb command.

adb install Test apk

I am getting following error in response

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

Anyone know how to handle this error?

Michael Celey
  • 12,645
  • 6
  • 57
  • 62
anujprashar
  • 6,263
  • 7
  • 52
  • 86
  • are you sure that the `path` and the `apk` names are correct? and the `apk` is present in that `path`? – Rahul Mar 19 '13 at 05:59
  • yes, I have apk on desktop. I cd to desktop and I am running adb from desktop. – anujprashar Mar 19 '13 at 06:03
  • Anyone having any idea how to go about this error? – anujprashar Mar 19 '13 at 07:30
  • Edit your question to include the exact commands you are using to install the app and the response. E.G. `adb install -r MyApp.apk`...`Sucess` (or not in your case!) – Ne0 Mar 25 '13 at 16:10
  • Frequently happens when two or more different ADB version are accessible and running simultaneously. Say, you have a development ADB and another from a OEM software (Kie for Samsung, others for HTC, Motorola etc.) Try to kill ADB with 'adb kill-service' and immediately upload the APK again. – OGP Mar 27 '13 at 08:52
  • Try to put your apk to c:\ or d:\ folder directly and run your cmd as administrator – onur taskin Mar 27 '13 at 09:57
  • Try to follow this steps http://stackoverflow.com/a/14178045/1271424 That man have a similar issue. I think, it's a AVD internal bug. – Roman Truba Mar 27 '13 at 10:07

4 Answers4

3

I found out that in my workplace the people who were facing this problem have only read permission on their computer USB port has and not write permission. After getting USB write permission from admin the problem is no longer occurring.

anujprashar
  • 6,263
  • 7
  • 52
  • 86
1

Try this. Navigate to Settings -> Application settings (location may depend on your device). Here, check Install from unknown sources. Hope it will help.

Yasir Malik
  • 441
  • 2
  • 9
  • Check the steps related to "Zombie ADB process" and "default ADB port" given in this post. http://stackoverflow.com/questions/11384414/failed-to-install-myapp-apk-on-device-emulator-5554 – Yasir Malik Mar 22 '13 at 11:59
1

You may get some troubles if you have introduced sharedUserId in an update of the existing app. Check this Blog for more information.

Michal Harakal
  • 1,025
  • 15
  • 21
0

In my situation, eclipse was opened with ADT installed, so when I closed eclipse, the problem was gone.

cocobear
  • 415
  • 1
  • 4
  • 6