Buy an iPad?
No he said he wanted to get
rid of malware, not install IOS on it ;-)
*even then, in theory the malware could write itself to the recovery partition, meaning that the only way to get rid of it would be to flash a clean ROM from a computer
As far as I know this isn't possible on Android. To write to the "ROM" or Recovery Partition, you need to invoke a special mode upon boot. Even the host operating system can't write to it when it's booted and operating in normal conditions. Regardless of whatever elevated privileges this malware might have, it still can't touch the recovery partition or boot loader. Android automatically restores the boot loader from the ROM upon a reboot.
Firstly, you've done well to get malware on your tablet. But yes, a factory reset is needed and the OS needs to be re-installed from ROM. What make/model tablet is it?
Secondly, let me just reinforce the point that antivirus should be running on every 'smart' device you own, PC, phone, tablet... regardless if you run Windows, Apple or Linux OS. You're asking for trouble if you don't.