My old 3GS that I bought on release date shuts off randomly when using it even though there's still anywhere from 20-80 percent battery left. It will only turn on if I connect it to a charger through wall or USB. I want to sell my phone but I can't sell it like this. Is this a bad battery issue that can be replaced? Or is it the logic board failing?