My favorites | Sign in
Project Home Issues
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 39959: Create a new AVD: a battery problem is displayed, and the 'power display' command makes the emulator crash
10 people starred this issue and may be notified of changes. Back to list
Reported by, Nov 18, 2012
Please describe the problem in detail, with the following information (if
Host OS: Ubuntu 12.10 and Windows Vista 
SDK tools version (available in the "About" section of the 'android' tool
UI): r21
Eclipse version: Indingo and Juno
ADT plug-in version: r21
Platform targeted by your project: N/A
Version of the platform running in the emulator: 4.2, 4.0.1

1. Using the AVD manager UI in Eclipse, create a new AVD
2. Run it
3. See there is a red exclamation mark icon in the status bar, instead of the normal battery charge indicator icon
4. 'telnet localhost 5554'
5. 'power display'
6. The emulator crashes

The battery should have a normal state, and the emulator should not crash.

See above points 4 and 6.

Attach sample project, etc.
If possible, try to reproduce using ApiDemos.
If the problem is happening in the emulator, consider attaching the output
of "adb bugreport"

Nov 18, 2012
Removing the line "hw.battery=no" from the config.ini file allowed me to start a 4.0.3 emulator. 

This workaround did not work for the 4.1.2 emulator : in that case the emulator never started. Same behavior if I set hw.battery=yes. 
Nov 18, 2012
Galaxy Nexus reboot itself after new call start (only sometimes) 4.1.1 (JRO03C)

sometimes, when I start a new call my screen is black (I can view only three virtual buttons.
After 10 seconds it reboot itself.

I suppose there is a problem with proximity sensor and GSM module.

On internet maybe is a problem only on newest devices made in august 2012

my device is:

Samsung Galaxy Nexus GT-i9250
Android version: 4.1.1 (JRO03C)
Nov 19, 2012
#3 this has nothing to do with this issue, please open a new one, thanks.
Nov 25, 2012
My case for this issue is the following. All steps are the same except this.

1. Create Nexus S or Nexus One AVD.
5. Any power command.

Host OS: Windows 7 64 bit
Eclipse version: Android Developer Tools, Build: v21.0.0-519525
Jan 21, 2013
This feature would be really useful for the work I am doing. Has there been any progress on this, or any workarounds. I have tested this with both ARM 4.2 and 4.1.2 AVDs, however both exhibit the same issue with any power commands.
Jan 23, 2013
The power display command worked for me when I changed hw.battery=yes in config.ini for a NexusOne AVD.

I had exactly the same issue and Host etc as gev2 (#4).
Sep 26, 2013
Workaround: Use the Google Apis as target worked for me. 
Oct 5, 2013
I've the same problem, anyone finded some workaound? Using google apis as target do not worked for me.
Oct 18, 2013
First of all, thanks for all of you for posting answers. I too have the same problem. I have tried removing hw.battery, tried setting setting hw.battery to 'yes' and 'no'. Nothing worked for me. Also I tried changing the target from Android 4.3 to Google APIs. This also did not work for me. I am newbie to android and I even can't understand, why an emulator gets discharged. Can any one please clarify my doubt?

Dec 19, 2013
Project Member #11
(No comment was entered for this change.)
Labels: Subcomponent-Tools-emulator
Jan 20, 2014
I agree with jagged - changing hw.battery=yes in the config.ini file works.   It appears that Nexus emulator default to no battery for some odd reason (at least one other emulator I have installed defaults to 'yes', so not sure why Nexus got slighted.   For newbies with Windows 7, instructions are at: 

the config.ini files on Windows 7 are at:

Jan 29, 2014
Project Member #13
Fixed by

Note that the problem only arises when using an AVD created from a Nexus One or Nexus S device profile.
Until the next SDK tools release, you can work around as follows:

  - You can fix your AVD config.ini by removing the hw.battery=no line (or changing 'no' to 'yes')
  - You can also fix your $SDK/tools/lib/devices.xml by replacing all lines like:




This ensures that any new AVD created from the Nexus One / Nexus S profiles won't have the problem.

Hope this helps.

Status: FutureRelease
Mar 3, 2014
I confirm this workaround worked for me. Thank you
Mar 8, 2014
Project Member #15
Released in Tools r22.6
Status: Released
Sign in to add a comment

Powered by Google Project Hosting