Update Xperia P LT22i to Android 5.0.2 Lollipop With CM 12 Custom ROM


Sony Xperia P is a legacy device which is not going to receive anymore official updates after Android Jelly Bean. With the release of Android 5.0 Lollipop the Android enthusiasts still want to update their devices to latest Android version. Android 5.0 introduced Material Design which makes it the most beautiful Android ever. Sony Xperia P can be updated to Android 5.0 Lollipop using the CyanogenMod 12 custom ROM. This is not  the official release of CM. It is based on Android 5.0.2. It is available for LT22i only. Most of the features are working perfectly in this custom ROM. This ROM is actively supported by developers so expect quick fixes for bugs that you report in this ROM. Rest of the installation details are given below.


  • Unlock Bootloader of Xperia P. If you do not know how to do it or you have no idea about what it is, then follow this guide to unlock Bootloader of your phone. How to Unlock Bootloader of Xperia Smartphones
  • Install USB Drivers for Xperia P using the drivers installer from the Flashtool installation folder. Download Flashtool from here. After installing USB Drivers, connect phone to PC using the USB cable so that USB drivers are installed properly and connection is established properly.
  • Install ADB and Fastboot Drivers. | Mac ADB And Fastboot Drivers. To avoid the lengthy installation, use the Minimal ADB and Fastboot tools for your PC to make the installation quick. ADB Drivers work best on Windows 7. ADB and Fastboot Drivers might not work on Windows 8 or Windows 8.1.
  • Charge your phone up to 50%. It is very important because phone should not turn off during flashing process. If the phone turns off during the flashing process, it can damage the device.
  • Make a backup of all Contacts and Messages on phone. – Guide
  • Backup SMS Messages
  • Backup Call Logs
  • Make a Nandroid Backup if any custom Recovery is installed already. If not, you will find a custom recovery later in this guide. – Guide
  • Copy all the media files and anything else stored in the internal memory to a PC before flashing to save this data.


The methods involved in flashing custom recoveries, ROMs and rooting your phone are highly custom and may result in bricking your device, and has nothing to do with Google or the device manufacturer that is SONY in our case. Also rooting your device will void its warranty and you will be no longer eligible for any kind of free device services by the manufacturers/warranty providers. In case of any mishap we may not be held responsible. Follow these instructions to the letter to avoid any mishap or bricking. Make sure that whatever you do, you are doing it at your own responsibility.

Required Downloads

Steps to Install CM 12 on Xperia P LT22i

  1. Make sure that bootloader is unlocked and phone is charged to 50% at least.
  2. Copy ROM zip and Gapps zip to phone’s internal memory.
  3. Now turn off phone wait for 5 seconds.
  4. Hold volume up button and connect phone to PC.
  5. The LED should remain blue, which means that phone is in fastboot mode.
  6. Now copy boot.img to Fastboot folder or Minimal ADB and Fastboot installation folder.
  7. Open that folder, hold shift button on keyboard and right-click on mouse.
  8. Click on Open Command Window Here.
  9. Type fastboot devices and press Enter.
  10. It should only one fastboot connected device in return. If it showing more that one, then disconnect any other connected device or close any Android Emulator. Also make sure that PC Companion is completely disabled if installed.
  11. Now type fastboot flash boot boot.img and press Enter.
  12. Type fastboot reboot and press Enter.
  13. While phone is booting up, press Volume up/down/power to enter recovery mode.
  14. In the recovery mode, select Install and navigate to the folder where ROM zip is placed.
  15. Install the ROM zip.
  16. Install Gapps zip the same way and reboot the phone.
  17. Performing factory reset and wiping Dalvik cache after installing ROM is highly recommended!
  18. The phone will boot up to home screen in 5 minutes.
  19. To install Google Applications, copy downloaded Gapps zip file to phone and flash it the same way as ROM. Factory reset is not required this time.
  20. That’s all!

Got any question? Ask me in the comments below 🙂

Usama M, a software engineer by profession, is the founder and editor-in-chief at Techbeasts. At Techbeasts, he uses his expertise to craft solutions to solve everyday consumer tech problems. His main areas of interest are Android, iOS, and Windows. You can find him on YouTube at "Tech with Usama".


  1. ive done all steps before
    this is what it showed and on phone .. it is showing “sony xperia STE” screen and stuck there from like 5 mins or more..

  2. i have an issue in step 11 when i type those words as mention above then it says cannot load boot img plz plz plz help thanks…………

  3. I tired your steps.,and its installing the ROM and Gapps but when I reboot its stays in the same first logo itself.i waited more than 30 mins but its not going to main page.,please help

  4. can i do all these steps from stock rom with unlocked bootloader? i did it. but after flashing boot.img from adb command i cant enter recovery mode to flash rom. screen stuck at sony ste

  5. in step xiii u said enter recovery by pressing volume up/down/power…is it all three buttons or just vol down and power? please reply asap

  6. Hi, this didn’t work for me. I followed all the steps but after flashing and rebooting my phone for the first time, it got stuck at the Sony logo. I couldn’t enter to recovery.

  7. even posting different links from different websites with clear information will be helpful (im not good with technology)

  8. my phone is stuck on one baby logo and its more than 5 min now what to do…

    And now m not able to reboot and turn off the phone

  9. my phone is stuck on one baby logo and its more than 5 min now what to do…

    and am not able to restart or shutdown the device

  10. Wi-Fi direct, NFC, Screen Mirroring is not working. I updated my phone to achieve Screen Mirroring on TV and now its not working, also it stopped Share/Play the Photos & Videos on my Smart TV after updating to this custom ROM.

  11. Hi, i have a problem, when loading the CM12xx.zip it gives an error “Status 7”, have tried other files and gives me the same error, I have to do to load, I have a Sony Xperia P Lt22i

    • me to – lösung:
      smartphone auseinander bauen, akku trennen.
      punkte 4, 5, 7, 8, 9, 10, 12, 13 ausführen.
      dann clearing cache und clearing dalvik cache,
      danach auf werkseinstellungen zurücksetzen,
      dann system-reboot.

  12. after installation i’m stuck on boot logo. it took more than one hour. icant enter to recovery mode. what to do now. help me

    • Bro I did reflashing of same ROM again ….it works bro …tnk u

      BT it s not good to see
      Looks little bit slow when compare with original sony jellybean version….

  13. Hello everyone.

    I tried installing Lollipop update to my Xperia P today using all the steps from this website only. After installing ROM zip I clicked on installing Gapps. But it showed an error message with Insufficient Storage available. Then I clicked on reboot in the recovery mode, but my phone is stuck on that blue android animation. Neither can I switch it off directly nor does the phone start up. I’m also unable to enter into the recovery mode. Then I soft reset the phone by pressing the power button in addition to volume up button. The phone does light up but is again stuck on that blue animation. I read several comments saying the problem can be solved after a full wipe. But I can’t figure out how to wipe the phone when it is turned off. Can anyone help please?

Got a question/query or a suggestion? Drop it below.