In this post, we shall look at flashing the rom that we built in Part 1. Firstly, my phone has an unlocked bootloader, which is needed to flash custom roms. If your bootloader is locked head over to the htcdev.com and click on the icon marked “Unlock Bootloader”. Once you have unlocked your bootloader, your phone may still have S-ON enabled, this is a security measure which prevents flashing of the boot partition on the phone. It can be resolved by manually flashing the boot.img file using fastboot.
The flashing process follows the following steps
start adb server and check phone is connected
- use adb push to push all files to required places
- reboot phone into bootloader mode
- put phone in fast boot mode
- flash boot.img file using fastboot
- reboot the phone into recovery
- perform a wipe
- install from zip, the image you transfered
- reboot phone
WARNING: You should be comfortable with flashing roms/ recovery images to your phone as well as using adb, fastboot and recovery. I am not responsible if you brick your phone.
First make sure that your phone is connected as shown below
Now from the terminal type the following
cd /root/android/system/out/target/product/endeavoru adb push ./cm-11-20141009-UNOFFICIAL-endeavoru.zip /sdcard/Download/cm-11-rom.zip
Note: your zip file name will be different
Now reboot into ‘bootloader’ mode.
Now on the handset , select “fast boot usb” mode. Make sure the device is connected properly, change to the ‘out’ directory and change the permissions to 755 on the ‘boot.img’ file as shown below. Now simply enter the fastboot flash command as shown.
Congratulations, you now have flashed your bootloader.
Next, reboot into recovery on the phone using the volume up/down keys and power button. Once in recovery, perform a wipe and install the cm-11-rom.zip file located in /sdcard/Downloads directory.
Reboot your phone into your android. Be patient with the boot process as it can take some time for a first boot.
If all goes well, you will have a running Android operating system as shown below.
In Part 3, we will modify the kernel to incorporate the patches necessary for Kali Nethunter.