Battery tutorial for emulator

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Battery tutorial for emulator

Postby adameve24 » Thu Dec 23, 2010 8:12 am

use the following instructions -
telnet
o localhost 5554
power ac off
power status discharging
power capacity 5

observe the emulator.

Now tell me can I do all these things with adb shell because -
adb shell cat /sys/class/power_supply/battery/capacity

returns the capacity.

Actualy in the "FILE SYSTEM" DRIVE
SYS -> CLASS -> POWER_SUPPLY
there are two folders which are not visible to us.
emulator maintains text files for every parameter of battery.

adb pull /sys/class/power_supply/battery/capacity /home/hp/Desktop
pulls the text file named capacity onto your desktop with value written on it.

I want to edit this file in sys folder but I do not have the permission, can you tell me how should I edit that file or any other alternative to change battery parameters using adb shell.

thnx

bye
adameve24
Developer
Developer
 
Posts: 29
Joined: Wed Dec 15, 2010 12:32 pm

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 4 guests