How to update Android security patches for Google Nexus and Pixel devices?

How to update Android security patches for Google Nexus and Pixel devices?

Introduction

                This time, the topic I will talk about is “How to update Google’s monthly Android security patches for Nexus and Pixel devices?” For the kernel part. These monthly security patches mainly include Bug Fixes & Security Updates.

This tutorial is a short one. 

Requirements

  • Git
  • Basic git commands
  • Linux Computer

How To Update

  • Let’s first explain the concept. For example, let’s say you have a kernel source that you want to build for the Nexus 5X. You would merge the latest November Android Security Patch code into your kernel repo, and then compile the kernel as usual.

    As I said before, these codes are for the Kernel part.

  • First, you need to have a ready-made kernel source for your phone. This is where you will merge the security update code. As usual, I will use the Nexus 5X as an example.
  • Next, you need to know where the kernel repos are for Google Nexus and Pixel devices (devices with Qualcomm chipsets).
  • First, go to your local kernel source repo and open a terminal.
  • Type the command below (it will do git fetch and merge by tag):
  • Format:

    git fetch –tags <repo_url> <branch_name>

  • Example: For Branch Name, choose the latest branch released by Google. Currently, it is bullhead-3.10-oreo-r6.

    git fetch –tags https://android.googlesource.com/kernel/msm/ android-msm-bullhead-3.10-oreo-r6

  • Then go to this link . You will see “log”. Click on that “log”. If you look at the commit at the top, you will see a green tag. Right now, for November, it is android-8.0.0_r25.

    Note down the tag name. You will use it again in git merge.

  • Once fetch is complete, type the following command in Terminal.
  • Format:

    git merge <tag_name>

  • Example:

    git merge android-8.0.0_r0.25

  • As an example, I’ll show you a commit I merged. Take a look here .
  • After that, the codes will be auto merged.

    If a conflict occurs, the terminal will display a message with the file location.

  • The final step is to merge the codes and then compile the kernel as usual.
  • DONE

Post Comment

You May Have Missed