Is it possible to perform "Erase external SD card" action via adb?

To be clear, my goal isn't to manually call partitioning/formatting tools such as newfs_msdos from command line. I want to get exactly the same result as if "Erase.." button was pressed in Settings via GUI, but using a command line to achieve that.

  • Nope. It's not possible.
    – Matt
    Sep 6 '17 at 17:08
  • You can do it by clicking on the screen from adb. like adb shell input touchscreen tap x y
    – STF
    Oct 1 '17 at 8:29
  • Settings -> Storage -> Erase SD card. wikihow.com/Format-an-SD-Card-on-Android
    – wolfram77
    Dec 31 '20 at 4:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.