[Sony Cross-Device General] mbc07:
Due to new security measures added on recent Android versions (mainly dm-verity), using dd Flasher on newer devices or recent firmwares (Marshmallow, Nougat, etc) will certainly result in a bootloop. dd Flasher probably still works if you have a unlocked bootloader and a modified kernel disabling dm-verity, but due lack of free time and other priorities, this tool is currently unmaintained.

Introduction

This tool is a new version of Nicki Root (originally released for Xperia M), but now compatible with almost any device. The purpose of dd Flasher is keeping root access in any firmware version assuming your device already have an exploitable firmware...

How it works?

Sony updates are packed in .sin files, generally stored in FTF packages. Using FlashTool, you can get an image of the system partition (system.ext4) of the latest firmware available, which is sideloaded into your device by dd Flasher. Next, it'll mount the update image (system.ext4) in a loop device, place SuperSU binaries (and when needed, disable RIC protection) and after that, stop all running processes and "flash" the modified image back into your device by using dd binary.

After dd Flasher finishes its work, all you need to do is rebooting your device into flash mode in order to flash the rest of the FTF file (excluding system partition, of course) with FlashTool. In the end, your device will be running the latest available firmware with full root access, making dd Flasher extremely useful for devices with locked bootloader that have exploitable firmwares but lack recoveries or other means to get root access.

Requirements

• Your device must already have root access. You can downgrade to an older firmware and root it with some known exploit, if needed. Also, if you don't have root access, dd Flasher won't work at all.

• You will need FlashTool and an FTF file of the firmware version you want to upgrade your device to.

• Your device should have enough free space to store system partition image of the update temporarily (around 1.5-2.5GB, depending of the device/firmware). At the moment you can store the image either on its Internal Storage or in external SD Card (when possible). USB OTG support is planned too.

• If pushing system image to SD Card, make sure your phone is connected in MTP mode (in Mass Storage mode only Internal Storage is accessible and dd Flasher will fail)

Instructions

Getting system partition image: FTF files are just ordinary .zip files with lots of .sin files inside, format commonly used by Sony in their firmwares for Xperia devices. We are interested in system.sin (it's the one with the partition image), to use it with dd Flasher, so:

• Open the FTF file with WinRAR or 7-Zip (or any other program compatible with .zip files);

• Extract system.sin somewhere you have easy access;

• Open FlashTool and go to Tools => SIN editor;

• A new window will open. Locate system.sin we extracted before, click in "Extract Data" and wait until FlashTool finishes extracting it

• If everything went well, now you should have a system.ext4 file in the same place you extracted system.sin before (you can already delete system.sin -- we won't need it anymore).

Using dd Flasher: now that we got our system partition image, we can move on to dd Flasher:

• If you didn't already have extracted dd Flasher somewhere, do it now (DUH!). Make sure FlashTool isn't running as well -- it's known to interfere with ADB interface;

• Move system.ext4 extracted previously to the same folder you've extracted dd Flasher (where dd_flasher.bat/dd_flasher.sh is located);

• Open dd_flasher.bat (or start dd_flasher.sh from a Terminal if you're on Linux) and follow the instructions. After selecting a storage device, dd Flasher will do its work;

• Please note some steps take a while to complete (mainly pushing the system image and flashing it), your device will look like it's dead and won't respond but don't worry, it's normal (on compatible devices the notification LED will pulse in different colors to indicate the the script is running);

• If everything went well, dd Flasher will notify you (and your notification light will be green, if compatible). After that, you'll need to power cycle the device, disconnect the USB cable and pull your battery off (if your battery is non-removable, use the Off/Reset microswitch). Wait some seconds and put your battery back but don't turn your device on yet.

Flashing the remaining with FlashTool: at this stage, your device have the latest firmware from the FTF you used and full root access but still have old versions of kernel, baseband, etc., so, trying to start your device now will probably result in a boot loop or something like that, so, let's finish it:

• Open FlashTool again and flash the FTF you used to extract system.ext4 in flash mode, however, make sure you've excluded SYSTEM, if you forget to do so, everything the tool did will be lost and you'll need to restart from the beginning;

• After flashing ends, disconnect the USB cable and start your phone. The first boot may take several minutes but if everything went well you should be now running the latest firmware, with full root access!

Compatibility

This tool uses an internal database to automatically set up everything needed in the officially supported devices, with at the moment are:

• Xperia E series (C1504, C1505, C1604, C1605)

• Xperia E3 series (D2202, D2203, D2206, D2212, D2243)

• Xperia M series (C1904, C1905, C2004, C2005)

What to do if my device isn't officially supported? dd Flasher also comes with a "default" config which is automatically selected when used in a unknown device. It should work by default in any Xperia (and may even work in devices from other brands), but if dd Flasher still refuses to work, PM me your device model and firmware version, I'll try to support it ;)

FAQ

Soon

Credits

Although I wrote this script from scratch, it uses some pieces of code written originally by [MENTION=3975929]zxz0O0[/MENTION], [MENTION=4904057][NUT][/MENTION] and [MENTION=631273]Chainfire[/MENTION], so, credits to them. I would like to thank also everyone who helped directly or indirectly in the conception of the original Nicki Root script, which became what we know today as dd Flasher

Changelog

Soon

Download

All currently released versions available in downloads tab.

XDA:DevDB Information

dd Flasher, Tool/Utility for the OEM Cross Device Development

Contributors

mbc07

Version Information

Status: Beta

Current Beta Version: 2.0

Beta Release Date: 2015-03-19

Created 2015-03-19

Last Updated 2015-03-19