[Sony Xperia M] XDAXperiaM:
Dear Xperia M experts of the xda community,

I really messed up my Sony Xperia M single sim C1905, android 4.3 and it is continious (boot?) looping, that means whatever mode I put the device (TWRP, fastboot, ADB, Hardware: Flash-Mode (as well while flashing system.sin), Fastboot-Mode) -> reboot latest after 29 seconds.

Xüeria M is in usage since 5 yeas and has long lasting battery - on day at least - an did a very good job. Device was bought in Germany. It never let me down, so I somehow stick to it. I'm new to the xda forum.

With some tricks I can install working TWRP 2.8.7.0 or CWM6 (ohter TWRP will freeze), but there is no chance to install a file bigger than approx. 80 MB within the given time.

So formatting an deleting works with TWRP 2.8.7.0.

I "just" wanted to update to a new ROM i.e. like this Resurrection Remix Nougat v5.8.5

https://xdaforums.com/legacy/xperia-m/rom-resurrection-remix-nougat-v5-8-0-t3512094

Before I made a full android backup to my SD Card by installing twrp-3.0.2-0-nicki.img.	At this ime TWRP worked properly.

As well I used the Sony Android 4.3 Backup & Restore tool in advance to backup via SD card (At this time the android system was still working).

I wanted to install a new ROM (CM13, cM14, Resurrection Remix Nougat v5.8.5, or something similar xda-dev. is full of options) according to this really nice instruction:

https://www.youtube.com/watch?v=SJBLq19NrfY

Bottomline is, whatever I found out to be a possible solution -> reboot latest after 29 seconds.

Here is what I did until now (since 7 days and night I'm really trying hard, and google must be emty...). I learned a lot about android devices.

P.S.: 3 days ago I escaped the boot loop and could enter TWRP2.8.7 - but I messed up because my knowledge (full data wipe) wasn't to big at this time and I didn't remember what I exactly did in the night before. Now I could bit myself into the ass....

The good point: I 'm convinced, that the bricked device still has a chance. I have more ideas, so at the end, but I don't have such deep knowledge as an developer.

Here we go: my Computers are

Lenovo M57, Win10

Lenovo W540, Linux Mint 20

1) checked if my Xperia M can be unlocked -> yes. Mobile Phone rooted with SuperSu. At this time under still working Android

2) installed minimal ADB & Fastboot (on both computer)

3) got my sony bootloader unlock code and unlocked bootloader via Terminal:

fastboot oem unlock 0x<mycode>

-> OKAY

4) Start twrp-3.0.2-0-nicki.img	and tried to install ROM. Something went wrong an I got into a boot loop. Then my trouble started. ADB didn't work anymore. Only fastboot and flash mode.

At the end nothing seemed to work an final I decided to flash new

1) install sony moile flash tool and drivers. I reinstalled the drivers und WIN10 several times until all systems were running. Under Linux, things were easier and there were no driver issues at all.

At the end I installed 0.9.8, 0.9.12.1, 0.9.13.0, 0.9.16.0, 0.9.18.6, 0.9.20.0, 0.9.22.3, 0.9.28.0, 0.9.29.0

on windows and linux.

2) for all flash tool I had the same issue:

I could flash all ftf files (*.sin) perfectly and without error message, except:

system.sin

ended with an error message (because device disconnected after 29 seconds)!

Same procedure for all these firmwares:

C1905_15.1.C.2.8_Customized ZA.ftf (stock firmware)

C1905_15.4.A.1.9_Customized MEA.ftf

C1905_15.4.A.1.9_Customized+UK.ftf

Xperia_M_C1904_4.3_15.4.A.1.9.ftf

I tried all firmwares with all versions of flashtools (yes I really did...)

error message:

20/014/2020 18:14:17 - INFO - Current device : C1905 - YT910V0YHX - 1274-5576_R2C - 1272-2325_15.4.A.1.9 - WORLD-i_15.4.A.1.9

20/007/2020 21:07:14 - INFO - Processing system.sin

20/007/2020 21:07:14 - INFO - Checking header

20/007/2020 21:07:14 - INFO - Flashing data

20/007/2020 21:07:43 - ERROR - Processing of system.sin finished with errors.

20/007/2020 21:07:43 - INFO - Ending flash session

20/007/2020 21:07:43 - ERROR - null

20/007/2020 21:07:43 - ERROR - Error flashing. Aborted

20/007/2020 21:07:43 - INFO - Flashing finished.

I also flashed for all flash tool versions everything except system.sin -> worked with nearly all versions perfectly

An then flashed for all flash tool versions only system.sin -> worked produced the same error messeage after 29. sec.

Another issue: after flashing (with system.sin error) I wasn't able to enter ADB mode again, so only possibility is i.e. to

fastboot flash boot twrp-3.0.2.0-nicki.img -> only then I will be able to access ADB interface again during TWRP bootup.

With the Sony boot-up (logo appears) no ADB access is granted. But I partially solved, see 4.0)

3) Because of system.sin error I tried to access the device via TWRP in order to install CM13, CM14 or Resurrection Remix Nougat v5.8.5, see https://xdaforums.com/legacy/xperia-m/rom-resurrection-remix-nougat-v5-8-0-t3512094

fastboot flash boot twrp-3.0.2-0-nicki.img -> Frezze of Startimage at boot -> reboot after 29 sec.

fastboot flash boot twrp-3.0.1-0-nicki.img -> Frezze of Startimage at boot -> reboot after 29 sec.

fastboot flash boot twrp-3.0.0-0-nicki.img -> Frezze of Startimage at boot -> reboot after 29 sec.

fastboot flash boot twrp-2.8.7.0-nicki.img -> full action possible, but: -> reboot after 29 sec.

fastboot flash boot <file from here>:

https://xdaforums.com/showthread.php?t=2480556

-> full action possible, but: -> reboot after 29 sec.

Re-gaining ADB access for 29 sec.:

4.0) OK again flash with flash tool - I kept sticking to 0.9.18.6 and C1905_15.1.C.2.8_Customized ZA.ftf (stock firmware) which seem to have reproducible results:

fastboot flash boot twrp-2.8.7.0-nicki.img -> full action possible, but: -> reboot after 29 sec.

Then for 29 sec. I could access the internal storage via Linux und use ADB:

What I tried to interupt bootloop:

4.1)

adb shell

dd if=/sdcard/twrp-2.8.7.0-nicki.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel

-> OKAY, but has no effect -> -reboot after 29 sec.

4.2)

adb shell

dd if=/sdcard/twrp-3.0.2.0-nicki.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel

-> OKAY, but has no effect, that is: current twrp in boot install stays in place -> -reboot after 29 sec.

yes, I rebooted into recovery as well: VOL-UP but nothing changed

4.3)

try to interrup boot loop with

adb shell

dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc

4.4)

use flashtool to flash everything except system.sin an then:

fastboot flash system system.sin

error message:

target didn't report max-download-size

sending 'system' (1012135 KB)...

FAILED (remote: data too large)

finished. total time: 0.002s

fastboot flash -S 512M system system43.sin

error message:

Invalid sparse file format at header magic

error: write_sparse_skip_chunk: don't care size 484528096 is not a multiple of the block size 4096

sending sparse 'system' 1/2 (517800 KB)...

error: write_sparse_skip_chunk: don't care size 484528096 is not a multiple of the block size 4096

FAILED (data write failure (Protocol error))

finished. total time: 14.530s

data failure by: -> -reboot after 29 sec.

4.4)

I can do:

# fastboot erase system:

erasing 'system'...

OKAY [ 0.294s]

finished. total time: 0.294s

# fastboot erase userdata

erasing 'userdata'...

OKAY [ 0.128s]

finished. total time: 0.128s

But not:

# fastboot erase cache

erasing 'cache'...

FAILED (remote: Command not allowed)

finished. total time: 0.002s

# fastboot erase data

erasing 'data'...

FAILED (remote: Command not allowed)

finished. total time: 0.002s

# fastboot format system

Formatting is not supported for file system with type ''.

# fastboot format data

Formatting is not supported for file system with type ''.

# fastboot format userdata

Formatting is not supported for file system with type ''.

4.5) I'm aware of all button combinations

Vol. Up + USB = Fastboot Mode

Vol. Down + USB = Flash Mode

Vol Up during startup = boot recovery (if flash wir system.sin error -> no effect nothing appears)

4.6 Sony PCC

Tried, but can't register the device anymore.

4.6.1) Software reapair -> USB & Vol. Down attached to PC -> Devices is locked is stated.

4.6.2) If connected before and repair process is started, the process end after 29 sec. ahhhh!

4.7)

With

fastboot flash boot twrp-2.8.7.0-nicki.img

I can access the interal storage, mount all partition, do a factory reset, wipe data, dalvik cache etc. no effect -> reboot after 29 sec.

fastboot flash boot twrp-3.0.2-0-nicki.img or any other 3.x.x.x for nicki will free at the start-up picture. Don't ask me why, shouldn't be this way.

So the issue: I can't backup the 3.0.2.0 with 2.8.7.0. At least I tried. The issue are:

a) no partitons are asked for an twrp does not know where to write

b) -> reboot after 29 sec. even if it would work...

4.8)

After flash rooted with

-magiskV20.zip

and tried to install or do something useful with TWRP2.8.7.0 nicki

-> reboot after 29 sec.

4.9)

Also this doenst finally work, but its a very nice instruction, an works "best" until the 29 sec. are over

https://xdaforums.com/showthread.php?t=2480556

-> -reboot after 29 sec.

5.0) My possibilities are limited an I only have some ideas but dont know how to proceed

5.1) Why does the loop after flash show the sony logo and then the devices seems to be fored to go into reboot. For me it looks like there is a file or a process on the boot partition, which tries to find something - if not -> interrupt an reboot.

Possible solution find the file an interrupt this Sony procedure. Maybe someone has a clue where to search or which file could be corrupted.

5.2) Flash tool is sending packages (can be seen from the debug mode). for system.sin the reboot comes aber about 150 packages are transferred to the system partition. I could think to start sending the file packages 1 to 150 first, then 151 to 300, then 301 to 450 etc.

Is there any possibility to write packagewise with flashtool?

5.3) Since I can access the internal storage I thought about just copying the linux files from a 4.3 Android there, or the files which are required by the sony boot loop checking process, so the boot loop interrupts and the linux an fix itsself.

5.4) Is it possible to place an smaller recovery file at the adequate place, so that there is a chance to rebuild the linux system sucessively

5.5) Is it possible to flash an small system file, which acesses the *.tft file on the sd card an can do the installation process (only possible if the device stops rebooting after 29 sec.)

5.6) Extrakt something useful from the TWRP 3.0.2.0 backup, that might interrupt the boot loop? I don't know how to.

5.7) Maybe things are simple and somebody has a set of proven files for Xperia C1905 (tft, DRM-fix.zip? ), that would help to exclude failures possibilities.

You see I spent over a week on this issue, now my holiday time is over, and I'm almost fed up. But I have the ambition to fix it. Of course its easier an cheaper to simply buy a new android device - but thats not the point, since I'm a technical geek, but have no experiance fixing android devices.

So I'm positive, that some superman in this forum here in this xda-forum who has an idea.

Appreciate any ideas from experts.

Best regards

Dirk