projects
/
android-command-line.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
753f0a2
)
restore files from system directory to android
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 13 Oct 2010 15:42:46 +0000
(17:42 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 13 Oct 2010 15:42:46 +0000
(17:42 +0200)
This also remounts /system partition rw
restore-system.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/restore-system.sh
b/restore-system.sh
new file mode 100755
(executable)
index 0000000..
301ec3d
--- /dev/null
+++ b/
restore-system.sh
@@ -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