I have a problem with how to format an SD card without a computer. Suppose my SD card is connected to a Pi 3 and this Pi is in a package. As soon as the package is opened, even in power off mode the SD card is broken or formatted. how do I do this?

My idea is that with a battery powered device, it can be unusable or even formatted by connecting the base of the sockets or by applying high voltage.

  • Are you asking how you can self-destruct an SD card when the box containing the Pi is opened, even if the Pi is switched off? How much do you care if you destroy the Pi in the process? – Mark Smith May 23 '19 at 10:49
  • It is possible to do it using an Android if you have one. – Roxiun May 23 '19 at 11:54
  • Some cameras allow you to reformat a SD card. However, the way they are formatted varies according to the camera. Without a computer, there's no way to burn an image to a SD card. You may buy a working SD card for Raspberry Pi, preloaded with NOOBS here for $11.65: amazon.com/Raspberry-8GB-Preloaded-Noobs-Card/dp/… – user96931 May 23 '19 at 14:37
  • Since you're able to access stackexchange.com, it is clear you have some sort of device. You may use that to format the SD card, as well (even a phone can format a SD card, as long as you have the proper adaptor and software). – user96931 May 23 '19 at 14:38
  • your question has nothing to do with the RPi – jsotola May 24 '19 at 0:44

This box will self destruct in x seconds.

Have a look at the UPS pico, if installed correctly you can use the automatic-power-down script (Automatic Files Safe Shutdown) that will shut the Pi down when the battery is low. You could mod the script to destroy data on the SD card before shutting down the PI. You could then use the same "kill the SD card script" and add a small switch(button) to the inside of the box, connect it with the PI's GPIO pins and create a script that monitors the state of the switch. So if the box is opened while the Pi running, the switch is triggered and the card is destroyed.

UPS Pico ; https://pimodules.com/_pdf/13_0x40_W_UPS_PIco_HV3.0.pdf PI GPIO ; http://raspberry.io/projects/view/reading-and-writing-from-gpio-ports-from-python/

The trouble would be that it will also destroy your card when the power goes down... You probably don't want that. And this setup just won't work when the PI's isn't even running....

I'd look into other options to keep data away from others, like encryption, this would solve the need for the Pi having to powered on and keep your data unreadable for people who have the SD card.

Encrypt ; https://github.com/NicoHood/NicoHood.github.io/wiki/Raspberry-Pi-Encrypt-Root-Partition-Tutorial

Or you could keep the data hidden in de cloud somewhere(like mega.nz/dropbox etc) and pull it when needed. If data isn't stored locally........

Encryption is proly the best way to go here, I'd say.

Happy Hacking!

Your Answer

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