Good evening friends, I am a newbie to android. My problem is, when ever I started emulator, it is showing battery as nill and the message as
connect to charger. While I am searching for this over internet, I came across using the Telnet commands. I have used the following commands –
telnet localhost 5554 power capacity 100
This is crashing my application. Not only the
power command, but also other commands except
help. I have tried changing the power to 99, 70, 20, etc., nothing made difference in the output.
For this, I have tried the suggestion given in this article.
I also have tried solution given in this question.
This question might look as a duplicate of already existing questions. But, I have tried all those solutions,
- reinstalled eclipse
- reinstalled android-sdk
- reinstalled avd manager
- recreated existing AVD
I am using Intel Atom (x86) Emulator. The target is Android 4.3 with API level 18.
I have also followed the instructions and suggestions given over here like changing the
hw.battery option in the config.ini file in
The solution is to set the
hw.battery=yes in the AVD config.ini file as described here:
Go to your Android Virtual Devices folder. On Windows 7 it’s this folder for example:
Open the config.ini file
- Set the battery option to yes:
- Restart your Virtual Device and be happy 🙂
Atlast, I was able to run the emulator exactly how I wanted. I checked the list of devices using
adb devices. At first, I got nothing tin the list. Then I run this command
adb connect <ip address of the VirtualMachine>. Then, I opened
Run configurations. I saw the Virtual device in the list. I selected it and started running my application.
This could be a bug in emulator when using telnet, and by the way this is OS independent issue, it may appears in Microsoft Windows, or in Linux.
see the issue page:
I tried many solutions, but all failed, however when I delete the AVD and create new one the problem disappeared.
I use Window 7 and i had the same problem with the emulator. When i oped the config.ini file i had to put the backspace character in each line because all the file content was in one single line like this:
….. and so on
after formatting it looks like this:
avd.ini.encoding=ISO-8859-1 hw.dPad=no hw.lcd.density=240 hw.cpu.arch=arm hw.device.hash=499058361
That works for me. Now the emulator accepts pretty much all the commands.