diff --git a/README.md b/README.md index dd864d7098da4f0085f7cffc9e6e452ee4bc1625..feac42a9d91d58e677cca2d7a23057ee3c261fac 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,9 @@ convenient way to do so is by using [_adb_](https://developer.android.com/studio/command-line/adb). Note that your smartphone needs to be rooted for this. +You can either use the script at +[tools/copy-db-from-android.sh](tools/copy-db-from-android.sh) or do it manually: + 1. Start _briar-gtk_ and register a dummy account. This will create the needed directory structure at _~/.briar/_. Close the program afterwards. 2. Enable _adb_ on your smartphone and give it root permissions. diff --git a/tools/copy-db-from-android.sh b/tools/copy-db-from-android.sh new file mode 100755 index 0000000000000000000000000000000000000000..1056cfe4d969fdd3ec6b2104f74a6a23bcd94966 --- /dev/null +++ b/tools/copy-db-from-android.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# Copyright (c) 2019 Nico Alt +# SPDX-License-Identifier: AGPL-3.0-only +# License-Filename: LICENSE.md + +# Script to copy Briar database from Android to Linux devices. +# Note that you must have started Briar GTK beforehand. +# It's also recommend to manually start adb before using this script. + +set -e -x + +# List devices +adb devices + +# Switch to root mode +adb root + +# Copy files +adb pull /data/data/org.briarproject.briar.android/app_db/db.mv.db ~/.briar/db/ +adb pull /data/data/org.briarproject.briar.android/app_key/db.key ~/.briar/key/ +adb pull /data/data/org.briarproject.briar.android/app_key/db.key.bak ~/.briar/key/