Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

restore files from system directory to android

This also remounts /system partition rw
  • Loading branch information...
commit 13603e39f99ff0438bbe89a460fd9516dd5346a7 1 parent 753f0a2
@dpavlin authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 restore-system.sh
View
16 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
Please sign in to comment.
Something went wrong with that request. Please try again.