Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
735 views
in Technique[技术] by (71.8m points)

android - APK installation failed: [INSTALL_FAILED_VERIFICATION_FAILURE]

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...