[Galaxy S III Mini General] KrRain:
Hey all.

Tools I used for flashing and backup:

on PC linux box:

- heimdall - which does the flashing

- netcat - (nc, ncat or netcat) tool for writing to or reading from network.

- partx - assigns partitioned disk images as kernel's loop devices like: loop0p2...loop0p25

on s3 mini:

- busybox

- "Rooted SSH/SFTP Daemon"

Before rooting reboot the phone to the download mode and download

the pit file with:

heimdall download-pit --output goldenxx.pit --no--reboot

Root your phone and install busybox and ssh daemon on it.

Start sshd but close all other apps to keep filesystem activity so low as possible.

start netcat on your PC:

netcat -l 192.168.0.11 5050 > mmcblk0.gz

Now netcat is listening for input from your lan (Replace address to corresponding your PC's IP address)

Now try to connect to your phone with ssh. When you got an # prompt then:

sync

and send your whole internal storage from phone to your PC:

cat /dev/block/mmcblk0 | gzip | nc 192.168.0.11 5050

Do not start any apps on your phone before you got back the command prompts both on phone and PC.

when you got a command prompt again and no error messages was printed. you should have an

gzip compressed disk image of you phones mmc on your PC.

Check its integrity running

gzip -t mmcblk0.gz

If the package is ok, copy the goldenxx.pit and mmcblk0.gz to the sure location.

Now you can make an uncompressed copy of mmcblk0.gz for example:

zcat Backup/mmcblk0.gz > ~/mmcblk0

With partx you can use the image like any other partitioned disks running as root:

partx -v -a ~/mmcblk0

it should print something like this:

partition: none, disk: mmcblk0, lower: 0, upper: 0
Trying to use '/dev/loop0' for the loop device
/dev/loop0: partition table type 'gpt' detected
/dev/loop0: partition #2 added
/dev/loop0: partition #3 added
/dev/loop0: partition #4 added
...
/dev/loop0: partition #25 added

and print out the data of partitions associated within kernel:

partx -s ~/mmcblk0

3 1024 3071 2048 1M PIT 52444e41-494f-2044-5049-540000000000
4 6144 8191 2048 1M MD5HDR 52444e41-494f-2044-4d44-354844520000
5 8192 9215 1024 512K STEboot1 52444e41-494f-2044-5354-45626f6f7431
6 9216 10239 1024 512K STEboot2 52444e41-494f-2044-5354-45626f6f7432
7 10240 11263 1024 512K Dnt 52444e41-494f-2044-446e-740000000000
8 11264 12287 1024 512K reserved 52444e41-494f-2044-7265-736572766564
9 16384 18431 2048 1M CSPSAFS 52444e41-494f-2044-4353-505341465300
10 18432 20479 2048 1M CSPSAFS2 52444e41-494f-2044-4353-505341465332
11 20480 53247 32768 16M EFS 52444e41-494f-2044-4546-530000000000
12 53248 86015 32768 16M ModemFS 52444e41-494f-2044-4d6f-64656d465300
13 86016 118783 32768 16M ModemFS2 52444e41-494f-2044-4d6f-64656d465332
14 118784 221183 102400 50M Fota 52444e41-494f-2044-466f-746100000000
15 380928 381055 128 64K IPL Modem 52444e41-494f-2044-4950-4c204d6f6465
16 385024 413695 28672 14M Modem 52444e41-494f-2044-4d6f-64656d000000
17 417792 421887 4096 2M Loke4 52444e41-494f-2044-4c6f-6b6534000000
18 421888 425983 4096 2M 2ndLoke4 52444e41-494f-2044-326e-644c6f6b6534
19 425984 458751 32768 16M PARAM 52444e41-494f-2044-5041-52414d000000
20 458752 491519 32768 16M Kernel 52444e41-494f-2044-4b65-726e656c0000
21 491520 524287 32768 16M Kernel2 52444e41-494f-2044-4b65-726e656c3200
22 524288 2981887 2457600 1.2G SYSTEM 52444e41-494f-2044-5359-5354454d0000
23 2981888 4702207 1720320 840M CACHEFS 52444e41-494f-2044-4341-434845465300
24 4702208 5357567 655360 320M HIDDEN 52444e41-494f-2044-4849-4444454e0000
25 5357568 15249407 9891840 4.7G DATAFS 52444e41-494f-2044-4441-544146530000

now you can explore the partitions and make images of it. For example:

file -s /dev/loop0p11

/dev/loop0p11: Linux rev 1.0 ext4 filesystem data, UUID=1b70457a-e011-c65a-87c6-f346bd874821, volume name "efs" (extents) (large files)

cat /dev/loop0p11 > ~/efs.ext4

and...

file -s /dev/loop0p16

/dev/loop0p16: data

It is modem.bin so:

cat /dev/loop0p16 > ~/modem.bin

Note that ext4 images must be transformed to the right .img-file form with ext2simg tool before flashing.

Be careful before flash your phone with these files.

remember to unmount all /dev/loop0 -partitions and finally

partx -d /dev/loop0
losetup -d /dev/loop0

because the images was copied from running system,

all writeable filesystems are not clean. So you might want to e2fsck these partitions.