- apks: Compiled and signed apks for testing on device
- apps: Source code of the apps under test and instrumentation
- instrumentation: UIAutomator Android app
- contactapp-native: Android native implementation of app
- contactapp-react-native: React native implementation of app
- contactapp-stencil: Stencil/Ionic/Capacitor implementation of app
- contactapp-flutter: Flutter implementation of app
- data: raw data measured with batterystats
- figures: generated figures for paper
- helper: python helper functions, e.g. for using
adborbatterystats - Analysis.ipynb: Notebook with statistical analysis and generation of figures
- prepare.py: Setup script for preparing a connected device
- start_battery_test.py: Script to start the complete battery test on a connected device
- start_single_battery_test.py Script to start a single app battery test on a connected device
- The project is using Python 3
- Inside the project folder
python -m venv venvorvirtualenv venvcreates a virtual environment ./venv/Scripts/activateactivates the virtual environment (Windows 10)- Install all project dependencies with
pip install -r requirements.txtwithin an active virtual environment
- connect mobile device via USB cable to computer
- get IP-address form mobile device:
adb shell ip addressand search forwlan0 - enable port 7777 for tcp/ip connection mode
adb tcpip 7777on mobile device - connect to mobile device via Wi-Fi:
adb connect "IP-ADDRESS":7777 - unplug USB cable from mobile device
The latest release of the apps under test and the instrumentations are compiled and signed in the folder apk. To install all apps inside the apk folder run the prepare.py script. This requires an adb connected device.
> python prepare.pyIn order to test the apps, test entries must be created inside the app.
The PWA is deployed here and must be installed with Chrome and Firefox on the respective device.
This requires that the device is connected via Wi-Fi and the IP-ADDRESS is known. See Connect adb via Wi-Fi above for connecting to device.
> python start_battery_test.py -i IP-ADDRESSInside an active virtual environment the notebook can be run with jupyter notebook. Inside Jupyter open the Analysis.ipynb notebook.

