Battery drains when phone is turned off I have a used Samsung Galaxy S3 Mini GT-I8190. When I shut down the phone the battery still drains. The longer I leave the battery in the shut down phone the more charge it looses. Typically the battery looses between 1% and 2% charge per hour when inside the shut down phone. After a few days without turning the fully charged phone on the battery is completely dead so that I cannot turn on the phone again without charging first.  

I don't know the previous owner and cannot ask them if they had the same problem.

Things I tried so far:


Tried to spin the battery on a table to see if the battery is bloated. The battery did not spin at all. Its completely flat on both sides.
Removed the fully charged battery from the phone, let it sit outside for a few days, put it back in, turned on the phone to read the battery level: The battery was still full – so the battery shouldn't be the problem.
Bought a new battery from another vendor anyways and did the same tests as before.
Factory reset (multiple times)
Update to the latest available OS (Android 4.1.2) provided by the vendor.
Update to the latest available custom ROM (Lineage OS 14.1 / Android 7.1.2).
After the factory resets and after flashing I did not install or customize anything apart from the following things. Of course, they had no effect since the phone was turned off — I read about these things in some forums and tried them anyway. 


Only on the vendor's OS: Stop the pre-installed Mail service (even though I didn't sign into anything). 
Turn off everything (Wifi, GPS, ...)
Enable (extreme) power save mode



Neither did I insert a SIM card nor an SD card into the phone, so these two can also be ruled out as the culprit.

Question

Why does the battery drain when the phone is shut down?
Can I do anything about this?
This is not a definitive answer but most likely cause IMO based on my experience with a Note 2 exhibiting similar symptoms. 

You did a thorough job of investigating the causes and this pretty much rules out wakelock as the common culprit in such cases.

That leaves with one possibility - hardware. Something in the hardware is causing electrical drain. This needs to be investigated by competent people. In my case, it was rainwater seeping through ear phone port that corroded the motherboard. Cleaning with alcohol and drying reduced the drain but not significantly as the corrosion was deep.

The cost of investigating and replacing hardware is significant and in your case, you are not the first owner, so it may not be worth it. My suggestion would be to use it as it is for as long as you can.