GreenHub is a collaborative approach to power consumption analysis of Android devices.
The GreenHub mobile app is a fork of the Carat Project.
Learn more at greenhubproject.org.
Disclamer: The project is still under development, the beta testing is now over. At the moment there is available a release candidate version.
Linux and Mac OS:
gradlew is executable, by typing this command:
$ chmod +x gradlew
You can now build and test the project:
$ ./gradlew assembleDebug $ ./gradlew check
$ gradlew.bat assembleDebug $ gradlew.bat check
If it is the first time building the Android app with Docker, it is necessary to build a local Docker image before running it. Afterwards just run a container:
$ docker build -t greenhub-project/batteryhub . # Only necessary for first build $ docker run -it --name container-name \ # Choose a container name -v `pwd`:/usr/src/app \ # DO NOT change this src path hmatalonga/greenhub-android \ /bin/sh -c \ "./gradlew assembleDebug; ./gradlew check"
To execute another gradle task, simply create a new container:
$ docker run -it --name container-name \ # Choose another container name -v `pwd`:/usr/src/app \ # DO NOT change this src path greenhub-project/batteryhub \ /bin/sh -c \ "./gradlew task-name"
To start an existing container, type:
$ docker start -i container-name
One line build, for copy-paste:
docker build -t greenhub-project/batteryhub . && docker run -it --name greenhub-app -v `pwd`:/usr/src/app greenhub-project/batteryhub /bin/sh -c "./gradlew assembleDebug; ./gradlew check"
To list all available gradle tasks run
Having problems building GreenHub? Please see the Troubleshooting guide.
For more details, please check our documentation.
If you think you have found a bug or have a feature request, refer to the issues page, proper labels are provided. Before opening a new issue, be sure to search existing ones to avoid duplicates. Please try to include steps to reproduce the problem.
- Some Android devices don't support current measurement with BatteryManager API. Legacy support is being developed
- Power Indicator is not working properly, see issue
Please read through our contributing guidelines. Included are directions for opening issues, coding standards and development process.
Code of Conduct
GreenHub has adopted a code of conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.
Copyright (c) 2017 Hugo Matalonga & João Paulo Fernandes.
The code is available under the Apache 2.0 License unless otherwise stated in the file or by a dependency's license file.
GreenHub was originally inspired by and has used data definitions from:
- https://github.com/carat-project/carat-android - Copyright (c) 2011-2016, AMP Lab and University of Helsinki All rights reserved.
It uses battery percentage icons from the project: