Joe Onorato | 4a64bde | 2009-06-25 23:53:29 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | #adb kill-server |
| 4 | |
| 5 | # set the transport |
| 6 | adb shell bmgr transport 1 |
| 7 | |
| 8 | # load up the three files |
| 9 | adb shell "rm /data/data/com.android.backuptest/files/* ; \ |
| 10 | mkdir /data/data/com.android.backuptest ; \ |
| 11 | mkdir /data/data/com.android.backuptest/files ; \ |
| 12 | echo -n first file > /data/data/com.android.backuptest/files/file.txt ; \ |
| 13 | echo -n asdf > /data/data/com.android.backuptest/files/another_file.txt ; \ |
| 14 | echo -n 3 > /data/data/com.android.backuptest/files/3.txt ; \ |
| 15 | " |
| 16 | |
| 17 | # say that the data has changed |
| 18 | adb shell bmgr backup com.android.backuptest |
| 19 | |
| 20 | # run the backup |
| 21 | adb shell bmgr run |