The laptop power light flashing erratically and the battery charge light blinks on and off when the AC adapter is plugged into the laptop.
Possible troubleshooting steps and repair solution:
If it happens only when you move the adapter plug inside the power jack, it’s likely that you have a problem with the power jack inside the laptop. The power jack has to be resoldered or replaced.
If it happens even without touching the adapter plug, the problem could be related to the faulty power adapter.
You can test the power adapter with a voltmeter and find out if the output voltage is correct. If the voltage is not correct, replace the adapter.
But don’t trust that even if the output voltage matches specifications. It’s possible that the power adapter doesn’t work correctly under load. Test your laptop with another known good adapter. If the laptop works fine with another adapter, your power adapter is defective and has to be replaced.