Battery Stats Changer
1.0 · GitHub
More about this app
Open source app to visually change battery data via Shizuku
🔋 BSC (Battery Stats Changer)
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:
- Execute in shell
dumpsys battery reset. - Press "Reset" button in my app.
- 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.
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 levelshell command through Shizuku. - Spoof charge counter: a value the user types is applied with the
dumpsys battery set countershell command through Shizuku. - Spoof battery temperature: a value chosen with the temperature slider is applied with the
dumpsys battery set temperatureshell command through Shizuku. - Toggle charging state: turning the USB option on or off is applied with the
dumpsys battery set usbshell command through Shizuku. - Reset battery state: one tap clears all spoofed values with the
dumpsys battery resetshell command through Shizuku. - Read battery state: the current spoofed or real level, counter, temperature, USB state and overall status are read with
cmd battery getanddumpsys batteryshell commands through Shizuku.
Android APIs or commands used
dumpsys battery set leveldumpsys battery set counterdumpsys battery set temperaturedumpsys battery set usbdumpsys battery resetdumpsys batterycmd battery get levelcmd battery get countercmd battery get tempcmd battery get usbcat /sys/class/power_supply/battery/capacitycat /sys/class/power_supply/battery/charge_countercat /sys/class/power_supply/battery/temp
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!
Permissions
2 permissions requested