How to use flashtool on Linux

Hi,
I want to go back to the stock ROM on my Sony but I don’t know how to do that.
I read that I need to have FlashTool installed. I’m on Linux mint and I have no idea how it can work.
I also read that I need to change the udev rules but I don’t know how to do that.
Anyway I’m stuck here can anyone tell me how I can use Flashtool ?
I did a backup of my phone before flashing it with /e/. Maybe I don’t have to use Flashtool to re-install Sony ROM ?
I’m not good with all this, sorry, but if someone can tell me how to do, it would be wonderful

Which Sony phone?

First step would be to get XperiFirm for getting the ROM

These instructions for installing XperiFirm worked on ubuntu, but I have no idea with Mint.

Flashtool is a bit arduous, Newflasher would be easier if it was compatible with your phone…

My phone is a Sony Xperia xz1 compact

I think you would be ok with newflasher but I wil try to check. In any case you would need the firmware first.Have you already got XperiFirm? It can take some time to get set up and download the firmware.

I got it but when I put the last command ($ mono XperiFirm.exe) it’s open a window and searching and then it says :
Error: Failed to connect to the server. Check your internet connexion and/or proxy settings

Ah. Hmmm. Me too!!
First time that’s happened. I haven’t used this for months. Have to see if we can find the problem. :grimacing:

Sorted this end.I had older version and there have been some developments with the software (see the last two pages of the XDA XF thread.

Run the command in your XF folder (for 64 bit pc)

mono XperiFirm-x64.exe

See if it works…

I’m sorry I don’t understand what you’re saying. Where do I find the XperiFirm-x64.exe ?
I have the v5.4.0 and there is no such file called XperiFirm-x64.exe

The older versions not working for me. Same problem as you reported.

Download latest version and you will understand the previous posts

However I have just been reading previous posts about your problem with lilac. The latest stock you’ll get is pie as far as I can tell.

I’m sorry, maybe I’m tired but I can’t find the latest version apparently.
Do you have a link where I can get it ?

It’s the first link I sent you! XDA thread, first post , scroll down a bit… :wink:

And here’s the link for newflasher.

When it comes to choosing which firmware I don’t know much about it except to say that if you just want a stock android as a step to further custom rom flashing, usually go for a “customised” for your country version. You may want to go for a carrier version if there is one for your sim.

In uk I’m on 3 network and I once flashed 3 version stock. It came with their app preinstalled. Usually though, I just go with customised.

Ok I have the Firmware and newflasher.
Now I don’t want to do stupid things so I read that I have to put my phone into flash mode. How do I do that ? And then I have to plug it to the computer ?
Then I just double click newflasher.exe ? Even if I’m on linux ?
And that’s it ?
I’m sorry, I’m really bad at this

There’s a bit more to do yet!

First prep the firmware. Extract it to a new folder. This folder will be the base for what follows.
I don’t know exactly what your specific files will look like but it should be similar to what I;ve done with xperia xa2. It is also how the newflasher creator advises on his forum thread.

In the new folder:
Remove any “persist files”. There may only be two, poss. more.
Look for any partition files or zip and come back to them in a moment.
Create a new folder and name it “partition”
If there is partition zip: extract it and move the files into your new partition folder. Or if it’s justt a file or two move them into new folder.

That’s the firmware prepped. I’ll carry on with steps in another post. I only have about 20 mins more.

Now move XperiFirm-x64.exe into the prepared firmware folder.

When I got the firmware it made a new folder called G8441_Customized etc…
In this folder there is already a folder called “partition” in which I have this :
partition_delivery.xml
partition-image-LUN0_X-FLASH-ALL-C93B.sin
partition-image-LUN1_X-FLASH-ALL-C93B.sin
partition-image-LUN2_X-FLASH-ALL-C93B.sin

Do I have to create a new folder “partition”

Is it at the top of the list, next to maybe boot folder? If yes, then that’s ok, no need to change.

Yes it just after boot folder.
So I put the newflasher.exe in there ? And the XperiFirm-x64.exe ?
And then I put my phone into flash mode. How do I do that ? And then I have to plug it to the computer ?
Then I just double click newflasher.exe ? Even if I’m on linux ?

On xa2 flashmode is: device power off, hold vol down while plugging usb into pc. Opposite of fastboot mode. Does that help?