A Sony Xperia Z2 smartphone (L) and a Sony Xperia Z2 tablet are displayed at the company's stand during the Mobile World Congress in Barcelona February 24, 2014. The congress is the wireless industry's largest annual conference and runs February 24-27, 2014. REUTERS/Gustau Nacarino REUTERS/Gustau Nacarino

Though installing custom ROM improves the device's performance and UI experiences, it makes the company warranty void; the company will no longer be liable to provide updates in future [users can restore warranty by flashing the device with stock-ROM].

Make sure the device is rooted before going ahead with custom ROM installation.

Installation of custom ROM requires clearing memory in the phone, so make sure to back all the data by installing Clockwork Mod (CWM) Recovery/ TWRP in the smartphone.

Make sure USB driver is installed on the PC or else your device (Xperia Z2) will not be recognised by the computer.

Make sure your device has more than 80% battery, or else there is a chance of the smartphone getting temporarily bricked if the installation process is interrupted midway.

[Disclaimer: This procedure is very technical and should be performed by a person with sound knowledge of rooting (or manual software installation) Android devices. If the step-by-step installation process is not followed properly, there are chances of the smartphone getting bricked or being permanently irreparable. IBTimes India cannot be held responsible for any damage or claims from readers if the procedure does not yield the required results or if the smartphone is bricked. Hence, users are advised to proceed with caution.]

[Note: use 'Volume' keys to navigate and 'Power' button to select options, while operating under Recovery Mode]

Step 7: Clear the cache memory by selecting 'wipe cache partition'

Step 8: Go back to ClockworkMod recovery, and select 'advanced' and tap 'wipe dalvik cache' [Note: This step is optional, but many recommend this procedure so that user will not face boot loops or any other errors in the middle of custom ROM installation]

Step 9: Come back to main recovery screen and then tap 'install zip from SD card'

Step 10: Tap 'choose zip from sdcard' and go to Android ROM .zip file in SD card and enter the installation process. Repeat the same procedure again to install the Google Apps. [Note: use 'Volume' keys to navigate and 'Power' button to select options]

Step 11: Once done with the installation process, navigate to '+++++Go Back+++++' and re-start the device by opting 'reboot system now' seen in the recovery menu.

Now, your device (Sony Xperia Z2) will take a few minutes to complete the booting process.

Users then head to Settings >> select 'About phone' to confirm the installation of Xstasy Android Marshmallow custom ROM.