battery sensor/calibration issues
Old thread but I thought I'd add to it for other people with the same problem.
I have basically have the same issue on a stock, rooted 16GB Nexus 7. It's highly intermittent.
It first reared it's head about a month after I got the device (in Aug 2012), on the original firmware. My nexus 7 wouldn't (appear to) charge past 25% and would shut itself off after being on for only a few hours. I spent a day trying to fix it, including wiping the device, but nothing worked. Then magically, a few days later, the problem was gone.
The Nexus 7 worked fine for another month or so and then one day, after having charged it for several hours, I noticed that it was reporting a 0% charge. (Firmware was still stock but had been updated) This time it didn't power off, it just misreported it's charge. I could still run it for 10 hours or so, even though it said that it had a 0% charge and that I should connect the charger. I tried the "battery calibrator" mentioned in this thread which didn't seem to work but the next day, the device reported it had a charge. It's been randomly fluctuating between reporting 0% and a having charge every since. Sometimes it works fine for several days but then it will say 0% again.
It hasn't really affected my use of the device but it can be inconvenient not knowing how much charge you have left. Today I finally called Google and explained the problem and they promptly offered to exchange it. Hopefully this is not a design flaw but a faulty component from bad batch..