Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to programmatically perform a factory reset on an Android device?

Tags:

android

Understanding how incredibly dangerous this question is, I'd like to know if it is possible to programmatically issue a factory reset, as available in Droid and G1. Does anyone know how this is implemented? Is this implemented using the standard Android SDK, a Motorola-specific function, or something else?

like image 301
RickNotFred Avatar asked Dec 10 '22 16:12

RickNotFred


2 Answers

You may use the WipeData() method in DevicePolicyManager, which will erase all user data: http://developer.android.com/guide/topics/admin/device-admin.html

Available since Android 2.2

Close enough?

like image 51
Thomas Moller Avatar answered May 31 '23 07:05

Thomas Moller


There is no means in the SDK to initiate a factory reset.

like image 42
CommonsWare Avatar answered May 31 '23 08:05

CommonsWare