UnSIN with super images

Download .ftf using e.g. xperifirm (built into FlashTool)

Extract .ftf using e.g. unzip (ftf format is just a zip file)

Use UnSIN in version 1.13 or higher to convert the .sin image to a raw image:

$ unsin super_X-FLASH-ALL-2389.sin
# Extracting sparse files from SIN... Done!
# Restoring image from sparse files... Done!
# Successfully restored image to /path/to/super_X-FLASH-ALL-2389.img

You need version 1.13 since versions prior to not support super images.

v1.13 (May 20, 2020):
Added support for super.sin images. (Note: those have to be further unpacked using lpunpack into individual partition images)

The resulting image is a special type of archive.

$ file super_X-FLASH-ALL-2389.img
super_X-FLASH-ALL-2389.img: data

Use 7-zip to extract the super image. Note the type #.

$ 7z l -t# super_X-FLASH-ALL-2389.img

7-Zip [64] 17.03 : Copyright (c) 1999-2020 Igor Pavlov : 2017-08-28
p7zip Version 17.03 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs x64)

Scanning the drive for archives:
1 file, 4776710144 bytes (4556 MiB)

Listing archive: super_X-FLASH-ALL-2389.img

--
Path = super_X-FLASH-ALL-2389.img
Type = #

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
                    .....      1048576      1048576  1
2020-12-16 18:33:47 .....   1993469952   1993469952  2.ext
                    .....     32378880     32378880  3
2020-12-16 18:33:47 .....    359301120    359301120  4.ext
                    .....      6651904      6651904  5
2020-12-16 18:33:47 .....   1527484416   1527484416  6.ext
                    .....     25456640     25456640  7
2020-12-16 18:33:47 .....    815681536    815681536  8.ext
                    .....     13742080     13742080  9
2020-12-16 18:33:47 .....      1388544      1388544  10.ext
                    .....       106496       106496  11
------------------- ----- ------------ ------------  ------------------------
2020-12-16 18:33:47         4776710144   4776710144  11 files

Extract to directory super-ex:

7z x -t# -osuper-ex super_X-FLASH-ALL-2389.img

7-Zip [64] 17.03 : Copyright (c) 1999-2020 Igor Pavlov : 2017-08-28
p7zip Version 17.03 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs x64)

Scanning the drive for archives:
1 file, 4776710144 bytes (4556 MiB)

Extracting archive: super_X-FLASH-ALL-2389.img
--         
Path = super_X-FLASH-ALL-2389.img
Type = #

Everything is Ok

Files: 11
Size:       4776710144
Compressed: 4776710144
$ file super-ex/*
1:      data
10.ext: Linux rev 1.0 ext2 filesystem data, UUID=7b049680-6af1-5082-b7f5-6a108526cc22, volume name "odm" (extents) (large files) (huge files)
11:     data
2.ext:  Linux rev 1.0 ext2 filesystem data, UUID=f3e365b4-f1d6-54b8-ab22-40687fce6f50 (extents) (large files) (huge files)
3:      data
4.ext:  Linux rev 1.0 ext2 filesystem data, UUID=590ed6e4-782b-5389-a789-83620e9391a0, volume name "system" (extents) (large files) (huge files)
5:      data
6.ext:  Linux rev 1.0 ext2 filesystem data, UUID=cd6e0645-b846-55f7-9c6b-75edaf2b3709, volume name "product" (extents) (large files) (huge files)
7:      data
8.ext:  Linux rev 1.0 ext2 filesystem data, UUID=093d149d-5e86-5459-90e2-d7df2e357daf, volume name "vendor" (extents) (large files) (huge files)
9:      data

Mount desired image:

$ udisksctl loop-setup -r -f 8.ext
$ ls -la /run/media/user/vendor/

total 180K
drwxr-xr-x  19 root root 4,0K 16. Dez 18:33 ./
drwxr-x---+  3 root root   60 22. Feb 11:07 ../
drwxr-xr-x  10 root 2000 4,0K 16. Dez 18:33 app/
drwxr-x--x   4 root 2000 8,0K 16. Dez 18:33 bin/
drwxr-xr-x   2 root 2000 4,0K 16. Dez 18:33 bt_firmware/
drwxr-xr-x   7 root 2000 4,0K 16. Dez 18:33 camera/
drwxr-xr-x   3 root 2000 4,0K 16. Dez 18:33 charge/
drwxr-xr-x   2 root 2000 4,0K 16. Dez 18:33 dsp/
drwxr-xr-x  27 root 2000 8,0K 16. Dez 18:33 etc/
drwxr-xr-x   4 root 2000 4,0K 16. Dez 18:33 firmware/
drwxr-xr-x   2 root 2000 4,0K 16. Dez 18:33 firmware_mnt/
drwxr-xr-x   3 root 2000 4,0K 16. Dez 18:33 framework/
drwxr-xr-x  12 root 2000  24K 16. Dez 18:33 lib/
drwxr-xr-x  10 root 2000  24K 16. Dez 18:33 lib64/
drwx------   2 root root  16K 16. Dez 18:33 lost+found/
drwxr-xr-x   5 root 2000 4,0K 16. Dez 18:33 overlay/
drwxr-xr-x   3 root 2000 4,0K 16. Dez 18:33 radio/
drwxr-xr-x   5 root 2000 4,0K 16. Dez 18:33 rfs/
drwxr-xr-x   3 root 2000 4,0K 16. Dez 18:33 usr/
-rw-------   1 root root  11K 16. Dez 18:33 build.prop
-rw-------   1 root root  974 16. Dez 18:33 default.prop
lrw-r--r--   1 root root    4 16. Dez 18:33 odm -> /odm
-rw-r--r--   1 root root  28K 16. Dez 18:33 ueventd.rc

Alternatives

See Tool: Unpack any Sony firmware file (from GitHub).

Published by

Edit source on Github