Advanced phone customization/Installing your custom ROM

Now that we've the prerequisites ready, let's start!

Flashing recovery
A recovery is a type of bootloader which allows you to flash custom ROMs, back up the current OS (including apps) of your phone and wipe the phone if desired. Since most phone bootloaders are far too limited in their capability, we need to flash a custom one.

For this guide, we'll use Team Win Recovery Project (TWRP).

Download TWRP for your device from here. Then enter download mode. How to access it depends on your device. Once in there, flash it and immediately boot to recovery (hint: the combination is most likely different!). If you do not boot immediately to recovery, you'll most likely find that the original bootloader is still present; repeat the process if that happens.

Once you are in recovery, it's fine to restart; you'll see your stock OS. This is normal as you haven't overwritten the OS yet, only the recovery.

Installing your custom OS

 * 1) Go to Wipe and wipe off the system and data partitions.
 * 2) Go to Advanced and wipe off the Dalvik cache.
 * 3) If the ROM is already present on your phone, go to Install and select the ROM to install. If not, you need to download the Android SDK. Launch , and use the   and   to install the ROM, whose file should be in your hard drive.
 * 4) Flash GApps. You must do this before leaving the recovery (Android 6+). If the phone boots, restart the process, as the phone will misbehave if GApps is installed after the phone first boots.
 * 5) Restart the phone and complete the first boot process.

Logs
1. On the computer side: Here's the log from :

F:\Program Files\Android\android-sdk\platform-tools>adb sideload F:\Users\ \Downloads\RR-O-v6.1.0-20180619-zero-common-Official.zip loading: 'F:\Users\ \Downloads\RR-O-v6.1.0-20180619-zero-common-Official.zip'* daemon not running. starting it now on port 5037 * Total xfer: 0.95x
 * daemon started successfully *

F:\Program Files\Android\android-sdk\platform-tools>adb sideload F:\Users\ \Downloads\open_gapps-arm64-8.1-nano-20180812.zip loading: 'F:\Users\ \Downloads\open_gapps-arm64-8.1-nano-20180812.zip' error: closed

F:\Program Files\Android\android-sdk\platform-tools>adb sideload F:\Users\ \Downloads\open_gapps-arm64-8.1-nano-20180812.zip Total xfer: 1.19x The error on the second part occurred because I forgot to set the phone to adb sideload again.