Hello girls and boys,
I've successfully backed up Stock ROM. Here is how.
Since recovery could not mount /system and /data, I researched a bit and found out that when system is booted, it mounts /system and /data like this:
Code:
[B]/dev/stl12[/B] on /system type rfs (ro,relatime,vfat,log_off,check=no,gid/uid/rwx,iocharset=utf8)
[B]/dev/stl13[/B] on /data type rfs (rw,nosuid,nodev,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8)
I presume that recovery tries to do the same, e.g. to mount /system and /data like:
Code:
mount /dev/stl12 /system
mount /dev/stl13 /data
And this
will not work, since there is no stl12 and stl13 block in /dev location.
I used find command from adb shell in recovery and figured out that stl12 and stl13 blocks are in
/dev/block/ instead of /dev.
So I mounted /system and /data from adb shell in recovery like this:
Code:
mount /dev/block/stl12 /system
mount /dev/block/stl13 /data
Then from recovery menu, successfully backed up stock ROM!
Steps:
0. Connect USB cable with PC (Drivers must be installed if on Windows machine)
1. Boot to recovery
2. Mount /system and /data like this from PC command line:
Code:
adb shell
mount /dev/block/stl12 /system
mount /dev/block/stl13 /data
3. From recovery menu, select backup,wait to finish.
Didn't try to restore, however, backup is created:
Code:
/sdcard/clockworkmod/backup/2012-04-07.15.23.19 # pwd
pwd
/sdcard/clockworkmod/backup/2012-04-07.15.23.19
/sdcard/clockworkmod/backup/2012-04-07.15.23.19 # ls -all
ls -all
drwxrwxrwx 2 root root 4096 Apr 7 15:26 .
drwxrwxrwx 3 root root 4096 Apr 7 15:27 ..
-rwxrwxrwx 1 root root 87519232 Apr 7 15:25 .android_secure.vfat.tar
-rwxrwxrwx 1 root root 8388608 Apr 7 15:23 boot.img
-rwxrwxrwx 1 root root 23040 Apr 7 15:25 cache.ext4.tar
-rwxrwxrwx 1 root root 81673728 Apr 7 15:24 data.vfat.tar
-rwxrwxrwx 1 root root 346 Apr 7 15:26 nandroid.md5
-rwxrwxrwx 1 root root 8388608 Apr 7 15:23 recovery.img
-rwxrwxrwx 1 root root 2048 Apr 7 15:25 sd-ext.ext4.tar
-rwxrwxrwx 1 root root 203654144 Apr 7 15:24 system.vfat.tar
/sdcard/clockworkmod/backup/2012-04-07.15.23.19 #
@ TJ_Style, can you modify recovery binaries so it mounts /system and /data like I described above?
Cheers!