Skip to content

Commit

Permalink
restore files from system directory to android
Browse files Browse the repository at this point in the history
This also remounts /system partition rw
  • Loading branch information
dpavlin committed Oct 13, 2010
1 parent 753f0a2 commit 13603e3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions restore-system.sh
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh -x

remount_path() {
adb shell df $1 | grep /dev/ | tr -d '\r' | \
awk '{ print "mount -o remount,'$2' "$1" "$6 }' | xargs -i adb shell {}
}

find system -type f -print | while read FILE ; do
dir=`dirname $FILE`
name=`basename $FILE`
echo "# $FILE -> $dir $name"
remount_path $dir rw
dev=`adb shell df system/etc/init.d/ | grep /dev/`
adb push $FILE $dir
remount_path $dir ro
done

0 comments on commit 13603e3

Please sign in to comment.