Android.OS.RecoverySystem.VerifyPackage Method
Verify the cryptographic signature of a system update package before installing it.

Syntax

[Android.Runtime.Register("verifyPackage", "(Ljava/io/File;Landroid/os/RecoverySystem$ProgressListener;Ljava/io/File;)V", "")]
public static void VerifyPackage (Java.IO.File packageFile, RecoverySystem.IProgressListener listener, Java.IO.File deviceCertsZipFile)

Parameters

packageFile
the package to be verified
listener
an object to receive periodic progress updates as verification proceeds. May be null.
deviceCertsZipFile
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").

Exceptions

TypeReason
Java.IO.IOExceptionif there were any errors reading the package or certs files.
Java.Security.GeneralSecurityExceptionif verification failed

Remarks

Verify the cryptographic signature of a system update package before installing it. Note that the package is also verified separately by the installer once the device is rebooted into the recovery system. This function will return only if the package was successfully verified; otherwise it will throw an exception. Verification of a package can take significant time, so this function should not be called from a UI thread. Interrupting the thread while this function is in progress will result in a SecurityException being thrown (and the thread's interrupt flag will be cleared).

[Android Documentation]

Requirements

Namespace: Android.OS
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 8