This was found on the Paperwhite (5.3.8). I'm too lazy to check, but it probably also works on Touch firmwares, and possibly other models.
Create the file DO_FACTORY_RESTORE (no
file extension, no content) on the usb drive. Reboot.
This may come in handy if the device is "semi-bricked" and does not fully start up, but still allows access to the USB storage on boot. It wipes both the user partition and all internal settings. It does not touch the main or diags partitions.
EDIT: verified to work with all 5.3.x firmwares (both PW and Touch). It will NOT work on older Touch versions.
EDIT: confirmed on 5.4.x too
EDIT: and on 5.6.x too