0

I'm trying to copy an .apk to a non-rooted galaxy s4 mini both though adb install (with development mode on) and through windows explorer and in both cases it hangs on uploading the apk.

Is there a way to change this to allow uploading apks? Only rooting?

(An obvious workaround is to copy apks over dropbox but ideally I want to be able to use adb install for debugging my apks)

Edit:

I have unknown sources allowed, I've a couple of apps I've installed by downloading the APKs bypassing Google Play

I've tried with a couple of APKs with the same result. I've successfully installed the same APKs by sharing them via Dropbox and installing on the phone from a file explorer

I'm on windows but the same adb executable works fine with my Kindle Fire (rooted) tablet installing the same APK without a problem

adb install application.apk just hangs for a while until I terminate it
Occasionally after I terminate it and try to restart it would give me the following:

error: protocol fault (no status)
error: protocol fault (no status)
error: device not found
- waiting for device -
rm failed for /data/local/tmp/application.apk, No such file or directory

Then adb install application.apk hangs again when restarted.

The phone is recognized with adb devices

I cannot check if I have /data/app-lib/application or /data/data/applicaiton.apk as I don't have root access (I can navigate around with adb shell but get access denied trying to ls contents of /data/app-lib and /data/data), but I think this is unlikely (I've tried with APKs I've never had installed on the phone before)

adb install -r application.apk and adb install -s application.apk hang the same way as adb install application.apk

adb push application.apk /sdcard gives me protocol failure

Installing from sdcard with a file explorer (for apks previously downloaded from the internet) does work but I would like to be able to install and debug them with adb (through Android Studio)

1

First, do you have unknown sources checked under Settings --> Security??? Also, have you tried another APK? If it is one you, or someone else developed you may need to uncheck Verify Apps in that same spot.

Second, do you only have windows? I don't know about permissions on Windows, but Linux requires sudo adb install or adb install as root user... actually any use of adb requires root or sudo permissions.

Second, does it just say failure? Does it say permission denied? Have you ever had that app installed before?

adb install application.apk

will give a failure response if you have a left over /data/app-lib/application folder or /data/data/application folder, or if you copied the apk to /data/app first without installing it, and then try to install it with adb, because the place is taken up already.

If that is the case try (reinstall flag):

adb install -r application.apk

You should also try (install to sdcard flag):

adb install -s application.apk

or last:

adb push application.apk /sdcard

and then install from sdcard with a file explorer, or package installer.

  • Thank you for your detailed answer, nothing of this appears to work for me unfortunately. See the details in my edit of the question. – axk Aug 16 '14 at 19:38
  • This issue should be fixed by opening Task Manager in Windows, searching for adb.exe, and right clicking on it, and then clicking on end process. – SudoSURoot Aug 17 '14 at 22:54
0

I also had the same problem. Try doing this:

First, try pushing the apk package to sdcard:

adb push test.apk /sdcard/

Then, install the apk from sdcard:

adb shell pm install /sdcard/test.apk    
  • The adb push gives me a "protocol failure" or hangs. – axk Nov 30 '14 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.