[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Someguyfromhell:
Tutorials | Firmware | FAQ | First Aid - Updated 13/6/2012

10. Unlocking bootloader

Unlocked bootloader is needed for most custom ROMs and for ALL custom kernels. It allows the booting system to be changed.

This can be done via official way or via test point method. Official way also removes DRM keys, which cannot be restored at all.

WARNING: You will lose warranty with this!

THE OFFICIAL METHOD - You lose DRM!

Go to http://unlockbootloader.sonymobile.com.

Enter service menu, open keypad and enter *#*#7378423#*#*.

Service Info - Configuration, Bootloader Unlock Allowed: Yes/No. If it says Yes, continue. If it says No, do not continue, because it will not work.

On the website, click "Start Unlocking the bootloader".

In the text, there are instructions, what you need to do. Also there are drivers that are needed for this process. Follow the instructions.

Install the drivers, then click Continue.

Enter your IMEI, name and e-mail. Leave out the last number from the IMEI.

You get a code, leave the website open, you will need this code.

Turn off your phone, then connect USB cable to your PC, hold down Volume UP button and connect USB cable to your phone. Blue LED should light up.

You will be asked for drivers. Point to the usb_driver folder where you placed the android_winusb.inf-file, and select the Android Boot loader Interface-file.

Open command prompt, first enter this

cd C:\...\android-sdk\platform-tools

Replace C with the correct drive letter and ... with the path to the android-sdk folder. Next, enter this command

fastboot.exe -i 0x0fce oem unlock 0xKEY

Replace KEY with the key that you got from the website.

Bootloader is now unlocked.

THE TEST POINT METHOD

Go to this topic http://xdaforums.com/showthread.php?t=1285285.

Follow the instructions to patch bootloader.

11. Installing custom kernel

Most custom ROMs will require a custom kernel, some of these include it already(CM, MIUI etc), other you need to find yourself(Hybrom). Installation is done via fastboot. First, you need to find a custom kernel, that will work on your phone. You can find these from Development section.

Make sure your bootloader is unlocked, enter service menu(*#*#7378423#*#*), Service Info, Configuration, if it says Bootloader unlocked: Yes, then it is unlocked.

Make sure fastboot drivers are installed. These should come with Android SDK.

Download the kernel you want. You will need a .img file, which is mostly inside a .zip file.

From the downloads section, download kernel installation package and extract the folder.

Place the .img file inside the folder. If it's name isn't boot.img yet, rename it to boot.img.

Place your phone in fastboot. Turn it off, connect USB cable to your computer, hold Volume UP button and then connect USB cable to your phone. Blue LED should light UP.

Double-click on the flash.cmd file. It will start fastboot automatically and install the kernel.

When finished, disconnect the cable and turn on your phone.

12. Installing custom ROM

Requirements: Unlocked bootloader, ROM .zip file downloaded.

Nothing difficult here.

Place the downloaded .zip file to the root of your SDcard.

Install the custom kernel, explained in previous tutorial.

Enter Recovery(while booting, when screen gets brighter, press Volume Down button until phone enters Recovery).

Make factory reset, wipe cache partition and clear Dalvik Cache(under Advanced).

NB! Do NOT make format /system, because some ROMs require files from system folder and installation will not finish if files are not available. Then you have to install stock ROM again.

Choose install zip from sdcard, pick the downloaded .zip file on your SDcard.

Wait for it to finish and reboot your phone.

13. Relocking bootloader

When you return to stock and/or need warranty back, you will need to relock bootloader. First install stock ROM and kernel and then relock bootloader, else you will have problems. Depending on the unlocking method, there are 2 ways to relock.

TEST POINT METHOD

Start S1 Tool and click Restore button. Should relock the bootloader automatically.

OFFICIAL METHOD

Will not work on test point method, because bootloader was patched there ant not unlocked.

Make sure you have Flashtool installed.

From the downloads section, download Xperia_Relock_Bootloader.zip file.

Extract the package, there is a .ftf file.

Flash the .ftf file with Flashtool.

Bootloader is locked again

14. Preparing for Ice Cream Sandwich update

ICS update is already released. You might want to know, what you need to do to get the update. Make sure, that you have

a working Xperia 2011 device

with stock ROM and stock kernel installed(if you install via PC Companion or SEUS)

and locked bootloader(if you install via PC Companion or SEUS).

Root access doesn't matter(according to current information), whether you have or not. It is lost after update anyway.

PC Companion and/or Update Service installed on your computer.

Drivers working for your phone.

Official update will only be available via PC Companion and Update Service. But you can also use Flashtool to install ICS.

15. Overclock/undervolt/underclock guide

Want to give your phone a small performance boost? Or save battery?

WARNING! The following is done fully under your own responsibility! Overclocking is a dangerous process and doing it without knowledge will end in FULL BRICK! Be careful with what you do and proceed only if you fully understand the process!

You need root, unlocked bootloader and custom kernel, that allows OC/UC/UV, installed.

Install app to edit the CPU, for example SetCPU, SetXperia, NoFrills CPU Control or another one.

Open the application on your phone.

CPU Frequency is the clock, how fast your CPU works. The faster it works, the more power it uses, more heat is generated, info is faster calculated.

CPU voltage is how much power the CPU receives. It can affect, how CPU works. Manufacturers set it to high enough for CPU to work properly. You can set it lower to save battery, however you might occur problems with your phone!

Search on internet for more information about overclocking to know more about it.

Do everything carefully, as a small mistake could result in serious problems(for example, FULL BRICK due to motherboard damage). Repairing can cost more than phone itself.

16. Optimizing your phone's battery life

Tips, how to increase the battery life of your phone.

Turn off GPS, Bluetooth, WiFi, if you do not need them at that moment.

Turn off automatic sync(ronization). This can be done in Settings, but some apps also have those features inside their own settings. For that, open the application, open its settings and look there. These vary, so I can not help any further here.

Look for battery tweaks on the forum. These can be either build.prop or init.d type.

Turn off unnecessary programs, but not which start up automatically again. And do not use taskkillers.

Why? http://lifehacker.com/5650894/android-task-killers-explained-what-they-do-and-why-you-shouldnt-use-them

Turn off your phone, if you do not need it overnight.

Set display brightness to as low as possible, as high as necessary (depending, where you use your phone).

Remove unnecessary widgets. They require also some juice to keep on working and the more there is of them, the more juice is used. If the widgets on the home screen are not necessary, remove them.

If you do not use your phone for a longer period, use Airplane Mode, if it is possible. It saves a lot of battery by turning off all radio functions on your phone.

If you do not use mobile internet provided by your operator (that means you only use WiFi to go on the internet), then you won't need 3G either. Set your phone to GSM only, it saves quite a few % per day.

Underclock/undervolt your phone's CPU, if you have custom kernel that allows it. Do it carefully and only at your own responsibility!

NB! If you underclock/undervolt, do NOT “Set on Boot” until you know that they are going to work. Otherwise if it doesn’t work and your phone randomly reboots, you will get into a boot cycle (not a bootloop) because you put them in “Set on Boot”. You must test before you should do this.

Use apps like BetterBatteryStats or Android's stock Battery Info to find out, what is consuming battery.

And of course, just to mention it - batterystats.bin file has NO influence on battery life!