46

ADBコマンドを使用してAndroidで工場出荷時設定にリセットするにはどうすればよいですか? adb reboot recovery コマンドを使用してリセットしました。しかし、サードパーティのアプリケーションは何とかクリアできませんでした.ADBを使用して達成するのは正しい方法ですか?

実際、Javaコードを使用してAndroidデバイスを工場出荷時の状態にリセットしたいと考えています。ここで何が解決できますか?

4

4 に答える 4

85

adb でインテントMASTER_CLEARを送信できます。

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

またはルートとして

adb shell  "su -c 'am broadcast -a android.intent.action.MASTER_CLEAR'"
于 2016-02-17T01:59:18.720 に答える
21

試す :

adb shell
recovery --wipe_data

そして、ここに引数のリストがあります:

* The arguments which may be supplied in the recovery.command file:
 *   --send_intent=anystring - write the text out to recovery.intent
 *   --update_package=path - verify install an OTA package file
 *   --wipe_data - erase user data (and cache), then reboot
 *   --wipe_cache - wipe cache (but not user data), then reboot
 *   --set_encrypted_filesystem=on|off - enables / diasables encrypted fs
于 2013-02-04T11:26:01.723 に答える
15

警告

@sidharth から: 「私の溶岩アイリス アルファがブートループに入ってしまいました :(」


Android Marshmallow 6.0.1 を実行している Motorola Nexus 6 の場合、次のようにしました。

adb devices       # Check the phone is running
adb reboot bootloader
# Wait a few seconds
fastboot devices  # Check the phone is in bootloader
fastboot -w       # Wipe user data
于 2016-09-06T20:44:47.050 に答える