yashsingh1/xdaforums huggingface dataset:
[Sony Xperia M] TomekParuszewski:
thank you for your words of encouragement - I'm gonna fight to the end :)

BTW - in time when i'm waiting to output for command mount /data from recovery, I have access to the phone via adb (but it's normal after all, i suppose)
[Sony Xperia M] TomekParuszewski:
yes, most of them i've seen, thx
[Sony Xperia M] Bonoboo:
Just info :

Re-partition method not available for now.

Maybe when flashing via flashtool keep tick only on partition-image.sin restore stock.

There is some method to erase internal memory via adb, but it for other model.

And I don't know will it help here.

Questions:

1. So your device not was encrypted, right?

2. Try mounts and storage > format all

3. Try mount via menu in recovery
[Sony Xperia M] TomekParuszewski:
Answers:

If i'm wait long enough, phone boot to screen "Encryption unsuccessful", so i don't know - I do not encrypt the phone as I remember

Sorry, of course there is format command in recovery, my bad

I will try again and write exact message from the screen
[Sony Xperia M] Bonoboo:
Sorry for messing numbers, I edited post.

Seems not. Reboot.

Try formatting.

Just note about adb output earlier.

ls shows temporary FS that recovery creates in RAM.

By fact blocks devices in /dev/block/ and we can do something with them, like recreate partitions using mke2fs

Or erase them by dd if=/dev/zero

Try commands:

cat /proc/partitions

mount

fdisk -l /dev/block/mmcblk0p17

fdisk -l /dev/block/mmcblk0p5

And try flashing via flashtool:

– untick wipe data and cache

– tick all in Exclude section except partition

Here useful commands (similar problem for Samsung, restoring partition table helps)

And here list of all our partitions relatively number:

FOTAKernel -> /dev/block/mmcblk0p23

LTALabel -> /dev/block/mmcblk0p16

TA -> /dev/block/mmcblk0p1

aboot -> /dev/block/mmcblk0p6

alt_aboot -> /dev/block/mmcblk0p12

alt_rpm -> /dev/block/mmcblk0p15

alt_s1sbl2 -> /dev/block/mmcblk0p10

alt_sbl1 -> /dev/block/mmcblk0p8

alt_sbl2 -> /dev/block/mmcblk0p9

alt_sbl3 -> /dev/block/mmcblk0p11

alt_tz -> /dev/block/mmcblk0p13

boot -> /dev/block/mmcblk0p17

cache -> /dev/block/mmcblk0p26

fsg -> /dev/block/mmcblk0p21

modem -> /dev/block/mmcblk0p18

modemst1 -> /dev/block/mmcblk0p19

modemst2 -> /dev/block/mmcblk0p20

persist -> /dev/block/mmcblk0p24

ramdump -> /dev/block/mmcblk0p22

rpm -> /dev/block/mmcblk0p14

s1sbl2 -> /dev/block/mmcblk0p4

sbl1 -> /dev/block/mmcblk0p2

sbl2 -> /dev/block/mmcblk0p3

sbl3 -> /dev/block/mmcblk0p5

system -> /dev/block/mmcblk0p25

tz -> /dev/block/mmcblk0p7

userdata -> /dev/block/mmcblk0p27
[Sony Xperia M] TomekParuszewski:
If both partitions are incorrect, should I try to flash?
[Sony Xperia M] Bonoboo:
Probably they incorrect due messing up partition table.

Anyway flashing Partition as I wrote before strictly recommended at least to exclude this theory.
[Sony Xperia M] TomekParuszewski:
this is result of your theory ideas

21/044/2014 18:44:16 - INFO - <- This level is successfully initialized

21/044/2014 18:44:16 - INFO - Flashtool Version 0.9.16.0 built on 19-04-2014 19:00:00

21/044/2014 18:44:17 - INFO - Checking if changes have been made to devices folder.

21/044/2014 18:44:25 - INFO - Pulling changes from github

21/044/2014 18:44:26 - INFO - Devices sync finished.

21/044/2014 18:44:30 - INFO - Device disconnected

21/044/2014 18:44:55 - INFO - Selected Bundle for Sony Xperia M (C1905). FW release : 15.4.A.0.23. Customization : Generic PL

21/044/2014 18:44:55 - INFO - Preparing files for flashing

21/044/2014 18:44:55 - INFO - Please connect your device into flashmode.

21/045/2014 18:45:19 - INFO - Device connected in flash mode

21/045/2014 18:45:20 - INFO - Opening device for R/W

21/045/2014 18:45:20 - INFO - Reading device information

21/045/2014 18:45:20 - INFO - Phone ready for flashmode operations.

21/045/2014 18:45:20 - INFO - Current device : Unknown: Mar 7 2014/10:51:59 - YT910M7GB9 - Unknown: Mar 7 2014/10:51:59 - Unknown: Mar 7 2014/10:51:59 - Unknown: Mar 7 2014/10:51:59

21/045/2014 18:45:20 - INFO - Start Flashing

21/045/2014 18:45:20 - INFO - Processing loader.sin

21/045/2014 18:45:20 - INFO - Checking header

21/045/2014 18:45:20 - INFO - Flashing data

21/045/2014 18:45:20 - INFO - Processing of loader.sin finished.

21/045/2014 18:45:20 - INFO - Loader : S1_Root_dbe9 - Version : loader_MSM8X30_10 / Boot version : S1_Boot_MSM_8227_5 / Bootloader status : ROOTED

21/045/2014 18:45:20 - INFO - Processing partition-image.sin

21/045/2014 18:45:20 - INFO - Checking header

21/045/2014 18:45:20 - INFO - Flashing data

21/045/2014 18:45:20 - INFO - Processing of partition-image.sin finished.

21/045/2014 18:45:20 - INFO - No bootdelivery to send

21/045/2014 18:45:21 - INFO - Ending flash session

21/045/2014 18:45:21 - INFO - Flashing finished.

21/045/2014 18:45:21 - INFO - Please unplug and start your phone

21/045/2014 18:45:21 - INFO - For flashtool, Unknown Sources and Debugging must be checked in phone settings

21/045/2014 18:45:21 - INFO - Device connected in flash mode

SUCCESS! What now?
[Sony Xperia M] Bonoboo:
Now try flash whole ROM via flashtool.
[Sony Xperia M] TomekParuszewski:
Unfortunately, it failed

/010/2014 19:10:03 - INFO - Selected Bundle for Sony Xperia M (C1905). FW release : 15.4.A.0.23. Customization : Generic PL

21/010/2014 19:10:03 - INFO - Preparing files for flashing

21/012/2014 19:12:19 - INFO - Please connect your device into flashmode.

21/013/2014 19:13:08 - INFO - Device connected in flash mode

21/013/2014 19:13:08 - INFO - Opening device for R/W

21/013/2014 19:13:08 - INFO - Reading device information

21/013/2014 19:13:08 - INFO - Phone ready for flashmode operations.

21/013/2014 19:13:08 - INFO - Current device : Unknown: Mar 7 2014/10:51:59 - YT910M7GB9 - Unknown: Mar 7 2014/10:51:59 - Unknown: Mar 7 2014/10:51:59 - Unknown: Mar 7 2014/10:51:59

21/013/2014 19:13:08 - INFO - Start Flashing

21/013/2014 19:13:08 - INFO - Processing loader.sin

21/013/2014 19:13:08 - INFO - Checking header

21/013/2014 19:13:08 - INFO - Flashing data

21/013/2014 19:13:08 - INFO - Processing of loader.sin finished.

21/013/2014 19:13:09 - INFO - Loader : S1_Root_dbe9 - Version : loader_MSM8X30_10 / Boot version : S1_Boot_MSM_8227_5 / Bootloader status : ROOTED

21/013/2014 19:13:09 - INFO - Processing partition-image.sin

21/013/2014 19:13:09 - INFO - Checking header

21/013/2014 19:13:09 - INFO - Flashing data

21/013/2014 19:13:09 - INFO - Processing of partition-image.sin finished.

21/013/2014 19:13:09 - INFO - Parsing boot delivery

21/013/2014 19:13:09 - INFO - Phone boot version : S1_Boot_MSM_8227_5. Boot delivery version : S1_Boot_MSM_8227_5

21/013/2014 19:13:09 - INFO - Boot delivery up to date. Nothing to do

21/013/2014 19:13:09 - INFO - Processing kernel.sin

21/013/2014 19:13:09 - INFO - Checking header

21/013/2014 19:13:09 - INFO - Flashing data

21/013/2014 19:13:09 - ERROR - Processing of kernel.sin finished with errors.

21/013/2014 19:13:09 - INFO - Ending flash session

21/013/2014 19:13:09 - ERROR - ERR_SEVERITY="MINOR";ERR_CODE="0017";ERR_DYNAMIC="0x8020001C ";
[Sony Xperia M] Bonoboo:
Ok, lets try to erase partition from ADB.

dd if=/dev/zero of=/dev/block/mmcblk0p17 bs=100 count=1

Then try flash FTF.

Or if not helps

dd if=/dev/zero of=/dev/block/mmcblk0p17 bs=16 count=1

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

UPD:

Flash attached archive.

It temporary install parted utility in /tmp folder

Then run command and share output:

[B]/tmp/[/B]parted /dev/block/mmcblk0
print
[Sony Xperia M] TomekParuszewski:
After flash (by sideload from CWM) i've got

~ # /tmp/parted /dev/block/mmcblk0

GNU Parted 1.8.8.1.179-aef3

Using /dev/block/mmcblk0

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) print

print

Model: MMC SEM04G (sd/mmc)

Disk /dev/block/mmcblk0: 3959MB

Sector size (logical/physical): 512B/512B

Partition Table: gpt

Number Start End Size File system Name Flags

1 131kB 2228kB 2097kB TA

2 2228kB 2359kB 131kB sbl1

3 2359kB 2621kB 262kB sbl2

4 2621kB 2884kB 262kB s1sbl2

5 2884kB 3408kB 524kB sbl3

6 3408kB 3932kB 524kB aboot

7 3932kB 4456kB 524kB tz

8 4456kB 4588kB 131kB alt_sbl1

9 4588kB 4850kB 262kB alt_sbl2

10 4850kB 5112kB 262kB alt_s1sbl2

11 5112kB 5636kB 524kB alt_sbl3

12 5636kB 6160kB 524kB alt_aboot

13 6160kB 6685kB 524kB alt_tz

14 6685kB 7209kB 524kB rpm

15 7209kB 7733kB 524kB alt_rpm

16 8389kB 25.2MB 16.8MB ext4 LTALabel

17 25.2MB 46.1MB 21.0MB boot

18 46.1MB 113MB 67.1MB fat16 modem

19 113MB 116MB 3146kB modemst1

20 117MB 121MB 3146kB modemst2

21 122MB 125MB 3146kB fsg

22 125MB 130MB 5243kB ramdump

23 130MB 147MB 16.8MB FOTAKernel

24 147MB 151MB 4194kB ext2 persist

25 151MB 1409MB 1258MB ext4 system

26 1409MB 1671MB 262MB ext4 cache

27 1674MB 3909MB 2236MB ext4 userdata

(parted)
[Sony Xperia M] Bonoboo:
Hmm, compared with my output (4.3) and there differences.

Don't know is it normal.

At least info detected.

Your

25 151MB 1409MB 1258MB ext4 system

26 1409MB 1671MB 262MB ext4 cache

27 1674MB 3909MB 2236MB ext4 userdata

My

25 151MB 1514MB 1363MB ext4 system

26 1514MB 1724MB 210MB ext4 cache

27 1724MB 3909MB 2185MB ext4 userdata

Ok, lets try at least recover /system

Please, redownload ZIP above, I updated it.

And run:

[B]/tmp/[/B]parted /dev/block/mmcblk0p25 mkfs ext4

Then try mount and then format it from recovery.

Post outputs.
[Sony Xperia M] TomekParuszewski:
here is the result

tomek@tomek-desktop ~ $ adb sideload /home/tomek/Pobrane/parted1.zip

sending: 'sideload' 100%

tomek@tomek-desktop ~ $ adb devices

List of devices attached

YT910M7GB9	recovery

tomek@tomek-desktop ~ $ adb shell

~ # parted /dev/block/mmcblk0p25 mkfs ext4

Warning: The existing file system will be destroyed and all data on the

partition will be lost. Do you want to continue?

parted: invalid token: ext4

Yes/No? Yes

Yes

Partition number? 25

25

Error: Partition doesn't exist.
[Sony Xperia M] Bonoboo:
But why not exist?

Maybe went back to parted soon.

Lets erase partitions to try correct error on them (found on XDA)

system, userdata, boot

dd if=/dev/zero of=/dev/block/mmcblk0p25
dd if=/dev/zero of=/dev/block/mmcblk0p27
dd if=/dev/zero of=/dev/block/mmcblk0p17

Then flashtool.
[Sony Xperia M] TomekParuszewski:
after reboot now i'm waiting for CWM, it's seems little to long for me

result of dd

C:\adt-bundle-windows-x86-20140321\adt-bundle-windows-x86-20140321\sdk\platform-tools>adb shell

~ # ←[6ndd if=/dev/zero of=/dev/block/mmcblk0p25

dd if=/dev/zero of=/dev/block/mmcblk0p25

dd: writing '/dev/block/mmcblk0p25': I/O error

649+0 records in

648+0 records out

331776 bytes (324.0KB) copied, 40.900870 seconds, 7.9KB/s

~ # ←[6ndd if=/dev/zero of=/dev/block/mmcblk0p27

dd if=/dev/zero of=/dev/block/mmcblk0p27

dd: writing '/dev/block/mmcblk0p27': No space left on device

4366304+0 records in

4366303+0 records out

2235547136 bytes (2.1GB) copied, 421.192461 seconds, 5.1MB/s

~ # ←[6ndd if=/dev/zero of=/dev/block/mmcblk0p17

dd if=/dev/zero of=/dev/block/mmcblk0p17

dd: writing '/dev/block/mmcblk0p17': No space left on device

40961+0 records in

40960+0 records out

20971520 bytes (20.0MB) copied, 2.367740 seconds, 8.4MB/s

~ # ←[6n
[Sony Xperia M] Bonoboo:
Flashtool FTF?

Or flash boot.img again (also try fastboot).

Here nice info about recreating partitions.

There tips how to scan errors.

Here sample commands too.

I guess you need use info from there.
[Sony Xperia M] TomekParuszewski:
UPDATE after dd command

http://xdaforums.com/showpost.php?p=52828377&postcount=30
[Sony Xperia M] Bonoboo:
Yep, this useful.

So we have bad block at /system partition.

It was a bit overwritten by flashing a lot (?) of rom's.

There low speed of access, this describes why phone was slow after reboot.

At least /boot and /data seems good.

We can try to recreate /system with small shift to avoid problem part.

But for now please:

1. Try flash FTF

2. fdisk -l /dev/block/mmcblk0p25

3. /tmp/e2fsck -f -c –y /dev/block/mmcblk0p27 <-- that ZIP needed

Surely, please post outputs.
[Sony Xperia M] TomekParuszewski:
I'm sorry, but i don't see e2fsck zip to flash it, CWM don't has it, so..
[Sony Xperia M] Bonoboo:
No, I mean flash parted.zip

It includes e2fsck

Also do you often flash new ROM's?

So NAND was a lot times overwritten in same place.
[Sony Xperia M] TomekParuszewski:
I had to modify the command that started something happen - I removed the / tmp / and leaving only the command e2fsck-f-c-y / dev/block/mmcblk0p27. Now i see "/dev/block/mmcblk0p27: recovering journal" and waiting to finish the command

I have a XM since February this year. I rooted and unblocked phone and after that I uploaded each release CM11 from this post http://xdaforums.com/showthread.php?t=2584956.

There were no problems.

I then I installed FXP from issue 314 and after installing FXP319 my problem occurred. I do not know if it often.
[Sony Xperia M] TomekParuszewski:
Suddenly!

"Rainbow mode enabled!"
[Sony Xperia M] Bonoboo:
You just often moved cursor up / down.

Don't pay attention, it's kind of feature.

Just info about Encryption unsuccessful

Phone tries read partitions and due some reason data there messed up.

It's looks like encrypted data for phone and he trying deal with it.

Googling says that this is consequence of broken NAND-memory.

So I wait for result of third previous steps.

And here fourth:

4. Try to format and mount /data
[Sony Xperia M] TomekParuszewski:
After i issue command this is happen

~ # ←[6ne2fsck -f -c -y /dev/block/mmcblk0p27

e2fsck -f -c -y /dev/block/mmcblk0p27

e2fsck 1.41.14 (22-Dec-2010)

/dev/block/mmcblk0p27: recovering journal

Error reading block 1040 (Attempt to read block from filesystem resulted in short read). Ignore error? yes

Force rewrite? yes

Error reading block 8960 (Attempt to read block from filesystem resulted in short read). Ignore error? yes

Force rewrite? yes

Error reading block 8964 (Attempt to read block from filesystem resulted in short read). Ignore error? yes

Force rewrite? yes

Error reading block 9024 (Attempt to read block from filesystem resulted in short read). Ignore error? yes

Force rewrite? yes

Error reading block 9026 (Attempt to read block from filesystem resulted in short read). Ignore error? yes

Force rewrite? yes

Error reading block 9039 (Attempt to read block from filesystem resulted in short read). Ignore error? yes

Force rewrite? yes

Error reading block 9090 (Attempt to read block from filesystem resulted in short read). Ignore error? yes

Force rewrite? yes

Error reading block 9106 (Attempt to read block from filesystem resulted in short read). Ignore error? yes

Force rewrite? yes

Error reading block 9111 (Attempt to read block from filesystem resulted in short read). Ignore error? yes

Force rewrite? yes

Error reading block 9118 (Attempt to read block from filesystem resulted in short read). Ignore error? yes

Force rewrite? yes

Error reading block 9138 (Attempt to read block from filesystem resulted in short read). Ignore error? yes

Force rewrite? yes

Superblock needs_recovery flag is clear, but journal has data.

Run journal anyway? yes

e2fsck: unable to set superblock flags on /dev/block/mmcblk0p27

~ # ←[6n
[Sony Xperia M] Bonoboo:
Oh, so much broken blocks on /data

Now please for /system

e2fsck -f -c –y /dev/block/mmcblk0p[B]25[/B]

And needed output of

fdisk -l /dev/block/mmcblk0p25
fdisk -l /dev/block/mmcblk0p27
[Sony Xperia M] Bonoboo:
So lets try shift partitions. Based on this post

I moved them more to end of disk and make tiny: 500, 100 and 900 Mb.

parted /dev/block/mmcblk0
rm 25
rm 26
rm 27
mkpart primary 2500 3000
mkpart primary 3000 3100
mkpart primary 3100 3909
name 25 system
name 26 cache
name 27 userdata

Then restart CWM.

Try format system, data and cache.

Try to install FXP320 from ZIP.
[Sony Xperia M] TomekParuszewski:
parted says: Too many primary partitions
[Sony Xperia M] Bonoboo:
Try replace primary in commands on logical or if not helps on extended
[Sony Xperia M] TomekParuszewski:
It's impossible - for now

~ # ←[6nparted /dev/block/mmcblk0

parted /dev/block/mmcblk0

GNU Parted 1.8.8.1.179-aef3

Using /dev/block/mmcblk0

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) mkpart logical 2500 3000

mkpart logical 2500 3000

mkpart logical 2500 3000

Error: Too many primary partitions.

(parted) mkpart extended 2500 3000

mkpart extended 2500 3000

mkpart extended 2500 3000

Error: Too many primary partitions.

(parted)
[Sony Xperia M] Bonoboo:
You removed partitions before?

What parted says?

parted /dev/block/mmcblk0
print
[Sony Xperia M] TomekParuszewski:
Look, I remove the partitions and they still appear in parted

(parted) print

print

print

Model: MMC SEM04G (sd/mmc)

Disk /dev/block/mmcblk0: 3959MB

Sector size (logical/physical): 512B/512B

Partition Table: gpt

Number Start End Size File system Name Flags

1 131kB 2228kB 2097kB TA

2 2228kB 2359kB 131kB sbl1

3 2359kB 2621kB 262kB sbl2

4 2621kB 2884kB 262kB s1sbl2

5 2884kB 3408kB 524kB sbl3

6 3408kB 3932kB 524kB aboot

7 3932kB 4456kB 524kB tz

8 4456kB 4588kB 131kB alt_sbl1

9 4588kB 4850kB 262kB alt_sbl2

10 4850kB 5112kB 262kB alt_s1sbl2

11 5112kB 5636kB 524kB alt_sbl3

12 5636kB 6160kB 524kB alt_aboot

13 6160kB 6685kB 524kB alt_tz

14 6685kB 7209kB 524kB rpm

15 7209kB 7733kB 524kB alt_rpm

16 8389kB 25.2MB 16.8MB ext4 LTALabel

17 25.2MB 46.1MB 21.0MB boot

18 46.1MB 113MB 67.1MB fat16 modem

19 113MB 116MB 3146kB modemst1

20 117MB 121MB 3146kB modemst2

21 122MB 125MB 3146kB fsg

22 125MB 130MB 5243kB ramdump

23 130MB 147MB 16.8MB FOTAKernel

24 147MB 151MB 4194kB ext2 persist

25 151MB 1409MB 1258MB ext4 system

26 1409MB 1671MB 262MB ext4 cache

27 1674MB 3909MB 2236MB ext4 userdata

(parted) rm 25

rm 25

rm 25

(parted) rm 26

rm 26

rm 26

(parted) rm 27

rm 27

rm 27

(parted) print

print

print

Model: MMC SEM04G (sd/mmc)

Disk /dev/block/mmcblk0: 3959MB

Sector size (logical/physical): 512B/512B

Partition Table: gpt

Number Start End Size File system Name Flags

1 131kB 2228kB 2097kB TA

2 2228kB 2359kB 131kB sbl1

3 2359kB 2621kB 262kB sbl2

4 2621kB 2884kB 262kB s1sbl2

5 2884kB 3408kB 524kB sbl3

6 3408kB 3932kB 524kB aboot

7 3932kB 4456kB 524kB tz

8 4456kB 4588kB 131kB alt_sbl1

9 4588kB 4850kB 262kB alt_sbl2

10 4850kB 5112kB 262kB alt_s1sbl2

11 5112kB 5636kB 524kB alt_sbl3

12 5636kB 6160kB 524kB alt_aboot

13 6160kB 6685kB 524kB alt_tz

14 6685kB 7209kB 524kB rpm

15 7209kB 7733kB 524kB alt_rpm

16 8389kB 25.2MB 16.8MB ext4 LTALabel

17 25.2MB 46.1MB 21.0MB boot

18 46.1MB 113MB 67.1MB fat16 modem

19 113MB 116MB 3146kB modemst1

20 117MB 121MB 3146kB modemst2

21 122MB 125MB 3146kB fsg

22 125MB 130MB 5243kB ramdump

23 130MB 147MB 16.8MB FOTAKernel

24 147MB 151MB 4194kB ext2 persist

25 151MB 1409MB 1258MB ext4 system

26 1409MB 1671MB 262MB ext4 cache

27 1674MB 3909MB 2236MB ext4 userdata
[Sony Xperia M] Bonoboo:
That's why new can't be created.

For now I don't know how else partitions can be removed.

gparted – can't find compiled for Android

fdisk – in our version no -d command

UPD:

Ok, here I find utilities to deal with GPT partition table: gdisk and sgdisk

I added it in new ZIP, use it.

This create file "GPT" with backup in root filesystem.

Copy it on PC! (pull command)

gdisk /dev/block/mmcblk0
gdisk b
GPT

Then

[B]t[/B]
i 25
i 26
i 27
[Sony Xperia M] TomekParuszewski:
i'm still trying get into recovery
[Sony Xperia M] Bonoboo:
It always now takes so long?
[Sony Xperia M] TomekParuszewski:
no, it depends - restart after earlier operations takes about 25-30 min, but after couple attempts (removing battery, wait few sec put battery again, POWER, purple light, VOL UP once, blue light - wait) last one takes about 10 min. Now i'm using gdisk
[Sony Xperia M] Bonoboo:
Oh, so as flashtool log says /boot partition affected too.

Glad, we somehow still can use recovery.

Sorry, not "t" – "p"

Please output.
[Sony Xperia M] TomekParuszewski:
there it is

C:\Windows\system32>adb shell
~ # ←[6ngdisk /dev/block/mmcblk0
gdisk /dev/block/mmcblk0
GPT fdisk (gdisk) version 0.8.4

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
p
Disk /dev/block/mmcblk0: 7733248 sectors, 3.7 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 98101B32-BBE2-4BF2-A06E-2BB33D000C20
Partition table holds up to 27 entries
First usable sector is 34, last usable sector is 7733214
Partitions will be aligned on 256-sector boundaries
Total free space is 107998 sectors (52.7 MiB)

Number Start (sector) End (sector) Size Code Name
1 256 4351 2.0 MiB FFFF TA
2 4352 4607 128.0 KiB FFFF sbl1
3 4608 5119 256.0 KiB FFFF sbl2
4 5120 5631 256.0 KiB FFFF s1sbl2
5 5632 6655 512.0 KiB FFFF sbl3
6 6656 7679 512.0 KiB FFFF aboot
7 7680 8703 512.0 KiB FFFF tz
8 8704 8959 128.0 KiB FFFF alt_sbl1
9 8960 9471 256.0 KiB FFFF alt_sbl2
10 9472 9983 256.0 KiB FFFF alt_s1sbl2
11 9984 11007 512.0 KiB FFFF alt_sbl3
12 11008 12031 512.0 KiB FFFF alt_aboot
13 12032 13055 512.0 KiB FFFF alt_tz
14 13056 14079 512.0 KiB FFFF rpm
15 14080 15103 512.0 KiB FFFF alt_rpm
16 16384 49151 16.0 MiB 8300 LTALabel
17 49152 90111 20.0 MiB FFFF boot
18 90112 221183 64.0 MiB 0700 modem
19 221184 227327 3.0 MiB FFFF modemst1
20 229376 235519 3.0 MiB FFFF modemst2
21 237568 243711 3.0 MiB FFFF fsg
22 243712 253951 5.0 MiB FFFF ramdump
23 253952 286719 16.0 MiB FFFF FOTAKernel
24 286720 294911 4.0 MiB 8300 persist
25 294912 2752511 1.2 GiB 8300 system
26 2752512 3264511 250.0 MiB 8300 cache
27 3268608 7634910 2.1 GiB 8300 userdata

Command (? for help):
[Sony Xperia M] lanthrax:
awesome

The amount of progress you guys are making is awesome! Hoping for a solution soon!
[Sony Xperia M] Bonoboo:
Lets try delete partitions and check this:

gdisk /dev/block/mmcblk0
d 25
d 26
d 27
p
[Sony Xperia M] TomekParuszewski:
SUCCESS!

Command (? for help): d
d
Partition number (1-27): 25
25

Command (? for help): d
d
Partition number (1-27): 26
26

Command (? for help): d
d
Partition number (1-27): 27
27

Command (? for help): p
p
Disk /dev/block/mmcblk0: 7733248 sectors, 3.7 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 98101B32-BBE2-4BF2-A06E-2BB33D000C20
Partition table holds up to 27 entries
First usable sector is 34, last usable sector is 7733214
Partitions will be aligned on 256-sector boundaries
Total free space is 7443901 sectors (3.5 GiB)

Number Start (sector) End (sector) Size Code Name
1 256 4351 2.0 MiB FFFF TA
2 4352 4607 128.0 KiB FFFF sbl1
3 4608 5119 256.0 KiB FFFF sbl2
4 5120 5631 256.0 KiB FFFF s1sbl2
5 5632 6655 512.0 KiB FFFF sbl3
6 6656 7679 512.0 KiB FFFF aboot
7 7680 8703 512.0 KiB FFFF tz
8 8704 8959 128.0 KiB FFFF alt_sbl1
9 8960 9471 256.0 KiB FFFF alt_sbl2
10 9472 9983 256.0 KiB FFFF alt_s1sbl2
11 9984 11007 512.0 KiB FFFF alt_sbl3
12 11008 12031 512.0 KiB FFFF alt_aboot
13 12032 13055 512.0 KiB FFFF alt_tz
14 13056 14079 512.0 KiB FFFF rpm
15 14080 15103 512.0 KiB FFFF alt_rpm
16 16384 49151 16.0 MiB 8300 LTALabel
17 49152 90111 20.0 MiB FFFF boot
18 90112 221183 64.0 MiB 0700 modem
19 221184 227327 3.0 MiB FFFF modemst1
20 229376 235519 3.0 MiB FFFF modemst2
21 237568 243711 3.0 MiB FFFF fsg
22 243712 253951 5.0 MiB FFFF ramdump
23 253952 286719 16.0 MiB FFFF FOTAKernel
24 286720 294911 4.0 MiB 8300 persist

Command (? for help):
[Sony Xperia M] Bonoboo:
Yay!

quit
parted /dev/block/mmcblk0
mkpart primary 2500 3000
mkpart primary 3000 3100
mkpart primary 3100 3909
name 25 system
name 26 cache
name 27 userdata
print