Solution found after years of searching ;-)
MacBook 2009 symptoms:
MacBook switches off with no warning when the power adapter was removed.
MacBook switches off with no warning when booting up with power adapter removed.
After dealing with the problem for almost two years and searching the internet from time to time for several days I still found no solution.
Tried resetting SMC, PRAM, and many things more
coconutBattery showed my battery in good health, now running fine for about an hour without shutting down, no power adapter connected.
Load Cycles: 84 (I almost never used the MacBook without power adapter and thought it could be the reason for the shutdowns, I never calibrated the battery)
Battery Status : Good
My solution found by accident today fiddling around with the Energy Saver Preferences Pane/Battery settings. I don't know, if all the changes I made are necessary, or just one changed setting. What I did:
1. Set Computer sleep to "Never"
2. Set Display sleep to "Never" (ignoring the warning for shorter display life)
3. Unchecked "Put hard disk to sleep when possible"
4. Unchecked "Slightly dim the display while on battery power"
Maybe someone tries all changes separately and finds the real culprit