[Xperia SP Original Android Development] TechnoSparks:
Flashing the M10 or any other Mx in the future

@gaumzi2010

There's a thread for the same procedures however the difference is that the thread is for all ROMs. For easy understanding, I really recommend that thread!

Welcome to customising your phone! Before you proceed, please understand that everything you do with your phone, has many risks. If performed correctly, those terrible consequences may not happen.

This guide is assuming that you are not rooted. Forgive me if this is an offend to you :(

There are three methods of doing so! If you are starting fresh, and wish to preserve your TA partition, follow the respective guide which is guide

1b

. Else, if you don't give a darn about TA partition, please refer to the guide

1a

. Not giving a darn can absolutely make things really easier (shorter steps) but only if you are willing to really ditch it. If you still have warranty and really care about warranty, I recommend backing up TA partition. Optionally, if you are brave enough, you can follow guide

1c

in which it enables you to backup TA partition from your 4.3 stock ROM. This method however is not tested personally (theoretically constructed guide).

Requirements!

Check if your phone's bootloader could be unlocked. Dial *#*#SERVICE#*#* (*#*#7378423#*#*) . Tap on Service info > Configuration > Rooting Status and check if you can unlock your bootloader. If you can, it will be shown as "Bootloader unlock allowed: Yes" or something like that.

WARNING: If it says otherwise, do not continue! You'll hard brick your phone if you insist.

Flashtool. Flashtool is a great software for you to flash your stock ROM back and also to do some other stuff. [DOWNLOAD]

Un-metered and fast internet connection :eek:

Backup your apps. If you're unrooted, I suggest for you to try Helium backup tool. Only do backups of your installed apps (the one you downloaded manually on Playstore)

M10 snapshot

gapps package. I recommend a micro package if you hate google framework like me. To get one, Official Cyanogenmod gapps or PA's gapps.

DoomLord's Advanced kernel for Stock ROM!

Unlocking the bootloader will wipe your /data partition. Please backup any files that you find important in the internal storage before performing these steps

Your IMEI written somewhere else. Dial *#06#

Acceptable battery level (80% recommended)

Bootloader unlock code:

Go to: http://unlockbootloader.sonymobile.com/ and read everything!

At the bottom click 'Start Unlocking the Bootloader'

A number of prompts will be given. All you have to do is proceed (reading is optional and is recommended!)

Eventually you'll end up in the "Create Unlock request" page. From here enter your IMEI, name and email address. If your IMEI is unaccepted, try to enter your IMEI again, but exclude the last digit.

You should then receive the bootloader unlock key inside your email inbox.

1a) If you don't care about TA partition

WARNING: Once gone, you'll never able to retrieve your DRM keys, which resulted in unable to use the Bravia engine, if someday, you wish to return to stock.

I've seen many things about TA partition and there's no definite explanation on how it works etc etc, the best thing here is to know that once lost, DRM keys are unrecoverable.

Just skip the guides below and jump to guide number

2

.​

1b) If you wish to backup TA partition

A working adb bridge is required before you proceed. Follow this guide

Downgrade your ROM. Kindly refer to this short guide

Root your 4.1.2 ROM

Backup your TA Partition. NOTE! You can do a "dry-run" to determine the integrity of your backup

Follow guide number

2

.

1c) Backup TA partition without too much work

WARNING: Please understand that I haven't tested this method! Fortunately, based on my inspection it is safe to follow the procedures.

A working adb bridge is required before you proceed. Follow this guide.

Root your 4.3 with Towelroot!

Backup your TA Partition. NOTE! You can do a "dry-run" to determine the integrity of your backup

Follow guide number

2

.

2) Unlock the bootloader and flash kernel to have CWM Recovery

Unlocking your bootloader:

Shut your phone down.

Open FlashTool as administrator.

Copy your unlock bootloader key that you received

Make sure drivers are installed. Install them by going to Flashtool install directory (default is C:\Flashtool) and then "drivers" folder. Install the .exe there in.

Click BLU on the toolbar

Connect your phone in flash mode (hold down vol down while device is powered off then connect to your computer. you can release vol button once phone is detected)

This will require you to enter IMEI and bootloader unlock key. You might need to check thrice for this to make sure the IMEI and bootloader unlock key is correctly copied.

Proceed. This will wipe your data completely. I've warned about this earlier on this post so I assume you've did a backup of important files.

Disconnect your phone. If it restarts, you need to shut it down after it booted.

Leave Flashtool open in order to proceed to the steps below.

Fastbooting (flashing) DoomLord's kernel:

Connect your phone in fastboot mode (hold down vol up while device is powered off then connect to your computer. you can release vol button once phone is detected)

Flash DoomLord's advanced kernel by selecting the Lightning icon in the toolbar, select Fastboot mode, then select "Select Kernel to Flash". Navigate to and choose your downloaded DoomLord's kernel

Unplug your phone

Boot into CWM, by multiple pressing the volume up button when the LED bar lights up.

You may now close Flashtool.

Please follow the guide below.

3) Flashing the M10

You can navigate in CWM by using the volume and power keys or by swiping the screen up, right, down, left.

Wipe everything you can.

WARNING: Please be careful to not wipe the /boot.

go to "mounts and storage"

Format /system

Format /data

Format /cache

Go back to main menu

Advanced > Clear Dalvik Cache (this is quite optional)

Go back to main menu

Attempt "Wipe data/factory reset

Flash the M10

Go to Install zip

Choose Choose zip from /storage/sdcard1 (I am assuming you copied CM M10 into your SD card)

Navigate to the zip you've copied, and select it

Choose yes

Flash gapps. The flashing process is similar to how you flashed the M10 based on the steps above.

Reboot the phone

You now have Cyanogenmod! Congratulations! Set up your phone as usual now.

Restore your backup.

----

If you have any more question and the question is unique / unavailable or not questioned yet, just create a new thread in the general section. :)