APK安装失败:[INSTALL_FAILED_VERIFICATION_FAILURE] [英] APK installation failed: [INSTALL_FAILED_VERIFICATION_FAILURE]

查看:1211
本文介绍了APK安装失败:[INSTALL_FAILED_VERIFICATION_FAILURE]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在运行AOSP版本的Jelly Bean(4.2)的设备上安装APK.

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

当我"adb安装my.apk"时,出现错误消息:

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

[INSTALL_FAILED_VERIFICATION_FAILURE]

[INSTALL_FAILED_VERIFICATION_FAILURE]

我尝试使用"testsign.jar"对apk进行签名",但不会改变结果

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

推荐答案

您需要在ADB安装过程中禁用APK验证.如果安全性"中的设置为灰色或不起作用,则应尝试将其安装到设备中,然后根据您的API级别(全局,系统,安全)在哪个设置数据库中运行

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

如果您可以进行实际设置,它将阻止通过ADB检查APK.

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

在KitKat上,您可以在此处看到这些设置在Global数据库中:

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

这篇关于APK安装失败:[INSTALL_FAILED_VERIFICATION_FAILURE]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆