Flashing our custom ROM

You have your .zip file and your customized system partition, and you are thrilled to have flashed them to your device.

To flash the system partition, we can use fastboot. First, you must unmount the partition itself using the following command:

~$ umount system_mount_point

Before we start experimenting with the system partition, it's always wise to do a system backup:

"Be prepared. You never know."

Now, you can put the device in Fastboot mode, according to the specific sequence of your device. For our reference device, Google Nexus 6, the sequence is:

  1. Power off
  2. Press Volume Up, Volume Down, and Power at the same time
  3. Release when the Fastboot menu appears

The device is now ready to receive the new system partition. Flash it with the following command:

~ $ fastboot flash system system.img

Your brand new system partition is in place! If your modifications were very extreme and adventurous, you could end up in a bootloop—the system keeps on rebooting and never ends the boot sequence. Stock system images distributed by manufacturers, or your own backups, come in very handy in this unfortunate scenario.

Note

If you are working with a Samsung device and you have a Windows system, you can check out Samsung Odin, a GUI tool to flash your ROMs and root your devices.

The final step is to flash the .zip file you generated with the kitchen. The file is generated according to a specific file structure and it's ready to be passed to your custom recovery. The recovery will treat it as a "system update" even if it's a completely brand new, customized system.

First of all, reboot your system in recovery mode. You can do it with a button sequence or using ADB, with the following command:

$: adb reboot recovery

Once the device is in recovery mode, navigate with the volume buttons and select Apply update from ADB. This will put the device in waiting mode. Go back to your terminal and navigate to the .zip file generated with the kitchen. Finally, load the file to the device:

$: adb sideload filename.zip

Congratulations! Your first custom ROM is live on your device. Now, go back to customize it even more!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.166.90