If I want to sell my Android device to someone, what steps should I take to wipe off all my personal data from it? Including passwords, accounts and all other stuff.
By performing a hard reset,it brings a device to a factory state.All accounts,data and apps would get removed in this process(only if you didn't ticked on backup data to phone).
Normally, what others have said would suffice. If you are that hard pressed to ensure security, then take a look here: http://m.androidcentral.com/securely-wiping-your-android-phone-makes-it-just-fine-sell-fud. Mostly overkill, and lessens the life span of the internal storage of the phone, but should work.
Factory reset should do it.
A hard reset will wipe everything. Don't forget to delete everything from the external SD card (if present), or just take it out completely.
Perform a hard reset from with your settings. That will wipe everything.
Are there no tools, like those for HDs, that can recover erased data?
It's a lot harder for flash memory, isn't it? I might be wrong...
Go to Settings, Privacy, Factory data reset, and confirm everything