How to Root Sony Xperia L4 and Unlock Bootloader

Sony has launched three smartphones this year, including the Xperia L4, which is a budget phone and great for users who love watching movies and videos. This is one of the best budget phones for amazing performances. Sony may have lost some hold on the smartphone industry, but their phones are still masterpieces. And Sony Xperia L4 is an excellent example of value for money device. Like other popular brands, Sony also allows system modification. Here you will know How to Root Sony Xperia L4 and how to unlock bootloader on Xperia L4.

Let’s go through the Xperia L4 specifications quickly. The device features a 6.2-inch HD+ wide display with a waterdrop notch. It has a wide 21:9 aspect ratio, which is best for cinematic display. Sony Xperia L4 powered with MediaTek Helio P22 processor for multitasking and processing. It is only available in 3GB RAM & 64GB option. The device packs with 13-megapixel primary camera, 5-megapixel ultrawide camera, 2-megapixel depth camera at the back. And at the front, it has an 8-megapixel selfie shooter. The device also comes with a 3580mAh battery, which can easily last for a whole day.

One of the best things about Sony phones is we can easily download firmware and also we can easily root. The Xperia L4 runs on stock Android 9 Pie, which means you will get to experience clean and better performance. But the stock android does not have many features, so to get additional features, you can root your phone. Rooting Xperia L4 will bring features like support for custom fonts, custom boot animation, third party themes, and more. Also, we can install Xposed Modules on Xperia L4 after rooting to customize the phone. To root Xperia L4, we also need to unlock the bootloader, so we are going to share both guides below.

How to Root Sony Xperia L4

Sony phones are not much popular in custom development like custom ROMs & custom Recoveries. But we can still root our Sony Xperia phones to get advanced features and enhance the performance of Xperia L4. There are many ways to root Sony Xperia L4 like flashing Magisk through a custom recovery, installing patched boot image, or even using some available tools. The Xperia L4 is a new phone, and so the TWRP recovery is currently not available, so we will use the patched boot image to root Xperia L4. But as you know that before rooting, we have to unlock bootloader on Sony Xperia L4.

Sony Xperia L4 Unlock bootloader (Guide)

Other than speedy performance, there is another advantage of owning Sony Phones. It is that we can easily unlock bootloader of Sony phones, which is compulsory for rooting the phone. All phones come with locked bootloader by default, and so we need to unlock it manually. And Sony allows us to unlock bootloader on Sony Xperia L4 without any problem, so let’s check the guide that Sony has publicly shared on their blog.

  1. First, take a full backup of your phone as unlocking bootloader will delete all data from your phone. It will also remove the DRM keys used for Sony Apps.
  2. Open Dialer on your phone and enter *#*#7378423#*#* and it will open Service Menu.
  3. Go to Service Info > Configuration > Rooting Status. If you are allowed to unlock bootloader you will see ‘Yes.’
  4. If your bootloader is unlockable, then go ahead with further steps. Install Google USB Driver on your Windows computer, skip if you are using macOS or Linux.
  5. Go to this link and scroll down at last and Select your device. Then follow steps given in the site to get the unlock code. If your phone is not on the list, then it can take some time as it is new. Sony Xperia L4 Unlock Bootloader
  6. Download Platform tools for your computer and extract it, remember the location of the extracted folder.
  7. Open Settings on your phone then head to About Phone. Now tap 7-8 times on the Build Number, and it will show ‘You are now a developer.’
  8. Go to Settings > Developer option and enable OEM unlocking & USB Debugging. Sony Xperia L4 Unlock Bootloader
  9. Now turn off your phone. Press & hold the Volume Up button and connect it to your computer, the Xperia L4 will boot into Fastboot Mode.
  10. Now open the extracted Platform tools folder. In the folder press & hold Shift + Right click on an empty area and select ‘Open Command window here’ & ‘Open PowerShell window here’.
  11. In the Command window, enter the below command to check the device connectivity. If it shows some id, then your phone is connected.
    • fastboot devices
  12. Once your phone is connected, enter the below command to unlock bootloader on Sony Xperia L4.
    • fastboot oem unlock 0x<unlock code>
  13. Make sure to enter the unlock code in place of <unlock code> in the above command. After entering the command, it will now wipe all data and unlock bootloader on Xperia L4.

After unlocking bootloader, you can now root Sony Xperia L4 that will give you advanced features. We can also install custom ROMs and custom Recoveries on Xperia L4 without rooting the phone. For rooting, you can follow the below procedure. But before that, make sure to go through requirements.


  • Make sure to Unlock Bootloader of Sony Xperia L4
  • Take a full backup of data to restore if anything goes wrong
  • Charge your phone to at least 50%
  • Download Canary Magisk Manager APK
  • Download the Sony Xperia L4 Firmware for your phone (the same version which is installed on your phone), you can use XperiFerm

Steps to Root Sony Xperia L4

  1. First, extract the firmware and find the boot.img file that we will use for patching. And copy the boot.img to your phone storage.
  2. Install and open the Magisk Manager app on your phone.
  3. Now click on the first Install option and select Install again on the popup. How to root Sony Xperia L4
  4. In the next screen, choose ‘Select and Patch a File’ option. And then locate the boot.img file and wait for the patching process. How to root Sony Xperia L4
  5. After patching, the file will be saved to Download folder with name patched_boot.img or magisk_patched.img.
  6. Now copy the patched_boot.img to your computer in the extracted Platform Tools folder. Rename the file to boot.img (eg. patched_boot.img to boot.img).
  7. Power off your phone and then boot your Sony Xperia L4 into Fastboot mode. And for this, long press the Volume Up button and connect your phone to the computer. Release the button once the Fastboot screen appears.
  8. Go to Platform Tools folder and press Shift + Right click on an empty area and select ‘Open Command window here’ or ‘Open PowerShell window here.’ How to root Sony Xperia L4
  9. In the command window, enter the below command to check the device is connected or not, entering the command should return some number id.
    • fastboot devices
  10. Now enter the below command to flash Magisk and root Sony Xperia L4.
    • fastboot flash boot boot.img
  11. After that, reboot your device to the system.
  12. If the Magisk Manager not installed on your phone, then install the app. Skip if the app is already present.
  13. Complete the in-app instructions, and the device will automatically reboot into the system.

That’s all you have to follow for rooting the Sony Xperia L4. And once your phone has root access, you can make changes to your device like any custom ROMs. It let you easily block ads from the system, and also it allows us to remove system apps, which is not possible by default.

You May Also Like | Download Google Camera Go APK for any Android Go Phones

So there you have it, the complete guide on how to root Sony Xperia L4 along with a guide on how to unlock bootloader on Sony Xperia L4. And in case if you have any questions, then let us know in the comment section below.

Also Check:

Explore Stories


Photo of author

Ashutosh singh

Computer Science graduate and tech enthusiast. Love testing new tech gadgets ever since my first windows phone from Samsung. Working as a technical writer for more than five years, and I believe I have also developed good SEO skills. In my spare time, I like watching movies, and playing games.

2 thoughts on “How to Root Sony Xperia L4 and Unlock Bootloader”

  1. So my journey started when I wanted to install XPrivacyLua

    I learned I need to root my phone, which is why I am under this article. It tells me I should make a full backup

    And of course want a full backup.
    So I follow your link here and it takes me to
    There I get told that I need to get TWRP and it takes me here:
    There I get told I need to unlock OEM, which is yet another article, and to unlock my bootloader, which takes me here:
    and this article tells me I should do a full backup

    But … I want to unlock the bootloader so I CAN make a full backup

    Can you see why I would be confused right now?

    • Hi, I get your point. You need to separately take a backup of important data like SMS, WhatsApp messages, Files using third party apps, or transfer data to your computer. The nandroid backup is possible if TWRP Recovery is installed.


Leave a Comment