This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Export Qardio heartbeat measurements to a local CSV file. | |
set -eux -o pipefail | |
adb shell "echo cp /data/data/com.getqardio.android/databases/qardio.db /mnt/sdcard/ \| su" | |
adb shell "echo chmod 777 /mnt/sdcard/qardio.db \| su" | |
adb pull /mnt/sdcard/qardio.db | |
echo -e '.mode csv\nSELECT * FROM measurements;' \ | |
| sqlite3 qardio.db | tee qardio.csv |
NewerOlder