blob: dbf9ed213ebc34305f868c84e25a79c7a086089a [file] [log] [blame]
Joe Onorato4a64bde2009-06-25 23:53:29 -04001#!/bin/bash
2
3#adb kill-server
4
5# set the transport
6adb shell bmgr transport 1
7
8# load up the three files
9adb shell "rm /data/data/com.android.backuptest/files/* ; \
10 mkdir /data/data/com.android.backuptest ; \
11 mkdir /data/data/com.android.backuptest/files ; \
Joe Onoratodc355a92009-06-26 14:45:25 -040012 mkdir /data/data/com.android.backuptest/shared_prefs ; \
13 echo -n \"<map><int name=\\\"pref\\\" value=\\\"1\\\" /></map>\" > /data/data/com.android.backuptest/shared_prefs/raw.xml ; \
Joe Onorato4a64bde2009-06-25 23:53:29 -040014 echo -n first file > /data/data/com.android.backuptest/files/file.txt ; \
15 echo -n asdf > /data/data/com.android.backuptest/files/another_file.txt ; \
16 echo -n 3 > /data/data/com.android.backuptest/files/3.txt ; \
Joe Onoratoaae628b2009-06-26 12:57:45 -040017 echo -n "" > /data/data/com.android.backuptest/files/empty.txt ; \
Joe Onorato4a64bde2009-06-25 23:53:29 -040018"
19
20# say that the data has changed
21adb shell bmgr backup com.android.backuptest
22
23# run the backup
24adb shell bmgr run
Joe Onoratodc355a92009-06-26 14:45:25 -040025
26
27