[T-Mobile Samsung Galaxy S7 Questions & Answers] m0d hipp¥:
Not sure if this has been posted before, so I apologize in advance if that's the case, but I was hoping I could get some insight on how to create a flashable tar file for ODIN.

I have been researching this for a few weeks, and this site is my #1 resource for information, so I would just like to give out a huge shout out to everyone that helps out on here with your tuts, files, and your knowledge.

Here is an overview of what I am working with.

I have a SM-G930T phone - Tmobile Carrier

It is unrooted using the eng boot file and "SuperSU-v2.76-S7QC"

I am running Android 6.0.1

Baseband: G930TUVU1APG1

Kernel: 3.18.20-7856276-eng

Build #: MMB29M.G930TUVU1APG1

What I'm trying to accomplish.

I am able to make a dump of the system through ADB shell using this information:

root@heroqltetmo:/ # ls -al /dev/block/bootdevice/by-name
lrwxrwxrwx root root 2016-01-08 10:35 aboot -> /dev/block/sdd10
lrwxrwxrwx root root 2016-01-08 10:35 apdp -> /dev/block/sdd17
lrwxrwxrwx root root 2016-01-08 10:35 apnhlos -> /dev/block/sda15
lrwxrwxrwx root root 2016-01-08 10:35 bluetooth -> /dev/block/sdd12
lrwxrwxrwx root root 2016-01-08 10:35 boot -> /dev/block/sda17
lrwxrwxrwx root root 2016-01-08 10:35 bota -> /dev/block/sda12
lrwxrwxrwx root root 2016-01-08 10:35 cache -> /dev/block/sda21
lrwxrwxrwx root root 2016-01-08 10:35 cmnlib -> /dev/block/sdd15
lrwxrwxrwx root root 2016-01-08 10:35 cmnlib64 -> /dev/block/sdd16
lrwxrwxrwx root root 2016-01-08 10:35 ddr -> /dev/block/sdd20
lrwxrwxrwx root root 2016-01-08 10:35 devcfg -> /dev/block/sda10
lrwxrwxrwx root root 2016-01-08 10:35 devinfo -> /dev/block/sdd11
lrwxrwxrwx root root 2016-01-08 10:35 dip -> /dev/block/sdd8
lrwxrwxrwx root root 2016-01-08 10:35 dpo -> /dev/block/sdd19
lrwxrwxrwx root root 2016-01-08 10:35 dsp -> /dev/block/sdd7
lrwxrwxrwx root root 2016-01-08 10:35 efs -> /dev/block/sda6
lrwxrwxrwx root root 2016-01-08 10:35 fota -> /dev/block/sda13
lrwxrwxrwx root root 2016-01-08 10:35 frp -> /dev/block/sda11
lrwxrwxrwx root root 2016-01-08 10:35 fsc -> /dev/block/sda3
lrwxrwxrwx root root 2016-01-08 10:35 fsg -> /dev/block/sdd4
lrwxrwxrwx root root 2016-01-08 10:35 hyp -> /dev/block/sdd3
lrwxrwxrwx root root 2016-01-08 10:35 keymaster -> /dev/block/sdd14
lrwxrwxrwx root root 2016-01-08 10:35 keystore -> /dev/block/sda9
lrwxrwxrwx root root 2016-01-08 10:35 lksecapp -> /dev/block/sdd13
lrwxrwxrwx root root 2016-01-08 10:35 mdtp -> /dev/block/sdd9
lrwxrwxrwx root root 2016-01-08 10:35 misc -> /dev/block/sda8
lrwxrwxrwx root root 2016-01-08 10:35 modem -> /dev/block/sda16
lrwxrwxrwx root root 2016-01-08 10:35 modemst1 -> /dev/block/sda1
lrwxrwxrwx root root 2016-01-08 10:35 modemst2 -> /dev/block/sda2
lrwxrwxrwx root root 2016-01-08 10:35 msadp -> /dev/block/sdd18
lrwxrwxrwx root root 2016-01-08 10:35 pad -> /dev/block/sdd21
lrwxrwxrwx root root 2016-01-08 10:35 param -> /dev/block/sda7
lrwxrwxrwx root root 2016-01-08 10:35 persdata -> /dev/block/sda19
lrwxrwxrwx root root 2016-01-08 10:35 persist -> /dev/block/sda5
lrwxrwxrwx root root 2016-01-08 10:35 persistent -> /dev/block/sda14
lrwxrwxrwx root root 2016-01-08 10:35 pmic -> /dev/block/sdd6
lrwxrwxrwx root root 2016-01-08 10:35 recovery -> /dev/block/sda18
lrwxrwxrwx root root 2016-01-08 10:35 rpm -> /dev/block/sdd1
lrwxrwxrwx root root 2016-01-08 10:35 sec -> /dev/block/sdd5
lrwxrwxrwx root root 2016-01-08 10:35 ssd -> /dev/block/sda4
lrwxrwxrwx root root 2016-01-08 10:35 system -> /dev/block/sda20
lrwxrwxrwx root root 2016-01-08 10:35 tz -> /dev/block/sdd2
lrwxrwxrwx root root 2016-01-08 10:35 userdata -> /dev/block/sda22
lrwxrwxrwx root root 2016-01-08 10:35 xbl -> /dev/block/sdb1

--------------------------------------------

root@heroqltetmo:/ # cat /proc/partitions
major minor #blocks name

7 0 32768 loop0
8 0 31178752 sda
8 1 1536 sda1
8 2 1536 sda2
8 3 4 sda3
8 4 8 sda4
8 5 32768 sda5
8 6 20480 sda6
8 7 10240 sda7
8 8 1024 sda8
8 9 512 sda9
8 10 128 sda10
8 11 512 sda11
8 12 12288 sda12
8 13 4096 sda13
8 14 1024 sda14
8 15 97280 sda15
259 0 87040 sda16
259 1 77824 sda17
259 2 77824 sda18
259 3 9216 sda19
259 4 5017600 sda20
259 5 307200 sda21
259 7 25417536 sda22
8 16 4096 sdb
8 17 3072 sdb1
8 32 4096 sdc
8 33 3072 sdc1
8 48 61440 sdd
8 49 512 sdd1
8 50 2048 sdd2
8 51 512 sdd3
8 52 1536 sdd4
8 53 16 sdd5
8 54 512 sdd6
8 55 16384 sdd7
8 56 1024 sdd8
8 57 32768 sdd9
8 58 2048 sdd10
8 59 4 sdd11
8 60 1024 sdd12
8 61 384 sdd13
8 62 256 sdd14
8 63 256 sdd15
259 6 256 sdd16
259 8 128 sdd17
259 9 128 sdd18
259 10 4 sdd19
259 11 1024 sdd20
259 12 572 sdd21
253 0 2097152 vnswap0
179 0 62685184 mmcblk0
179 1 62668800 mmcblk0p1
254 0 25417520 dm-0

-----------------------------------------

root@heroqltetmo:/ # blockdev --getbsz /dev/block/sda20
4096
root@heroqltetmo:/ # blockdev --getsz /dev/block/sda20
10035200
root@heroqltetmo:/ # blockdev --getsize /dev/block/sda20
10035200
root@heroqltetmo:/ # blockdev --getsize64 /dev/block/sda20
5138022400

-----------------------------------------

C:\s7\adb-setup-1.4.3\adb>adb shell
root@heroqltetmo:/ # su
root@heroqltetmo:/ # busybox df -h
Filesystem Size Used Available Use% Mounted on
rootfs 1.5G 8.6M 1.5G 1% /
tmpfs 1.6G 148.0K 1.6G 0% /dev
none 1.6G 12.0K 1.6G 0% /sys/fs/cgroup
tmpfs 1.6G 0 1.6G 0% /mnt
tmpfs 1.6G 0 1.6G 0% /mnt/secure
tmpfs 59.8G 30.2G 29.5G 51% /mnt/secure/asec
/dev/block/bootdevice/by-name/system
4.7G 3.3G 1.3G 72% /system
/dev/block/loop0 27.5M 972.0K 25.9M 4% /system/xbin/su
/dev/block/bootdevice/by-name/efs
15.7M 640.0K 14.6M 4% /efs
/dev/block/bootdevice/by-name/cache
290.6M 2.1M 282.5M 1% /cache
/dev/block/bootdevice/by-name/persist
27.5M 124.0K 26.7M 0% /persist
/dev/block/bootdevice/by-name/dsp
11.7M 4.1M 7.3M 36% /dsp
/dev/block/bootdevice/by-name/apnhlos
70.0M 27.9M 42.1M 40% /firmware
/dev/block/bootdevice/by-name/modem
95.0M 70.3M 24.7M 74% /firmware-modem
/dev/block/bootdevice/by-name/persdata
4.9M 96.0K 4.6M 2% /persdata/absolute
tmpfs 1.6G 0 1.6G 0% /storage
/dev/block/dm-0 23.9G 7.1G 16.8G 30% /data
/dev/block/loop0 27.5M 972.0K 25.9M 4% /su
/data/media 23.9G 7.2G 16.7G 30% /storage/emulated
/data/media 23.9G 7.2G 16.7G 30% /mnt/runtime/default/emulated
/data/media 23.9G 7.2G 16.7G 30% /mnt/runtime/read/emulated
/data/media 23.9G 7.2G 16.7G 30% /mnt/runtime/write/emulated
/dev/block/vold/public:179,1
59.8G 30.2G 29.5G 51% /mnt/media_rw/0123-4567
/dev/block/vold/public:179,1
59.8G 30.2G 29.5G 51% /mnt/secure/asec
/mnt/media_rw/0123-4567
59.8G 30.2G 29.5G 51% /storage/0123-4567
/mnt/media_rw/0123-4567
59.8G 30.2G 29.5G 51% /mnt/runtime/default/0123-4567
/mnt/media_rw/0123-4567
59.8G 30.2G 29.5G 51% /mnt/runtime/read/0123-4567
/mnt/media_rw/0123-4567
59.8G 30.2G 29.5G 51% /mnt/runtime/write/0123-4567

dd if=/dev/block/sda20 of=/sdcard/system.img

OR

dd if=/dev/block/bootdevice/by-name/system of=/sdcard/system.img

Both work great, but this img that is dumped isn't ODIN flashable if I put it into a tar file.

Now I was reading it has to be converted using "img2simg"

So I did that.

I tried several variation of that:

img2simg system.img system.img.ext4

img2simg system.img system.img.ext4 4096 <-- being the block size

I also tried using ext2simg

ext2simg system.img system.img.ext4

ext2simg -S system.img system.img.ext4

I've tried using the tools provided in "ANDROID_IMG_REPACK_TOOLS_CYGWIN_x64-86_6.0.1"

I have also tried doing it manually through CYGWIN directly.

At one point it looked like everything was going through properly in ODIN.

I created a tar file and then added the md5 checksum

and when I flashed it in ODIN, it was uploading the file and it got to the end and then I got a error. I can't remember what it was, I think it had something to do with wrong file version or something. My guess is that the system.img.ext4 file doesn't have the correct "header" or something in there that validates it properly.

Any way, I'm hoping someone can guide me through this. I know that there are roms available that are zip format, but I'd like to learn to do this on my own and ideally through an ODIN flashable file if possible.

Thanks in advance for your help.