[Sony Xperia C4 Guides, News, & Discussion] bigrammy:
Sony Xperia C4 Single/Dual and C5 Ultra Single/Dual. Remember to hit the Thanks button before leaving. Note: 20,000 + views and only 45 THANKS :crying: How hard can it be. NOTE: THIS WILL NOT WORK ON CARRIER'S CUSTOM BOOTLOADERS (SIM LOCKED) AND IT WILL NOT FULLY WORK ON THE STOCK MM 6.0 ROM'S YOU WILL NEED TO ROLLBACK TO LP 5.1 TO SUCCESSFULLY COMPLETE THIS TUT. MORE INFO CAN BE FOUND HERE​

PLEASE STOP POSTING OFF TOPIC QUESTIONS IN THIS THREAD!!! PLEASE READ THE TITLE AND IF YOUR QUESTION DOES NOT INVOLVE THE BOOTLOADER OR RECOVERY POST IT IN THE GENERAL OR Q&A SECTIONS WHICH CAN BE FOUND HERE. THANKS​

Your warranty will be void!!!!

You will lose all your Data due to Factory Reset!!!

I am not responsible for bricked devices, loss of data, non working Banking apps etc, dead Wifi, Bluetooth, gps, sim slots, imei missing thermonuclear war, or you getting fired because the alarm app failed. Please do your own research and if you have any concerns at all then do not proceed YOU are choosing to make these modifications of your own free will so please do not point your finger at me for YOU messing up your device.

Confirmed Device List.

PHONE SIM/REGION Model # bootloader Version ROM Version
[COLOR="YellowGreen"]Sony Xperia C4 (Single/Euro) E5303 0.5 27.1.A.1.106 [/COLOR]
[COLOR="YellowGreen"]Sony Xperia C4 (Dual/ Euro) E5333 ?.? 27.1.B.1.106 [/COLOR]
[COLOR="YellowGreen"]Sony Xperia C4 (Dual/HK ) E5363 ?.? 27.1.B.1.115 [/COLOR]
[COLOR="YellowGreen"]Sony Xperia C5 (All/All ) All ?.? 29.0.A.1.55[/COLOR]

Please let me know all confirmed device with the info as above so I can add it to the list. Please see Post #2 for more info on other variants​

1. Ok in this How Too we will:

Unlock the Bootloader

Install a custom recovery (TWRP)

Root the phone.

2. Prerequisites:

Correctly installed Drivers for your Phone!!

Get them Here http://developer.sonymobile.com/downloads/drivers/

Fully test ADB and Fastboot before you do anything to ensure all is setup and working correctly. See Setting and Testing for the noobs:

Try this if you still have problems See Here

I will not respond to any adb fastboot not working stuff. If you can't get these working you should not be flashing or rooting phones.

ADB & Fastboot for Windows are contained in this ADB & Fastboot Files .zip HERE. See Post #3 for updated and variant specific recovery's as they become available and be sure to use the correct one for your device and NOT the one in this .zip

3. Setting and Testing for the noobs:

On your device go to Settings/About Phone Scroll to the bottom and tap Build number repeatedly until it says "You are now a developer"

Go back to Settings Scroll to the bottom and you will now see "Developer options" tap on it to enter.

Turn On Developer options and check (tick) the "usb debugging" box.

Also in Developer options check (tick) the "oem unlock" box if it exists.

Connect your phone and PC with a usb cable.

Open a cmd window in the same folder as the adb and fastboot or "cd" (Change Directory) to that folder.

eg: cd C:\Users\bigrammy\Desktop\Phones\Sony C4\adb-recovery\ or in the pro versions of windows Open the adb folder place your cursor inside, hold Shift and right click and from the option box select open "command window here"

Now type

adb devices

If all is working you should get the serial number of your phone shown saying unauthorised

Check your phone screen and you will see a popup asking if you would like to trust this PC. Place a tick in the box (Always Trust this PC) and press OK.

Now repeat

adb devices

and you should get the serial number of your phone shown saying "connected".

Now enter

adb reboot bootloader

The phone will reboot to fastboot a black screen and tiny tiny writing in the bottom left corner

saying Fastboot

Now enter

fastboot getvar all

the cmd window will show a long list of all the bootloader info (Make a Note of it for future ref)

Output will look like a longer version of this.

(bootloader) partition-size:preloader: 40000
(bootloader) partition-type:preloader: raw data
(bootloader) version: 0.5
(bootloader) secure: yes
(bootloader) version-baseband: 1292-1552_27.1.A.1.106
(bootloader) version-bootloader: 1292-1556 S1_Boot_MT6752_TC9SP_11
(bootloader) serialno: NONEEDTOKNOW
(bootloader) product: E5303
all: Done!!
finished. total time: 0.159s

Now enter

fastboot reboot

and the phone will now boot back to system.

Hopefully all is working and we can now move on.

4. Unlocking the Bootloader:

Pre Warning this worked on my phone and I cannot say it will work on yours you may end up with a soft brick so think and research before you proceed.

In this statement from Sony's official bootloader unlocking guide

My phone stated "NO" and as you can see from the bootloader info above in 3. Setting and Testing for the noobs: said secure = yes but been a :cowboy: I went ahead anyway and here is the weird and lucky for us thing.

After I unlocked it I got (bootloader) secure = NO from fastboot but the system software still reported Bootloader unlock allowed = No :silly:

Nothing tripped no warranty warnings nothing it's like the system never even knew :D sweet.

So now goto http://developer.sonymobile.com/unlockbootloader/ and select device Xperia C then follow all their instruction. (Credit for this belongs to another member I will add it when I find the post)

When you have booted to "bootloader" use

adb reboot bootloader

to do so.

Then enter your fastboot cmd line given to you by Sony mine looked like this.

fastboot -i 0x0fce oem unlock 0xMYDEVICEUNLOCKCODE

When it says "finished" or "Done" hopefully with no errors just enter

fastboot reboot

Now go make a cup of tea as this will take a good good while because your phone will factory reset wipe all data and then have to rebuild all the cache etc etc before finally fully booting to the system. If you get as far as the boot animation then don't worry and allow a good 15 > 20 mins before panicking.

Well Hopefully you booted into your As New system go through all the setup and re-enable USB Debugging remembering to accept the prompt again from adb to allow this PC as above.

5. Install a custom recovery (TWRP)

Pre Info and Practice:

Copy the SuperSU.zip to the root of your internal and external storage.

Practice Entering recovery and fastboot using the buttons and keys here's a quick tut.

1.Unplug the USB lead and Power off the Phone.

Entering Recovery:

Press and keep held the Volume Down key (-)

Now Press and hold Power Key until you see the Sony Boot Logo then release the Power Key only.

You can release the Volume Down Key when you see the Logo screen change or you are in recovery.

Entering Bootloader:

As above but using the Volume UP key (+) instead.

Bootloader is Black screen tiny text "fastboot" bottom left corner.

Once you have mastered this it's time to move on.

Enter bootloader manually or via adb

adb reboot bootloader

Check the bootloader status

fastboot getvar all

output should show

(bootloader) secure: No

in the last few lines.

If it says No enter

fastboot flash fotakernel fotakernel.img

It should display a size and some seconds info with complete or success you should see NO warning or errors.

THIS IS IMPORTANT

The rom has

recovery.from.boot.p

if the phone boots to system at this point the recovery you just flashed will be replaced by the stock one and you will need to repeat the above.

Once the fotakernel.img is flashed just unplug the USB cable and the phone will power OFF.

This is where your practice from earlier becomes useful :laugh:

Using the Keys boot to recovery (Volume Down) when TWRP boots you will get a warning about it not mounting system just tick you want it to mount /system nothing in our system seems to trip so everything is cool. :cool:

You could make a /system backup at this point if you wanted to restore a unrooted version at any point.

In TWRP Go to "Install" and find the SuperSU.zip select it and swipe to flash it.

When that's done go to mounts and tick "system" go back to Home then go to /Advanced/file manager/system find recovery.from.boot.p and if it exists press and hold it from the popup menu select Delete.

Now press the Home icon and that's it you're rooted with no chance of the recovery getting replaced unless you do it yourselves.

Now Reboot to system.

The recovery supports mtp/adb see mount options so you can copy files to and from the PC

Only thing I may to try fix later is usb/otg when I get time as I will have to plough through all the init. files to find where sony put the mount point Fixed see Post #3.

6. Files and recovery's

ADB & Fastboot for Windows are contained in this ADB & Fastboot Files .zip HERE. See Post #3 for updated and variant specific recovery's as they become available and be sure to use the correct one for your device and NOT the one in this .zip

Recovery's are in POST #3 Choose the correct one for your device and change the one contained in the ADB & Fastboot Files .zip

Leechers Please don't take my work and try pass it off as your own on blogs and other language forums. I don't get paid but would like a little credit and a Thanks.

4pda at least tell your readers to visit this post first and hit that button below. :(

My Credits as always:

[MENTION=4478781]yuweng[/MENTION] for been a Mediatek guru

[MENTION=5186178]carliv[/MENTION] for teaching me about Mediatek recovery's and solving the riddle of these mtk 64bit SoC

[MENTION=4904057][NUT][/MENTION] and all the Sony Xperia dev's for some mind blowing Work.

[MENTION=631273]Chainfire[/MENTION] For SuperSU

TWRP Team for their incredible Recovery.

Last but not least the forum for expanding my knowledge. :highfive: