Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change emulator battery level in Windows

How can I change the battery level (from 50% to 70% and not charging) on emulator in Windows OS? There are some guides, but all of them are for Ubuntu.

like image 379
domen Avatar asked Aug 15 '13 12:08

domen


2 Answers

Windows supports telnet from the command prompt, at least on XP and Vista. If you do not find this program on other Windows versions, you can perhaps install PuTTY.

Then, you telnet into the emulator the same way that you would on any other development OS:

telnet localhost 5554

where 5554 is the port number given in the title bar of your emulator window.

From there, it's how the rest of the instructions that you have read describe it. For example, to set the power to 70%, execute the power capacity 70 command in the telnet session. There are other power subcommands outlined in the documentation.

like image 67
CommonsWare Avatar answered Oct 17 '22 03:10

CommonsWare


If you are using a remote emulator, like android x86 you can use the following:

adb connect

adb shell dumpsys battery set level 90

like image 29
user1228891 Avatar answered Oct 17 '22 02:10

user1228891