A Python-based application that will change android device battery level, looping from 2% to 1000% and viceversa.
In GNU/Linux distributions, install adb on:
- Debian based distros with
(sudo) apt install adb android-sdk-platform-tools-common - Arch based distros with
(sudo/doas) pacman -S android-tools - Gentoo with
(sudo/doas) emerge dev-util/android-sdk-update-manager
In Apple macOS, install adb by:
- Installing with homebrew, using
brew install android-platform-tools - Or by manually installing it from https://developer.android.com/tools/adb
In Microsoft Windows, install adb from https://developer.android.com/tools/adb.
In GNU/Linux distributions, install python on:
- Debian based distros with
[sudo] apt install python3 - Arch based distros with
[sudo/doas] pacman -S python - Gentoo with
[sudo/doas] emerge -a dev-lang/python
In Apple macOS, install python from https://www.python.org/downloads.
In Microsoft Windows, install python from https://www.python.org/downloads.
There are 3 main methods to download the source code:
- By downloading the git repository by cloning it with
git clone https://github.com/TheRealOne78/pybattery.git; - By downloading a zip file from https://github.com/TheRealOne78/pybattery/archive/refs/heads/main.zip or clicking the
Code>Download ZIPbuttons in GitHub; - Or by copying/downloading the source code from https://github.com/TheRealOne78/pybattery/blob/main/pybattery.py or clicking the
pybattery.pyfile in GitHub and copying/downloading the source code.
In the Android device, USB Debbuging in Developer Options needs to be activated in order for adb to reach and send commands to the Android device.
In Linux and macOS run the python file with python3 ./pybattery.py.
In Windows double click pybattery.py to execute it via python.
For restoring the battery level to normal, adb shell dumpsys battery reset needs to be executed or Android has to be rebooted.
Copyright (C) 2023 TheRealOne78
License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
I am not responsible for any damage to your devices. Experiment at your own risk!