Documentation
¶
Overview ¶
Factory reset demonstration via DevicePolicyManager.
WARNING: This example shows the API but does NOT actually perform a factory reset. The WipeDataWithReason call is commented out to prevent accidental data loss. Uncomment it only on emulators or devices you intend to wipe.
Build:
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o build/factory_reset ./examples/factory_reset/ adb push build/factory_reset /data/local/tmp/ && adb shell /data/local/tmp/factory_reset
Click to show internal directories.
Click to hide internal directories.