If a third-party app infects your Android phone, try booting into Safe Mode:
1. Turn off the Android, then turn it back on. As the animation starts, hold the volume down button to boot in Safe Mode.
2. Plug the charging cable to see if the phone charges in Safe Mode.