Partager via


RecoverySystem.RebootWipeUserData(Context) Method

Definition

Reboots the device and wipes the user data and cache partitions.

[Android.Runtime.Register("rebootWipeUserData", "(Landroid/content/Context;)V", "")]
public static void RebootWipeUserData (Android.Content.Context? context);
[<Android.Runtime.Register("rebootWipeUserData", "(Landroid/content/Context;)V", "")>]
static member RebootWipeUserData : Android.Content.Context -> unit

Parameters

context
Context

the Context to use

Attributes

Exceptions

if writing the recovery command file fails, or if the reboot itself fails.

if the current user is not allowed to wipe data.

Remarks

Reboots the device and wipes the user data and cache partitions. 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.

Java documentation for android.os.RecoverySystem.rebootWipeUserData(android.content.Context).

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