ShizuStore

Battery Stats Changer

superisuer

1.0 · GitHub

Download APK
Power management Android 10+ 9 months ago GPL-3.0
53 ShizuStore
3.4k GitHub
24 Stars
6 MB Size

More about this app

Open source app to visually change battery data via Shizuku

🔋 BSC (Battery Stats Changer)

GitHub license Android

This is an open-source application for visually changing battery data in the Android system. Created with Sketchware Pro.

How does this work??!

Through Root or Shizuku, dumpsys/cmd commands are executed, which can change some battery data.

What can it do

  • Parse whether OnePlus' custom dumpsys is being used
  • Change battery percentage (the ability to set negative values ​​and values >100 depends on the ROM)
  • Change the capacity in mAh
  • Change the temperature (some firmware may turn off the phone at certain values)
  • Change USB connection status

How to reset it

There are several ways to do this:

  1. Execute in shell dumpsys battery reset.
  2. Press "Reset" button in my app.
  3. Reboot your device.

Where can this be useful?

✨There's a lot of ideas, but for example, you could take screenshots like "Look at my weird battery!" or if you have 1% left, you could change the percentage and add at least 1 extra minute before your phone get off.

Building

Since this app was made in Sketchware Pro, I recommend compiling it in Sketchware Pro. You can find the SWB file for Sketchware Pro in the Releases tab.

For Android Studio, simply clone the repo, open it there, and build.

Releases

Latest release can be find here. For all releases, I include an APK file with a test signature and a SWB file for those who want to open the project in Sketchware Pro.

Close

How Shizuku is used

Can spoof displayed battery level, charge counter, temperature and USB state via `dumpsys battery` and `cmd battery` through Shizuku.

This is an AI-assisted analysis of Shizuku-related usages in the app's public source code. It is best effort, so it may not catch every single usage.

How this app uses Shizuku

The app uses Shizuku to run privileged battery service commands that change what battery values Android reports and displays.

  • Spoof battery level: a value the user types is applied with the dumpsys battery set level shell command through Shizuku.
  • Spoof charge counter: a value the user types is applied with the dumpsys battery set counter shell command through Shizuku.
  • Spoof battery temperature: a value chosen with the temperature slider is applied with the dumpsys battery set temperature shell command through Shizuku.
  • Toggle charging state: turning the USB option on or off is applied with the dumpsys battery set usb shell command through Shizuku.
  • Reset battery state: one tap clears all spoofed values with the dumpsys battery reset shell command through Shizuku.
  • Read battery state: the current spoofed or real level, counter, temperature, USB state and overall status are read with cmd battery get and dumpsys battery shell commands through Shizuku.

Android APIs or commands used

  • dumpsys battery set level
  • dumpsys battery set counter
  • dumpsys battery set temperature
  • dumpsys battery set usb
  • dumpsys battery reset
  • dumpsys battery
  • cmd battery get level
  • cmd battery get counter
  • cmd battery get temp
  • cmd battery get usb
  • cat /sys/class/power_supply/battery/capacity
  • cat /sys/class/power_supply/battery/charge_counter
  • cat /sys/class/power_supply/battery/temp
Close

Changelog

What's new for version 1.0

first release yeah I have attached the SWB file for those who want to open the project in Sketchware Pro!

Close

Permissions

2 permissions requested

  • android.permission.VIBRATE
  • moe.shizuku.manager.permission.API_V23
Close