A battery 'replacement'

2017-10-11 00:00:00 -0700

So at one point or another my phone battery decided to go all end-of-life on me by inflating like a pillow. Oops!

This presented a problem since I rely on my phone to carry two-factor TOTP secrets, and I kind of needed to export them since I didn’t have a recent backup (for unrelated reasons).

The Google Nexus 4 has the unfortunate property that it requires battery power to turn on, even if the micro-USB connection can provide enough current to run the entire phone. So we needed to make the phone think there was a battery present, even if one wasn’t.

I disassembled my phone and carefully removed the (glued-in!!!) inflated LiPo battery. The battery connector is of a form factor that DigiKey doesn’t carry (I looked!), so I had to scavenge the existing connector. I did this by cutting the battery cable with wire cutters, then carefully soldering wire to exposed metal contacts where the connector is attached to the cable:

A connector

(I didn’t worry about the T pin. On a normal battery, this connects to ground across a thermistor, apparently 10K nominally, but I don’t have any thermistors on hand and didn’t want to play any unnecessary guessing games.)

This was good enough to connect the phone to a benchtop power supply set to 3.7 V, which convinced the phone that there was a battery connected with something like 40% charge.

The worst idea ever

This setup strains the definition of “mobile” in “mobile phone” and is possibly the worst idea ever, but worked well enough for me to exfiltrate the data I needed using adb.

(Originally posted on my How To Make Almost Anything webpage.)

You might also be interested in knowing:

  • The Duo Security application implements a standard counter-based OTP solution as its passcode generation scheme. If you can extract the key (from its private storage) you can then import it into Google Authenticator or any other OATH app.