[Sony Xperia E3] Thyrrr:
You mean, what's the program to flash your device?

You have two options, you can use "fastboot" from Android SDK Tools or "flashtool" from Sony (flashtool only works on Sony devices).

I'll do a brief explanation on how you can do that using both methods, but first, read the entire post and remember that you could brick your device, so do your research before flashing anything...

First and foremost, if you want to flash your device, you have to have your bootloader unlocked, you can't proceed if you forget this step. Read more on how to do it at: h.t.t.p://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/

You will also need the drivers for your device installed, look up on google for Sony Xperia drivers

And one more thing, keep in mind that flashing overwrites everything in your phone, so do a backup of your contacts, files and everything that you need! (If you have a custom recovery installed (Like TWRP or CWM), you can do a full system backup and keep a working version of your system just in case things go wrong! [I've explained how to install a custom recovery at the end of the post]).

From now on, I assume that your bootloader is unlocked, you have the correct drivers installed and did a backup of your files (And a full system backup, just in case).

The first method you could use for flashing is through fastboot (And I recommend it). You have to download and install Android SDK Tools (It is a bundle from Google that comes with a lot of stuff for Android Developers, it has fastboot, adb... Google it for download links), then you open up a command prompt at the fastboot executable folder (<Path>/Android/sdk/platform-tools/) (Or append your PATH variable pointing to the absolute executable folder [Google how to do it]). Now you have to put your device into bootloader mode (Plug the usb cable, shutdown your device [Hold Power+Vol Up+Vol Down buttons for ~5 seconds], then release all buttons and hold only the Vol Up until the notification light becomes blue). If you did everything correct, you can just follow up what OP's said (Go back to the first post and read it again):

fastboot flash boot /PATH/TO/YOUR/DOWNLOADED/boot.img

fastboot flash system /PATH/TO/YOUR/DOWNLOADED/system.img

fastboot flash userdata /PATH/TO/YOUR/DOWNLOADED/userdata.img

fastboot flash cache /PATH/TO/YOUR/DOWNLOADED/cache.img

fastboot reboot

The device will reboot and should work. I also recommend flashing a new recovery (TWRP) afterwards, I'll explain how to do it at the end of the post.

PS: If you didn't append your PATH system variable, you will have to provide the full name of the executable file. Assuming that you are in the right folder on the command prompt [<Path>/Android/sdk/platform-tools/], the command should be "fastboot.exe flash boot boot.img" on Windows, or "./fastboot flash boot boot.img" on Linux/OSX (Linux/OSX users: Don't forget to chmod u+x fastboot). Otherwise you will have to use the absolute path to the executable (As in: C:\Program Files\Android\sdk\platform-tools\fastboot.exe flash boot boot.img).

The second method for flashing is using flashtool from Sony. Lookup for download links and install it. First, open up flashtool, click on the thunder icon, select fastboot mode, follow the instructions to put your device into bootloader mode (The same way as I mentioned before), then click on flash kernel image and select boot.img from OP's, wait until finished, then click on system flash and select system.img. Reboot your device and it should work.

Your device should be working normally right now, one additional step that I always do is to flash a new recovery (TWRP or CWM). There is a build for TWRP's by Vinay at: h.t.t.p://xdaforums.com/xperia-e3/development/twrp-twrp-recovery-sony-xperia-e3-t3071382

To flash a new recovery, just download the flashable zip, extract it, shutdown your device and put it on bootloader mode. Open up the command line and do a: "fastboot flash boot recovery-twrp.img" (If using Android SDK Tools) or flash a new boot image on Flashtool (Same method as mentioned before).

And now the debugging part:

If for some reason your device get stuck after flashing (Boot loops, Sony logo fading and device apparently shutting off), you have two options, if you did a full system backup on TWRP, reflash the recovery and restore your backup. If you didn't backup your system, you should re-flash the stock firmware image (Download your device stock firmware image [Search for your device model at from h.t.t.p://xperiafirmware.com/ and download the ".FTF" file there. Copy the file to "<Path>/flashtool/.firmware" folder], then open up Flashtool, click on the thunder icon, select Flashmode and follow the steps to put your device on flashmode (Shutdown, after that press Vol+DOWN) then click on write to reflash stock image).

Edit: Forgot to mention, after installing your system, you *most likely* will want to install GAPPS, just go to h.t.t.p://opengapps.org/ and download the ARM, 6.0, Pico zip. To install it, you have to flash it using a custom recovery.

There are two ways of flashing it, you can do it without copying the zip file to your device (using adb sideload) or directly copying it to the internal/external memory and flashing it from recovery.

I find flashing from adb sideload way easier, but I'll explain both methods.

Assuming that you have flashed TWRP, go to recovery mode (Reboot the device, press Vol Down until the notification light turn red), then click advanced and select adb-sideload. Plug the usb cord and open up a command prompt at the platform-tools folder (If you haven't set up your PATH), now do:

adb sideload /PATH/TO/DOWNLOADED/open-gapps-pico-6.0-arm.zip

This will install gapps. After finishing, head back to your phone and click on "Reboot System".

If you want to do the old way, copy the gapps zip file to your internal/external memory (Many ways of doing that), then reboot to recovery, click on Install Zip and select the gapps zip file. Swipe to flash the file and after it finishes, reboot your phone.

Well, if you followed along, your device should be up and running (With GAPPS installed).

The last thing that I want to mention is, and I can't stress enough, DO YOUR RESEARCH before flashing anything!! These questions get asked all the time on the forums, if you have any question, click on the search bar and you most likely will find the answer to it!