[Sony Cross-Device General] cee43ja1:
------------------------------------------------------------------------
Trim Area PoC kernel image patcher by Munjeni @ 2017
------------------------------------------------------------------------

hash:0x655AFB58 calc_hash:0x655AFB58
hash:0x120E966D calc_hash:0x120E966D
hash:0x68A3FBC0 calc_hash:0x68A3FBC0
hash:0xE81278DE calc_hash:0xE81278DE
device: F8331
serial number: [COLOR="Red"]EDITED[/COLOR]
drm key: [COLOR="red"]EDITED[/COLOR]
Trim area dump is a valid.
Locked bootloader.
Deleting old folder ramdisk if exist...
if exist ramdisk (rd ramdisk /s/q)
returned: 0.
New directory ramdisk created.
Created ouput folder "out"
opening boot.img
boot.img is Android image format.
Dumping to out...
BOARD_KERNEL_CMDLINE androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x23
7 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=16M@0-0xffffffff coherent_pool
=2M enforcing=0
BOARD_KERNEL_BASE 80000000
BOARD_NAME
BOARD_PAGE_SIZE 4096
BOARD_KERNEL_OFFSET 00008000
BOARD_RAMDISK_OFFSET 02200000
BOARD_SECOND_OFFSET 00f00000
BOARD_TAGS_OFFSET 02000000
Done.
No file exist out/boot.img.elf .
Gunziping...
setting up infflate...
infflating...
infflate returned: 0
gzpipe: ok.
unziped: ok.
Extracting ramdisk.cpio...
Runing user script...

Making ramdisk/stufs/bin folder

Found android version equal or greater than Marchmalow.

Making ramdisk/stufs/bin/ta script

Making ramdisk/stufs/bin/busybox

Found string in ramdisk/init.sony-platform.rc@0750
patching ramdisk/init.sony-platform.rc@0750

installing ramdisk/stufs/TA.img

Found string in ramdisk/init.rc@0750
patching ramdisk/init.rc@0750

Found binary ramdisk/file_contexts.bin@0644
converting ramdisk/file_contexts.bin@0644 to plaintext file_contexts
converting plaintext file_contexts to binary ramdisk/file_contexts.bin@0644

Patching ramdisk/sepolicy@0644
seinjecting: ramdisk/sepolicy@0644, saving to: ramdisk/sepolicy@0644, source_typ
e: init, target_type: rootfs
libsepol.policydb_index_others: security: 1 users, 2 roles, 1389 types, 0 bools

libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security: 63 classes, 18249 rules, 0 cond rules

Success
seinjecting: ramdisk/sepolicy@0644, saving to: ramdisk/sepolicy@0644, source_typ
e: init, target_type: tad
libsepol.policydb_index_others: security: 1 users, 2 roles, 1389 types, 0 bools

libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security: 63 classes, 18249 rules, 0 cond rules

Success
seinjecting: ramdisk/sepolicy@0644, saving to: ramdisk/sepolicy@0644, source_typ
e: init, target_type: shell_data_file
libsepol.policydb_index_others: security: 1 users, 2 roles, 1389 types, 0 bools

libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security: 63 classes, 18250 rules, 0 cond rules

Success
seinjecting: ramdisk/sepolicy@0644, saving to: ramdisk/sepolicy@0644, source_typ
e: init, target_type: shell_data_file
libsepol.policydb_index_others: security: 1 users, 2 roles, 1389 types, 0 bools

libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security: 63 classes, 18250 rules, 0 cond rules

Success
seinjecting: ramdisk/sepolicy@0644, saving to: ramdisk/sepolicy@0644, source_typ
e: tad, target_type: tad
libsepol.policydb_index_others: security: 1 users, 2 roles, 1389 types, 0 bools

libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security: 63 classes, 18250 rules, 0 cond rules

Success
seinjecting: ramdisk/sepolicy@0644, saving to: ramdisk/sepolicy@0644, source_typ
e: tad, target_type: rootfs
libsepol.policydb_index_others: security: 1 users, 2 roles, 1389 types, 0 bools

libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security: 63 classes, 18251 rules, 0 cond rules

Success
seinjecting: ramdisk/sepolicy@0644, saving to: ramdisk/sepolicy@0644, source_typ
e: tad, target_type: rootfs
libsepol.policydb_index_others: security: 1 users, 2 roles, 1389 types, 0 bools

libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security: 63 classes, 18252 rules, 0 cond rules

Success
seinjecting: ramdisk/sepolicy@0644, saving to: ramdisk/sepolicy@0644, source_typ
e: tad, target_type: shell_data_file
libsepol.policydb_index_others: security: 1 users, 2 roles, 1389 types, 0 bools

libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security: 63 classes, 18252 rules, 0 cond rules

Success
seinjecting: ramdisk/sepolicy@0644, saving to: ramdisk/sepolicy@0644, source_typ
e: tad, target_type: shell_data_file
libsepol.policydb_index_others: security: 1 users, 2 roles, 1389 types, 0 bools

libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security: 63 classes, 18253 rules, 0 cond rules

Success
seinjecting: ramdisk/sepolicy@0644, saving to: ramdisk/sepolicy@0644, source_typ
e: tad, target_type: sysfs
libsepol.policydb_index_others: security: 1 users, 2 roles, 1389 types, 0 bools

libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security: 63 classes, 18254 rules, 0 cond rules

Success
seinjecting: ramdisk/sepolicy@0644, saving to: ramdisk/sepolicy@0644, source_typ
e: kernel, target_type: tad
libsepol.policydb_index_others: security: 1 users, 2 roles, 1389 types, 0 bools

libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security: 63 classes, 18255 rules, 0 cond rules

Success
seinjecting: ramdisk/sepolicy@0644, saving to: ramdisk/sepolicy@0644, source_typ
e: kernel, target_type: shell_data_file
libsepol.policydb_index_others: security: 1 users, 2 roles, 1389 types, 0 bools

libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security: 63 classes, 18256 rules, 0 cond rules

Success

Searching for old drmfix and removing...
removing ramdisk/vendor/lib/libdrmfix.so@0766
removing ramdisk/vendor/lib64/libdrmfix.so@0766

bash: can't open 'ramdisk'
script.bat ramdisk ta_poc
returned: 2.
Your script returned non null, please check your script!

Press any key to continue . . .

Still errors at the same area. Although it removed the drmfix this time. If Windows is the cause, I can use my Raspberry Pi 3 with Raspbian Jessie to see if POC will work on there.

Also, XZ partition taken from Terminal Emulator:

F8331:/ $ su
F8331:/ # ls -al /dev/block/bootdevice/by-name
total 0
drwxr-xr-x 2 root root 1140 1970-03-26 22:43 .
drwxr-xr-x 4 root root 1220 1970-03-26 22:43 ..
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 [COLOR="Blue"]FOTAKernel -> /dev/block/mmcblk0p48[/COLOR]
lrwxrwxrwx 1 root root 20 1970-03-26 22:43 LTALabel -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 Qnovo -> /dev/block/mmcblk0p52
lrwxrwxrwx 1 root root 20 1970-03-26 22:43 TA -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 aboot -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 abootbak -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 apdp -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 apps_log -> /dev/block/mmcblk0p50
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 boot -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 cache -> /dev/block/mmcblk0p43
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 cmnlib -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 cmnlib64 -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 cmnlib64bak -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 cmnlibbak -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 ddr -> /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 devcfg -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 devcfgbak -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 devinfo -> /dev/block/mmcblk0p33
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 diag -> /dev/block/mmcblk0p51
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 dpo -> /dev/block/mmcblk0p36
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 dsp -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 frp -> /dev/block/mmcblk0p46
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 fsg -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 20 1970-03-26 22:43 hyp -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 hypbak -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 keymaster -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 keymasterbak -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 keystore -> /dev/block/mmcblk0p45
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 modem -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 modemst1 -> /dev/block/mmcblk0p41
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 modemst2 -> /dev/block/mmcblk0p42
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 msadp -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 oem -> /dev/block/mmcblk0p53
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 persist -> /dev/block/mmcblk0p44
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 pmic -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 pmicbak -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 rdimage -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 20 1970-03-26 22:43 rpm -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 20 1970-03-26 22:43 rpmbak -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 s1sbl -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 s1sblbak -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 sec -> /dev/block/mmcblk0p39
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 splash -> /dev/block/mmcblk0p37
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 ssd -> /dev/block/mmcblk0p40
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 sti -> /dev/block/mmcblk0p47
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 system -> /dev/block/mmcblk0p55
lrwxrwxrwx 1 root root 20 1970-03-26 22:43 tz -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 20 1970-03-26 22:43 tzbak -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 tzs1attest -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 tzs1attestbak -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 tzs1sbl -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 tzs1sblbak -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 1970-03-26 22:43 userdata -> /dev/block/mmcblk0p54
lrwxrwxrwx 1 root root 20 1970-03-26 22:43 xbl -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 20 1970-03-26 22:43 xblbak -> /dev/block/mmcblk0p4

F8331:/ $ su
F8331:/ # cat /proc/partitions
major minor #blocks name
7 0 98304 loop0
254 0 786432 zram0
179 0 30535680 mmcblk0
179 1 2048 mmcblk0p1
179 2 16384 mmcblk0p2
179 3 2048 mmcblk0p3
179 4 2048 mmcblk0p4
179 5 2048 mmcblk0p5
179 6 2048 mmcblk0p6
179 7 500 mmcblk0p7
179 8 500 mmcblk0p8
179 9 512 mmcblk0p9
179 10 512 mmcblk0p10
179 11 512 mmcblk0p11
179 12 512 mmcblk0p12
179 13 1024 mmcblk0p13
179 14 1024 mmcblk0p14
179 15 512 mmcblk0p15
179 16 512 mmcblk0p16
179 17 256 mmcblk0p17
179 18 256 mmcblk0p18
179 19 256 mmcblk0p19
179 20 256 mmcblk0p20
179 21 128 mmcblk0p21
179 22 128 mmcblk0p22
179 23 30720 mmcblk0p23
179 24 30720 mmcblk0p24
179 25 100 mmcblk0p25
179 26 100 mmcblk0p26
179 27 512 mmcblk0p27
179 28 512 mmcblk0p28
179 29 2048 mmcblk0p29
179 30 65536 mmcblk0p30
179 31 97280 mmcblk0p31
259 0 16384 mmcblk0p32
259 1 1 mmcblk0p33
259 2 256 mmcblk0p34
259 3 256 mmcblk0p35
259 4 1 mmcblk0p36
259 5 33424 mmcblk0p37
259 6 1024 mmcblk0p38
259 7 128 mmcblk0p39
259 8 8 mmcblk0p40
259 9 2048 mmcblk0p41
259 10 2048 mmcblk0p42
259 11 262144 mmcblk0p43
259 12 32768 mmcblk0p44
259 13 512 mmcblk0p45
259 14 512 mmcblk0p46
259 15 2048 mmcblk0p47
[COLOR="blue"]259 16 65536 mmcblk0p48[/COLOR]
259 17 32768 mmcblk0p49
259 18 10240 mmcblk0p50
259 19 16384 mmcblk0p51
259 20 20480 mmcblk0p52
259 21 409600 mmcblk0p53
259 22 23298048 mmcblk0p54
259 23 6051840 mmcblk0p55
179 32 4096 mmcblk0rpmb
179 64 124868608 mmcblk1
179 65 124852224 mmcblk1p1