-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restore files from system directory to android
This also remounts /system partition rw
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |