IT. Expert System.

Android Reference

RecoverySystem


android.os

Class RecoverySystem



  • public class RecoverySystem
    extends Object
    RecoverySystem contains methods for interacting with the Android recovery system (the separate partition that can be used to install system updates, wipe user data, etc.)
    • Constructor Detail

      • RecoverySystem

        public RecoverySystem()
    • Method Detail

      • verifyPackage

        public static void verifyPackage(File packageFile,
                         RecoverySystem.ProgressListener listener,
                         File deviceCertsZipFile)
                                  throws IOException,
                                         GeneralSecurityException
        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).
        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").
        Throws:
        IOException - if there were any errors reading the package or certs files.
        GeneralSecurityException - if verification failed
      • installPackage

        public static void installPackage(Context context,
                          File packageFile)
                                   throws IOException
        Reboots the device in order to install the given update package. Requires the android.Manifest.permission#REBOOT permission.
        Parameters:
        context - the Context to use
        packageFile - the update package to install. Must be on a partition mountable by recovery. (The set of partitions known to recovery may vary from device to device. Generally, /cache and /data are safe.)
        Throws:
        IOException - if writing the recovery command file fails, or if the reboot itself fails.
      • rebootWipeUserData

        public static void rebootWipeUserData(Context context)
                                       throws IOException
        Reboots the device and wipes the user data partition. This is sometimes called a "factory reset", which is something of a misnomer because the system partition is not restored to its factory state. Requires the android.Manifest.permission#REBOOT permission.
        Parameters:
        context - the Context to use
        Throws:
        IOException - if writing the recovery command file fails, or if the reboot itself fails.
      • rebootWipeCache

        public static void rebootWipeCache(Context context)
                                    throws IOException
        Reboot into the recovery system to wipe the /cache partition.
        Throws:
        IOException - if something goes wrong.
      • handleAftermath

        public static String handleAftermath()
        Called after booting to process and remove recovery-related files.
        Returns:
        the log file from recovery, or null if none was found.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1275 / . Delta: 0.02468 с