-
Notifications
You must be signed in to change notification settings - Fork 3
/
restore
executable file
·31 lines (24 loc) · 945 Bytes
/
restore
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
if [ ${BACKUP_PATH+x} ]
then
echo "BACKUP_PATH set to ${BACKUP_PATH}"
backupDir=$BACKUP_PATH
else
backupDir=~/Dropbox/b2g/nexus4-backup
fi
adb shell stop b2g
sleep 5
adb push "$backupDir/wpa_supplicant.conf" /data/misc/wifi/wpa_supplicant.conf
adb shell chown wifi:wifi /data/misc/wifi/wpa_supplicant.conf
adb push "$backupDir/local/storage" /data/local/storage
adb push "$backupDir/local/OfflineCache" /data/local/OfflineCache
adb push "$backupDir/local/permissions.sqlite" /data/local/permissions.sqlite
adb push "$backupDir/local/ua-update.json" /data/local/ua-update.json
for f in `ls "$backupDir/local/webapps"`; do
adb push "$backupDir/local/webapps/$f" "/data/local/webapps/$f"
done
# remove any existing profiles (probably because you just flashed, so there's an empty one)
adb shell rm -rf /data/b2g/mozilla
adb push "$backupDir/b2g" /data/b2g
adb push "$backupDir/sdcard" /sdcard
adb shell start b2g