Is it possible to Factory reset the device programatically( with DevicePolicyManager wipeData()
) and skip the Setup Wizard after restart?
Used code:
mDPM = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
mDPM.wipeData(0);
UPDATE: I need at least to simplify the Setup Wizard, if there is no way to skip it.Any ideas?
Maybe there is a way, using adb... UPDATE: I can't do it with adb, in that state after factory reset, adb doesn't recognise the phone so I can't run any command through it.
I think the only option is to use Intent.ACTION_MASTER_CLEAR. You need to have android.permission.MASTER_CLEAR permission for your app to do this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.