Remove All Ads from XDA
Win Honor 9 Lite

[Reference:] All Things XPERIA; Debranding; Rooting & More...

7,942 posts
Thanks Meter: 2,795
By SXUsr, Senior Member on 26th December 2012, 04:23 PM
Post Reply Email Thread
The purpose of this thread is designed to help you unlock the full potential of your new Phone and as most XPERIAs are similar in the way you modify them this is wrote as a general reference and suited more for 2015/16/17 devices. You can find a reference thread for older XPERIA devices HERE.

The process of tinkering with any Device can seem a like a daunting process for New members but it's really quite simple so long as you read EVERY WORD of a thread describing how to Modify your Phone you won't go far wrong.
The things covered in this thread and in the general order of modifying a new XPERIA are...
  • SIM Unlocking
  • The Flashtool, Updating, Unbricking & De-Branding
  • DRM/TA.img Backup
  • Fastboot, Bootloader Unlocking/relocking
  • TWRP Recovery
  • DRM/TA.img Restore
  • Rooting
  • Modifying & Theming
...that will help you achieve your desired end result.

  • SIM Unlocking:
NOTE: The ONLY WAY to Sim Unlock your Phone is to buy it SIM-Free or PAY for it, so do some Googling and read which services have been recommended in the past. O2 Contract Users however can use this FORM to request an unlock code.

  • The Flashtool, Updating, Unbricking & De-Branding:
The Flashtool is simply what it says on the tin, it's a flashtool that flashes Firmware to your device in a similar manner as SEUS or PC Companion does and this is generally the preferred method for updating or repairing a device.

You can also use the Flashtool to flash a Generic .ftf which will remove any Operator Branding from any device, this video by BlueChipJ explains the process of using it...
You can find firmware files in your devices section or you can use XperiFirm by @IgorEisberg which is built in to and works along side the flashtool to download and flash firmware to your device..
There is also an Official Sony Flash Tool for certain devices with unlocked bootloaders.
- Official Sony Flash Tool..

Further reading:
  • DRM/TA.img Backup:
NOTE: To root newer versions of Android you HAVE to unlock the bootloader, no ifs, buts or maybes unfortunately. Before doing so we need to back up our DRM keys that we can restore them later if we don't want to lose a few features, because they will be lost in the process of unlocking the bootloader and there is no getting them back if you don't back them up. Unfortunately the tool required to backup our DRM keys doesn't work on Nougat so downgrading to Marshmallow is required, but you can simply use the flashtool for that.

Once you've downgraded then you need Universal (Dirtycow-based) TA Backup v2 by @rayman to backup your DRM keys. Backing up isn't essential if you don't want but you are strongly advised to, you have been warned!

Further reading:
  • Fastboot, Bootloader Unlocking/Relocking:
You can find a great Guide HERE that will show you how to use Fastboot which is the method used for working with the bootloader. There is one way to Unlock yours, using the Official method (For SimFree/Un-Branded Phones) which is explained HERE, but PLEASE NOTE! - If your Phone came from a Carrier then chances are (99%) you won't be able to unlock. There is a simple method of checking if you can or not which you'll find HERE.
The stock bootloader on most Android phones is set up to run a signature check on any update file you attempt to flash to your NAND internal memory. So if you were to take a stock Android phone purchased from a carrier, and try to install a custom ROM on it, you'd get nowhere fast. Even after rooting, you still need to get access to the bootloader. Basically, unlocking the bootloader lets you install unsigned ROMs, like CyanogenMod.
- Know Your Android Bootloader - What it is and Why it Matters

Further reading:
  • TWRP Recovery:
See your devices section for TWRP recovery support.
An essential tool for anybody that loves to modify their Android device is a good custom recovery. TWRP has been around since the invention of the wheel back in 1996 and has been providing modders with all kinds of great tools. If you’re wondering how to get TWRP on your device this guide should help you with that. I’ll also go over all of the basic functions of the recovery and what they can be used for.
- How To Install TWRP Recovery

  • DRM/TA.img Restore:
If you backed up your DRM Keys/TA.img then you have a couple of options to restore them.

We can use PoC...


First of all this tool fully replaces DRM fix! So do not use our tool with DRM fix!!! I'm going to explain what is this, how it working. Everybody know what drm fix doing and everybody know whats happening when bootloader is unlocked. Ok. This PoC is designed for unlocked devices and makes things identical to having bootloader never unlocked! Which mean this is for peoples who have backup of the trim area BEFORE unlocking bootloader! This PoC mounts your trim area backup (TA.img) to the kernel loop5 device which makes your trim area like real trim area partition (in our case it mounts your backup TA.img and uses it instead of unlocked trim area partition) so everything after android boot up is like having locked bootloader which mean all drm keys, widevine keys and etc is fully functional! And most better thing, we can use PoC with AOSP, CM or whatever for having trim area fully functional!!!
Do in mind this is for stock roms only! Only nougat and marshmallow by now, some of before marshmallow too.

- [PoC][Work in progress] Trim Area Proof Of Concept by @munjeni

Or we can use the Root kernel tool...


This tool repacks an existing kernel package (usually the stock kernel) in order to make it rootable and adds TWRP recovery as well. Version 4 has been succesfully tested with LP and MM.
In particular it adresses the following issues:

  • DM-Verity: Android is now using dm-verity to verfy the integrity of the system partition. Until you switch it off your phone won't boot after modifying /system
  • SONY RIC: RIC is blocking the write access to the system partition
  • DRM Keys: After unlocking the bootloader your device key is wiped, which deactivates some functionaliy. E.g. x-reality, denoise in camera aso.

- [ROOT][Kernel][TWRP] repack of the stock kernel with dm-verity and SONY RIC off by @tobias.waldvogel.

Further reading:
  • Rooting:
When you root your phone, you gain “superuser” privileges to the Android operating system. When you are using a stock device, you have the equivalent of “guest” privileges. If you are familiar with any Linux operating system, you know that the superuser privilege allows you to gain access to administrative rights. This level of access gets you down to the nitty gritty of the OS with no restrictions, lets you make changes to the system, and run scripts that would normally be blocked with a standard user account.
- What is rooting and why should I do it? The pros & cons of Android rooting

Further reading:
  • Modifying & Theming:
There are a few ways to theme an XPERIA device, use the Apktool method or we now have Sonys Official Theme Creator to create themes. Check out Substratum too.

Further reading:
The Following 29 Users Say Thank You to SXUsr For This Useful Post: [ View ] Gift SXUsr Ad-Free
26th December 2012, 04:27 PM |#3  
Hi all.

Just a short write up as a follow on from THIS thread as this is relatively quite simple.

So you want to change your notification background from the plain dark color to something a bit more your style...

...well all you need to do is decompile your SystemUI.apk and navigate to the values folder and open up your drawables.xml and you should see something like this...

    <item type="drawable" name="notification_number_text_color">#ffffffff</item>
    <item type="drawable" name="notification_item_background_color">#ff111111</item>
    <item type="drawable" name="notification_item_background_color_pressed">#ff257390</item>
    <item type="drawable" name="ticker_background_color">#ff1d1d1d</item>
    <item type="drawable" name="status_bar_background">#ff000000</item>
    <item type="drawable" name="status_bar_recents_background_solid">#e5000000</item>
    <item type="drawable" name="status_bar_recents_app_thumbnail_background">#88000000</item>
    <item type="drawable" name="status_bar_notification_row_background_color">#ff090909</item>
    <item type="drawable" name="notification_header_bg">#ff000000</item>
    <item type="drawable" name="notification_tracking_bg">#e5000000</item>
    <item type="drawable" name="recents_callout_line">#99ffffff</item>
    <item type="drawable" name="notification_item_background_legacy_color">#ffaaaaaa</item>
Simply change these two lines...

<item type="drawable" name="notification_item_background_color">#ff111111</item>
<item type="drawable" name="notification_item_background_color_pressed">#ff257390</item>

<item type="drawable" name="notification_item_background_color">@drawable/status_bar_item_background_normal</item>
<item type="drawable" name="notification_item_background_color_pressed">@drawable/status_bar_item_background_pressed</item>
...then add two .9 png images of the same name, status_bar_item_background_normal and status_bar_item_background_pressed to your drawable-hdpi folder, recompile, zipalign, push to your Phone, done.

Quick Tip: If you can't create a .9 from scratch just edit the first two in drawable_hdpi which in my folder is alert_bar_background_normal.9 and alert_bar_background_pressed.9, just remember not edit over the .9 borders.
The Following 4 Users Say Thank You to SXUsr For This Useful Post: [ View ] Gift SXUsr Ad-Free
30th December 2012, 08:44 PM |#5  
Senior Member
Thanks Meter: 2,248
Good work mate, maybe someone could make a sticky of this?
30th December 2012, 09:14 PM |#6  
FAdrums's Avatar
Senior Member
Thanks Meter: 909
Once again, excellent thread! Congrats and thanks for your research and contribute to the xperia community!

Sent from my LT18i using Tapatalk 2
31st December 2012, 09:58 AM |#7  
Originally Posted by mihahn

Good work mate, maybe someone could make a sticky of this?

Thanks, and it probably should be a sticky.
Originally Posted by FAdrums

Once again, excellent thread! Congrats and thanks for your research and contribute to the xperia community!

8th January 2013, 04:42 PM |#8  
predatOr's Avatar
Senior Member
Flag Hisar
Thanks Meter: 1,006
Should be stickied...
Nice job with the thread
9th January 2013, 03:41 PM |#10  
Thanks Meter: 0
Nice jop and keep going!
Post Reply Subscribe to Thread

bootloader, guide, noob, rooting, xperia

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes