Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/autonome/fxos-scripts. some utility scripts for Firefox OS in my ~/bin dir
Something went wrong. Try again.
fxos-scripts backup
1.1 kB · 33 lines
at master
12345678910111213141516171819202122232425262728293031323334#!/bin/bash
if [ ${BACKUP_PATH:+x} ]then echo "BACKUP_PATH set to ${BACKUP_PATH}" backupDir=$BACKUP_PATH oldBackupDir=$BACKUP_PATH + '.bak'else backupDir=~/Dropbox/b2g/nexus4-backup oldBackupDir=~/Dropbox/b2g/nexus4-backup.bakfi
adb shell stop b2grm -rf "$oldBackupDir"mv "$backupDir" "$oldBackupDir"mkdir "$backupDir"adb pull /data/misc/wifi/wpa_supplicant.conf "$backupDir/wpa_supplicant.conf"adb pull /data/local/storage "$backupDir/local/storage"adb pull /data/local/OfflineCache "$backupDir/local/OfflineCache"adb pull /data/local/permissions.sqlite "$backupDir/local/"adb pull /data/local/ua-update.json "$backupDir/local/"
mkdir "$backupDir/local/webapps"
adb shell 'ls /data/local/webapps' | grep -v 'gaiamobile.org\|marketplace\|{8e3836c7-70af-4f76-b25b-19e1d3b33f1c}\|{93e9343d-22c8-4cfa-b5e3-ef7f709c8151}' | while read -r line ; do file=`echo -e $line | tr -d "\r\n"`; # osx fix! ghhrrr :@ :( adb pull "/data/local/webapps/$file" "$backupDir/local/webapps/$file"done
adb pull /data/b2g "$backupDir/b2g"adb pull /sdcard/ "$backupDir/sdcard"adb shell start b2g