how does a cell phone detect a "genuine" battery

Here's the next item on my "to-fix" list while home for the holidays...

I have before me a Motorola E815 cell phone which will not charge. The
battery is fine, just the phone won't make a connection to the charger.
I found an old LG cell phone with battery, which works fine.

Since every single cell phone I've ever seen uses a 3.7V Li-Ion
battery, and since I don't have a programmable voltage supply with me,
I figured I could use the LG cell phone to charge the Motorola battery.
The LG cell phone and its battery have 4 contacts:

| | | |

and the Motorola cell phone has 4 contacts as well:

| | | |

I figured I could just connect the +/- terminals of the LG phone to
those of the Motorola battery, and the Positive terminals together, and
then the LG phone would see it has a drained battery and merrily charge
it up.

Not so! When I did this, the LG phone said "Use genuine battery!" and
refused to charge it. WTF?!?! It seems like there's some kind of
"counterfeit detection" circuit in the battery to make it harder to
make cheap knockoff batteries. I assume this comes from the "mystery"
contact. Is there information somewhere on how to fool this idiotic
counterfeit detection circuit?