93

I'm trying to install an APK on a device running an AOSP build of Jelly Bean (4.2).

When I "adb install my.apk", I get the error:

[INSTALL_FAILED_VERIFICATION_FAILURE]

I've tried using "testsign.jar" to "sign" the apk but it does not change the outcome

2
  • 3
    Is "allow unsigned applications" enabled under settings-> security? Commented Feb 22, 2013 at 0:01
  • 1
    That setting does not exist, but the "Unknown sources" checkbox is checked... Commented Feb 22, 2013 at 0:08

16 Answers 16

143

You need to disable verification of the APK during ADB install. If the setting in Security is greyed out or isn't working as it should try shelling into the device and, depending on which settings database the setting is in per your API level (Global, System, Secure) run

$ adb shell settings put global verifier_verify_adb_installs 0

If you can actually set it, it will prevent checking of APKs over ADB.

Sometimes you will need to disable the package verifier as well using:

$ adb shell settings put global package_verifier_enable 0

On KitKat, you can see here that these settings are in the Global database:

http://androidxref.com/4.4.2_r2/xref/frameworks/base/core/java/android/provider/Settings.java#5015

Sign up to request clarification or add additional context in comments.

This is helpful but is missing where exactly I needed to put in that command. Thanks to this answer I found the missing step.
Could you please explain what does "verify APK" means here? Is it signature verification? My app seems to have a one (And there is not any apk without any signature I think)
"Verification" also requires network, so if you have airplane mode turned on, it will also fail.
Woaw, still valid in 2025. amazing, thx
92

Go to developer settings and disable verify apps via USB. Then you can install .apk without any problem.

This is the right answer
58

In your phone,Go to:

setting/DeveloperOption/verify apps over USB

and disable it.

How is this answer different to this one?
39

This what worked for, I was trying to install on device with android 6.0

  1. Settings > Developer Options > Then Turn off Verify Apps over USB See first image

Then

  1. Settings > Security > Then Turn on Unknown sources

Finally

  1. Do not forget to uninstall your app and start afresh.

Got to Settings > Developer Options > Then Turn off Verify Apps over

Settings > Security > Then Turn on Unknown sources

Worked for me. Only step 1 is insufficient, step 2 is also needed. This is the correct answer.
15

The actual problem is Google play block your app! You need to turn off that

  1. Go to the play store
  2. Open the drawer and select Play Protect
  3. Open the settings and turn off both Scan apps with play protect and Improve harmful app detection
  4. Now it's your turn. Rebuild your app and launch it! Good Luck!

Comments

9

UPDATED ANSWER: with the last Android updates, now the following error may show during installation of the APK because of Play Protect:

Failed to finalize session : INSTALL_FAILED_VERIFICATION_FAILURE
Session 'app': Error Installing APKs

In order to fix this (for developer purposes), you may disable Play Protect as it is shown here: installation app blocked by play protect.

Disabling Play Protect fixed my issue!
I was trying to run app on Genymotion. Turning off Play Protect resolved the issue. Thanks!
5

You have to allow unsigned applications. The install is being blocked by Android. Allow install of non-market apps in Settings.

Where is this setting? There is a "verify apps" checkbox, but it's unchecked. i.imgur.com/AX20lnG.png
It's also greyed out...not sure what that means
Are you tethered with USB? Is USB Debugging enabled?
Is the application already installed? It will show this when they are signed differently.
+1 for all the great suggestions. And here is mine: are you sure there is enough space wherever you are trying to install it?
4

Aside from "settings put global verifier_verify_adb_installs 0", I also need to set package_verifier_enable to 0 in my case to make it work.

e.g.

adb shell

settings put global package_verifier_enable 0

Comments

3

delete all directory -> {.gradle, .idea, app/build } and install again working for me

deleting idea and gradle worked for me..
1

None of the suggestions above worked for me, however factory resetting the device did the trick.

Comments

0

As someone said, you need to have a signed apk to run it.In order to have a signed apk, right click on your project>Android tools>Export signed application package.You will then be prompted to locate your keystore, but if you don't have you can create one.Follow the next steps as guided by eclipse.

Comments

0

You can do this without any instructions like this: Go to settings on your device and then develooper setting and disable the option to confirm apps via usb. (Translation with google translate)

Comments

0

This happened to me in Android Studio after I reinstalled the OS on my PC - I was trying to test a build on a tablet. What ended up working for me was simply uninstalling the application on the tablet (built by the previous installation).

Comments

0

turning on app debug in developer settings solved my problem

could you be a bit more specific as how to do that? I don't see anything that says "app debug" under developer settings. the closest I see is "Debugging > Select debug app" which doesn't pop up anything helpful.
0

I faced this issue, for me it was because the developer's option was not enabled for my emulator. you can enable it from settings as we do for real devices.

Comments

0

For Android 14+ you might need to bypass the target check with --bypass-low-target-sdk-block:

adb install --bypass-low-target-sdk-block "myapk.apk"

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.