Freigeben über


RecoverySystem.VerifyPackage Method

Definition

Verify the cryptographic signature of a system update package before installing it.

[Android.Runtime.Register("verifyPackage", "(Ljava/io/File;Landroid/os/RecoverySystem$ProgressListener;Ljava/io/File;)V", "")]
public static void VerifyPackage (Java.IO.File? packageFile, Android.OS.RecoverySystem.IProgressListener? listener, Java.IO.File? deviceCertsZipFile);
[<Android.Runtime.Register("verifyPackage", "(Ljava/io/File;Landroid/os/RecoverySystem$ProgressListener;Ljava/io/File;)V", "")>]
static member VerifyPackage : Java.IO.File * Android.OS.RecoverySystem.IProgressListener * Java.IO.File -> unit

Parameters

packageFile
File

the package to be verified

listener
RecoverySystem.IProgressListener

an object to receive periodic progress updates as verification proceeds. May be null.

deviceCertsZipFile
File

the zip file of certificates whose public keys we will accept. Verification succeeds if the package is signed by the private key corresponding to any public key in this file. May be null to use the system default file (currently "/system/etc/security/otacerts.zip").

Attributes

Exceptions

if there were any errors reading the package or certs files.

if verification failed

Remarks

Java documentation for android.os.RecoverySystem.verifyPackage(java.io.File, android.os.ProgressListener, java.io.File).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to