So I decided I’d like to flash Android on Sony’s Z3 Compact device and spent the whole of the past two days on figuring out how to do it without taking the help of a Windows machine.
I’ve tested the process on Ubuntu 14.04 LTS as well as Fedora 23. Here, goes!
- Add udev rules so that the system recognizes the device
# sudo wget -O /etc/udev/rules.d/51-android.rules https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/android/51-android.rules # sudo chmod a+r /etc/udev/rules.d/51-android.rules
- Install Android tools required just to flash a ROM
# sudo apt-get install android-tools-adb android-tools-fastboot
- Update to ADB 1.0.32
#adb version Android Debug Bridge version 1.0.31 # wget -O - https://skia.googlesource.com/skia/+archive/cd048d18e0b81338c1a04b9749a00444597df394/platform_tools/android/bin/linux.tar.gz | tar -zxvf - adb # sudo mv adb /usr/bin/adb # sudo chmod +x /usr/bin/adb # adb version Android Debug Bridge version 1.0.32
- Download the FlashTool app from here for Linux. The file is of the form .7z and so you need to install the 7zip package using this:
# 7Zip for extracting the package sudo apt-get install p7zip-full
- Extract the downloaded file preferably in a directory which has 644 permissions set.
- To run the FlashTool, we’ll be needing open-jdk and so we’ll need to install it:
# Java to run the program # http://openjdk.java.net/install/ sudo apt-get install openjdk-7-jre
- To make sure your FlashTool is working fine, run this command where you’ve extracted the folder:
[abhiram@localhost xperia]$ pwd /home/abhiram/Documents/xperia [abhiram@localhost xperia]$ sudo FlashTool/FlashTool [sudo] password for abhiram: Running as root. Used java home : ./x10flasher_lib/linjre64
- Please wait till the sync gets completed and then proceed to download the ROM image of your choice. I’ve used the custom ROM which can be downloaded here. Ensure that the downloaded file has to be of the form .ftf
- Place the downloaded .ftf file in the folder /root/.flashTool/firmwares
[abhiram@localhost rom]$ sudo su [root@localhost rom]# cd /root/.flashTool/firmwares/ [root@localhost firmwares]# ls Downloads prepared sinExtracted [root@localhost firmwares]# cp /home/abhiram/Documents/xperia/rom/D5803_23.4.A.1.264_IT.ftf .
- If all goes well, you can connect your phone to the machine using an USB cable and the message appears in the FlashTool saying that your device has been connected. Once you’ve selected the device type as Sony Xperia Z3 Compact you’re all set to flash your device.
- Disconnect the device, Click on the lightning bolt in the top left of Flashtool to “Flash device”.
- Select “Flashmode” and click “OK”.
13. Select the firmware build version that you want to flash from the “Firmware” pane. If you want to retain your apps/data, untick “DATA” in the “Wipe” pane. Then click “Flash”.
14. Flashtool will then indicate that it is “preparing files for flashing”.
You may have to wait around 60 seconds for the pop-up below to appear. Once it does, you should now connect your Sony Xperia device. Make sure the device is powered off and then hold the ‘volume down’ button whilst connecting the USB cable. Once the pop-up disappears and flashing has started, you can let go of the ‘volume down’ button.
NOTE: Ignore the instructions displayed which says “press the back button” – these relate to the older Sony Ericsson Xperia handsets.
Flashtool will then start flashing your Xperia device. Once you see “Flashing finished” as indicated below, your Sony Xperia has been successfully flashed.
Congratulations you have just installed Android Lollipop! Now disconnect your Xperia device and power on the handset. Don’t despair if it takes a while for the handset to boot.