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 things covered in this thread and in the general order of modifying a new XPERIA are...
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.
...that will help you achieve your desired end result.
- SIM Unlocking
- The Flashtool, Updating, Unbricking & De-Branding
- DRM/TA.img Backup
- Fastboot, Bootloader Unlocking/relocking
- TWRP Recovery
- DRM/TA.img Restore
- Modifying & Theming
- SIM Unlocking:
- The Flashtool, Updating, Unbricking & De-Branding:
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...
[YOUTUBE]Keo61Zffh5Q[/YOUTUBE]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.
[youtube]PKSyZ2amVNY[/youtube]- Official Sony Flash Tool..
- How to install Flashtool on Ubuntu
- Newflasher (xperia command line flasher for 2017 devices)
- [GUIDE] Recover 2012 and newer XPERIAs from SOFT-brick
- DRM/TA.img Backup:
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!
- [TOOL] Backup TA for Mac OS X [v1.4][2015-05-13]
- [REMAKE][UNMAINTAINED][TOOL][LB][ROOT] Backup TA v9.11 for Linux
- [UNMAINTAINED][TOOL][LB][ROOT] Backup TA v9.11 for Windows 
- Fastboot, Bootloader Unlocking/Relocking:
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
- [HOW-TO]Set up Android SDK/ADB/Fastboot on Ubuntu Linux
- [GUIDE] Set up ADB and Fastboot on a Mac easily (With Screenshots!)
- [miniTUT][WIN10]Installing ADB Drivers for Sony Devices on Windows
- Fastboot & Flashboot ADB Driver installation on Windows 8 Guide for Sony Xperia Users
- TWRP Recovery:
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:
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.
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.
- CONFIRMATION OF TA RESTORE!
- [Z~Z5 Series][EXRxTHS]SONY DRM FUNCTION RESTORATION FOR UB DEVICE | Z3 lines support!
- Extracting A 'boot.img' From An FTF
- [TOOL] UnSIN ~ SIN v3/v4 Unpacker
- [TOOL][Windows,Linux,Android] Unpack any format of the Sony image
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
- SuperSU v2.82 SR2 Release
- [MOD] Boot Bridge for Sony ELF
- phh's SuperUser/ OpenSource SELinux-capable SuperUser
- [2017.7.20] Magisk v13.3 - Root & Universal Systemless Interface [Android 5.0+]
- PRFCreator - easily create pre-rooted firmwares
- [ROOT] [STOCK] [TWRP] Root Stock Firmware of Any Modern Sony Device
- [GUIDE]How to make a rooted flashable rom from ftf file[FOR ALL XPERIA PHONES]
- Modifying & Theming:
- [Info:] XPERIA Theming Resource Thread
- [Guide:] The Definitive APK Modding & Theming Thread
- ?All System Apps And Details [15/12/2012]?
- [MM/N] [UB] [COMBINED] System/OEM Debloat Script
- [Guide] Ultimate RAM and Battery management for All Rooted Xperia Devices
- [MOD][GUIDE]Remove Signature Verification for all devices
- [Guide][SuperUserMOD] disable signature verification nougat/MM
- Create a personalized ROM yourself!
- How to build a Linux kernel and flash it to the phone
- How to get & read a logcat/ Troubleshoot your own issues!
- How to Flash boot.img / kernel.elf / kernel.sin using flashtool
- [MOD] XperiaMultiROM - MultiROM for Sony Xperia devices
- [DEV]Chroot-Linux on Xperia Devices Locked/Unlocked Bootloaders(Debian,Ubuntu,BT5up)