Why is the galaxy logo flickering and device shuts off when unplugged?

When the tablet is plugged in it works fine but the original galaxy/android logo stays flickering underneath whatever is on the tablet screen. Also, when the tablet is unplugged from the charger, the screen flashes a few time and. Then shuts off. I replaced both the battery and the charging port. I also did a factory reset. The problem still exists. What could be the problem?

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0