How to hack Motorola’s “Invalid battery” and “Authentic Motorola Battery” error

Motorola has an annoying block in this new Android phone I have from them. The battery won’t work. It looks real. Came in the box from Amazon. But the software says the battery isn’t authentic.

But here is a hack: take the SIM out. It charges.