APK installation failed: [INSTALL_FAILED_VERIFICATION_FAILURE]
AndroidApkAndroid Problem Overview
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
Android Solutions
Solution 1 - Android
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
Solution 2 - Android
Go to developer settings and disable verify apps via USB. Then you can install .apk without any problem.
Solution 3 - Android
In your phone,Go to:
setting/DeveloperOption/verify apps over USB
and disable it.
Solution 4 - Android
This what worked for, I was trying to install on device with android 6.0
Settings > Developer Options > Then Turn off Verify Apps over USB
See first image
Then
Settings > Security > Then Turn on Unknown sources
Finally
- 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
Solution 5 - Android
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][1].
[1]: https://stackoverflow.com/a/51797048 "installation app blocked by play protect"
Solution 6 - Android
The actual problem is Google play block your app! You need to turn off that
- Go to the play store
- Open the drawer and select Play Protect
- Open the settings and turn off both Scan apps with play protect and Improve harmful app detection
- Now it's your turn. Rebuild your app and launch it! Good Luck!
Solution 7 - Android
You have to allow unsigned applications. The install is being blocked by Android. Allow install of non-market apps in Settings.
Solution 8 - Android
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
Solution 9 - Android
None of the suggestions above worked for me, however factory resetting the device did the trick.
Solution 10 - Android
delete all directory -> {.gradle, .idea, app/build }
and install again working for me
Solution 11 - Android
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.
Solution 12 - Android
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)
Solution 13 - Android
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).
Solution 14 - Android
turning on app debug in developer settings solved my problem