Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Set/Mock Android phone Battery Level (root Required)

Sometimes , we need to check the Low Battery Scenario over our Android Phones.
This is how you can do it!
Please note that your phone should be rooted to perform this. 
From command prompt / terminal type below set of commands.

adb root
adb Shell Dumpsys Battery set usb 0
adb Shell Dumpsys Battery unplug
adb shell Dumpsys Battery Set level x 

   x indicates the percentage of battery

With Above steps will help in mocking the Low Battery scenario, in-case you want to test an android app behaviour with low batt.
To get the battery stats back, just reboot the phone.


NOTE: Some of the posts in this blog are from internet,I've just posted them in the blog to save your time. In case, something is wrong, please send a mail and that post will be removed.


This post first appeared on G33K-TRICKS - Your Source To Tips And Tricks, please read the originial post: here

Share the post

Set/Mock Android phone Battery Level (root Required)

×

Subscribe to G33k-tricks - Your Source To Tips And Tricks

Get updates delivered right to your inbox!

Thank you for your subscription

×