In a similar case, I believe Geekmaster managed to factory reset a recalcitrant Kindle using the rest file trick... by running a shell loop to touch the file, which did manage to catch the Kindle in the single instant it showed up as an external drive.
You just gotta be fast.