summaryrefslogtreecommitdiffstats
path: root/tests/backup/test_backup.sh
blob: f6c73d855833b3afb10e96e8d63db6d3224e5b71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

#adb kill-server

# set the transport
adb shell bmgr transport 1

# load up the three files
adb shell "rm /data/data/com.android.backuptest/files/* ; \
           mkdir /data/data/com.android.backuptest ; \
           mkdir /data/data/com.android.backuptest/files ; \
           echo -n first file > /data/data/com.android.backuptest/files/file.txt ; \
           echo -n asdf > /data/data/com.android.backuptest/files/another_file.txt ; \
           echo -n 3 > /data/data/com.android.backuptest/files/3.txt ; \
"

# say that the data has changed
adb shell bmgr backup com.android.backuptest

# run the backup
adb shell bmgr run