Here are the steps to install ElementalX (or any other custom kernel). I’ve added a few extras steps that will ensure you keep the ability to update your system with OTA updates. It looks like a lot of work, but this method will prevent headaches and save you a lot of time in the future.
- Compatible device and Android version. Check here, or download EX Kernel Manager, which will automatically download the correct version of ElementalX (if available for your device)
- Unlocked bootloader. The procedure for unlocking the bootloader varies by manufacturer. Please visit forum.xda-developers.com to find instructions for your device. This is a one-time procedure that will factory reset your device. Unlocking the bootloader will allow you to use a custom recovery and install a custom kernel
- Install fastboot and adb. Fastboot and adb are special programs that you install on your PC that can be used to interact with your Android device. Look here for installation instructions. Fastboot is necessary to flash a custom recovery, while adb is optional (but will make many things easier)
- Enable Developer Options and USB debugging (optional). This will allow you to use adb commands. Got to your device’s settings, click on “About phone” and then tap on “Build number” several times. This will enable Developer options in the device’s settings. Click on Developer options and then enable “USB debugging.” If your device is connected to a PC, a permissions dialog will pop up to allow the connection
- TWRP recovery. TWRP is the best custom recovery available, please download TWRP for your device here
- SuperSU or Magisk (optional). SuperSU and Magisk are used to root your Android device. Please note that you do not need to root your device to use ElementalX, but you need root if you want to change any kernel settings or tweak your device for performance or battery life
Part 1: How to install ElementalX
1. Backup stock boot and recovery images.
This is very important to ensure you can return to a 100% stock state and recieve OTA updates. OTA system updates will fail if you do not have the stock kernel and recovery. Once you have unlocked the bootloader, you can use the fastboot command to boot or flash a custom recovery. A custom recovery will allow you to backup the contents of your phone and flash custom ROMs and kernels. Once you have downloaded TWRP to your PC, connect your device to your PC with a USB cable. Here is an adb command to reboot to bootloader:
adb reboot bootloader
Now issue the following command to temporarily boot into TWRP recovery:
fastboot boot [path to TWRP you downloaded]
Once TWRP boots, select “Backup” and then put checkmarks beside “boot” and “recovery.” The boot partition is where the kernel is stored. The recovery partition is where the recovery is stored. You should name your backup so you will remember it easily. Your stock recovery.img and boot.img will be saved on your device’s sdcard.
2. Flash TWRP recovery (optional)
You don’t have to install TWRP, but it makes things easier if you intend to modify your Android device. If you choose not to install TWRP, you will have to reboot to bootloader and “fastboot boot” TWRP whenever you want to use it. To flash (install) TWRP, first reboot to bootloader:
adb reboot bootloader
Next, enter the following command to flash TWRP to the recovery partition:
fastboot flash recovery [path to TWRP recovery image]
After you’ve installed TWRP, you can easily reboot to recovery any time with the following command:
adb reboot recovery
3. Root your device (optional)
If you would like root access to your device, install SuperSU or Magisk. This should be done before installing ElementalX. Other root methods are NOT recommended. Root access will give you full control over your device and allow you to change kernel settings and tweak your device. To install SuperSU or Magisk, download to your device, reboot to recovery and install the zip you downloaded. Make sure you reboot into your system after the installation process completes. Ensure that root is correctly installed and working.
At this step, I usually make a backup of the stock rooted kernel. Now that you are rooted, you can do this very easily in EX Kernel Manager by selecting Tools->Kernel backup. This will save the boot.img.
4. Install ElementalX
If you have EX Kernel Manager and TWRP recovery installed, go to the ElementalX screen and it will automatically download and install the latest version of ElementalX.
If you don’t have EX Kernel Manager, download the latest version of ElementalX to your device, reboot to TWRP recovery and flash the ElementalX zip.
Part 2: How to install an OTA system update
If you have followed the steps above, you will be able to install OTA updates. When a system update notification appears, you will need to first restore your stock boot and recovery. After you have restored your stock boot and recovery images, the OTA will install correctly (assuming you have not modified anything else on your device)
1. Reboot to TWRP recovery
2. Select “Restore” and then select the stock backup you made earlier. Make sure “boot” and “recovery” are checked, and restore
3. Reboot to Android
4. Install the OTA. Let it fully complete and ensure everything installed correctly.
5. Go back to Part 1: How to install ElementalX and redo all the steps
Part 3: How to install system updates if the OTA fails
If the OTA fails to install, or you didn’t backup the stock boot and recovery images, here is the procedure to install system updates.
For Nexus/Google devices:
- Download the latest factory image for your device here
- Extract the zip on your PC
- For Windows, open the flash-all.bat script and remove the “-w” option. For Mac or Linux, open the flash-all.sh script and remove the “-w” option. If you do not remove the “-w” this procedure will factory reset your device (i.e wipe all your data!)
- Connect your device to a PC via USB cable
- Reboot to bootloader (adb reboot bootloader)
- Execute the script (flash-all.bat for Windows or flash-all.sh for Mac/Linux). This will update your device’s system and firmware
- Reboot to your system to allow the update to complete and ensure everything installed correctly
- Go back to Part 1: How to install ElementalX and redo all the steps
For other devices:
The procedure for system updates on non-Nexus/Google devices varies by manufacturer. Please go to XDA for help. For many devices, xda users contribute flashable zips that can be flashed in TWRP recovery. The procedure may be more complex for HTC devices, especially if your device is not s-off. This is why it’s important to follow the steps in Part 1.