Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Emulator got discharged completely - running telnet power command crashing the Emulator

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,

I have

  • 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 .android\avd\ folder.

like image 397
kti Avatar asked Oct 18 '13 15:10

kti


People also ask

How to solve emulator problem in Android Studio?

If the emulator fails to launch due to the error vulkan-1. dll cannot be found , you probably need to update the emulator. To update the emulator in Android Studio, go to Tools > SDK Manager and install the latest stable version of Android platform.

Why Android emulator is not opening?

If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.


1 Answers

The solution is to set the hw.battery=yes in the AVD config.ini file as described here:

https://stackoverflow.com/a/17467342/2232812

  1. Go to your Android Virtual Devices folder. On Windows 7 it's this folder for example:
    C:\Users\{yourUserName}\.android\avd\{yourAVDName}.avd

  2. Open the config.ini file

  3. Set the battery option to yes: hw.battery=yes
  4. Restart your Virtual Device and be happy :-)
like image 133
AZX Avatar answered Nov 16 '22 02:11

AZX