Download and Install AOSP Android 14 on Sony Xperia XZ2 Compact

On this page, we provide a step-by-step guide on how to install the unofficial Android 14 Custom ROM on the Sony Xperia XZ2 Compact, codenamed “h8314.” If you’re looking to install the pure version of Android 14, then you’re in the right place.

Download and Install AOSP Android 14 on Sony Xperia XZ2 Compact

Sony Xperia XZ2 Compact Overview

Sony Xperia XZ2 Compact was Launched in February 2018, this smartphone set a standard with its robust features. The device boasts a sleek design with dimensions of 135 x 65 x 12.1 mm and a weight of 168 g, featuring a glass front (protected by Gorilla Glass 5), a plastic back, and an aluminum frame. Its durability extends with IP68 dust/water resistance up to 1.5m for 30 minutes, adding a layer of protection to the device.

The 5.0-inch IPS LCD display offers vibrant visuals with HDR BT.2020 support, a resolution of 1080 x 2160 pixels, and a Triluminos display with X-Reality Engine. Running on Android 8.0 (Oreo) and upgradeable to Android 10, the device is powered by the Qualcomm SDM845 Snapdragon 845 chipset, featuring an octa-core CPU and Adreno 630 GPU for smooth performance.

The main camera, a standout feature, is a 19 MP lens with predictive PDAF and Laser AF, capable of 4K video recording at 30fps and impressive slow-motion capabilities. The selfie camera is a 5 MP shooter with gyro-EIS support for stable video capture. While lacking a traditional 3.5mm jack, the device compensates with stereo speakers, delivering high-quality 24-bit/192kHz audio. Connectivity options include Wi-Fi, Bluetooth 5.0, NFC, and USB Type-C 3.1 with OTG support. Sony Xperia XZ2 Compact houses a non-removable Li-Ion 2870 mAh battery with 18W wired charging and QC3 technology. Overall, this smartphone from 2018 remains a reliable choice, combining durability, multimedia capabilities, and performance.

Android 14 and Its Features

Android 14, Google’s fourteenth major iteration and the 21st version of its renowned operating system, was unveiled to the public on October 4. The pioneering devices graced with this fresh release were the Pixel 8 and Pixel 8 Pro, underscoring Google’s commitment to keeping its flagship devices at the technological forefront.

This latest installment boasts a plethora of enhancements and innovative features. Among the standout additions are a revamped lock screen, a more intuitive system share sheet, and a redesigned battery-saving mode. Users can also delight in the convenience of drag-and-drop capabilities during app switches, a groundbreaking Ultra HDR support for media, and the visually striking Material You-themed settings toggles. With AI-generated wallpapers and a new monochromatic theme, Android 14 not only refines functionality but also offers a refreshed aesthetic experience.

What’s Working and Known Bugs:

Whats working?

Mobile data
FM radio

Known issues ?
* Hotspot may lag out when trying to turn it off

How To Install AOSP Android 14 on Sony Xperia XZ2 Compact (h8314)

As the title indicates, this article provides the necessary steps and requirements to install the AOSP Android 14 build on the Sony Xperia XZ2 Compact (h8314) model.

Before diving into the guide, please ensure you’ve met all the prerequisites listed below.


Before we begin this procedure, I strongly recommend you create a backup of your device storage and all your files stored on your device. Moreover, following the steps mentioned in this post carefully is advised to avoid permanent damage or bricking your device.

Charge Your Phone

It’s highly recommended to charge your handset before unlocking the bootloader to avoid your device from shutting down occasionally while going through the process. Keep at least 50% of the charge or higher for a smooth operation.

Download ADB and Fastboot Binaries

You can skip this adb and fastboot part if you have already installed TWRP Recovery on your Sony Xperia XZ2 Compact.

Using the ADB and Fastboot commands (platform-tools), you can boot your Android device into the bootloader mode (download mode), making it easy for you to proceed with further steps. ADB (Android Debug Bridge) creates a connection or bridge between the device and the computer to sideload files.

Fastboot is a more advanced command utility tool for Android devices that works with computers. You can download ADB and Fastboot Binaries (Platform-Tools).

Download Sony USB Drivers

To create a strong and successful connection between a mobile device and a computer using a USB data cable, you will need a USB Driver. It is essentially a set of files that enables you to transfer files between the connected devices, flash files on the handset, and much more.

It is important to note that USB drivers can be utilized and operated by mobile devices and other external devices on a Windows computer. These include but are not limited to mice, keyboards, printers, external hard drives, speakers, and USB flash drives. If you need to download Sony USB Drivers, you can find them here.

Unlock the Bootloader of Your Phone:

You need to unlock the Sony Xperia XZ2 Compact’s bootloader before installing custom ROMs.

Install TWRP Recovery:

You must install TWRP Recovery on your phone to install any custom ROM on your device. After unlocking the bootloader, follow our guide to install TWRP Recovery on your Sony Xperia XZ2 Compact.

Download Android 14 ROM:

You will find all the Android 14 custom ROMs for your Sony Xperia XZ2 Compact (h8314) here.

AOSP OS XDA Development Page

Download Android 14 Gapps:

Most third-party AOSP ROMs, also known as aftermarket firmware, do not include preinstalled Google apps. You can manually install Android 14 GApps with our guide.


GetDroidTips won’t be responsible for any issue that may happen to your device if you flash it on another device and brick it. Do it at your own risk.

Instructions To Install:

  1. Connect your device to the PC via a USB cable. Make sure USB Debugging is enabled.
  2. Then head over to the platform-tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
    cmd platform-tools
  3. Execute the below command in the CMD window or enter recovery mode using the Volume and Power button combination to boot your device to TWRP Recovery:
    adb reboot recovery
  4. Now head to the Install section and navigate to the downloaded vendor and firmware. Perform a right swipe to flash it.twrp-custom-romTWRP Home
  5. If you want Google Apps as well, you need to flash it at this instance. Go to Install, select the GApps ZIP file, and perform a right swipe to flash this file.
  6. When that is done, you may reboot your device. Head over to Reboot and select System.
    reboot system twrp

The installation of AOSP Android 14 on Sony Xperia XZ2 Compact is complete, and your device will now boot with the newly installed OS. It’s worth noting that the first boot may take some time, and you may need to set up your device from scratch. With that, our guide to installing AOSP Android 14 on Sony Xperia XZ2 Compact comes to an end.


If you want to try out the latest Android OS version on your Sony Xperia XZ2 Compact, flashing the ported Android 14 is an option. Although it seems like the Sony Xperia XZ2 Compact won’t receive the official Android 14 update from the manufacturer, you can still enjoy most of the features and visual treatment with this ported version. However, if you encounter any bugs or stability issues, it’s important to report them to the respective forum.

That’s it, guys. We assume this guide was helpful to you. For further queries, you can comment below.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.