How can I do factory reset using adb in android? [closed]

You can send intent MASTER_CLEAR in adb:

adb shell am broadcast -a android.intent.action.MASTER_CLEAR

or as root

adb shell  "su -c 'am broadcast -a android.intent.action.MASTER_CLEAR'"

After Android 8.0 and above with root permission from shell

am broadcast -p "android" --receiver-foreground -a android.intent.action.FACTORY_RESET

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)