[ANGLER] [8.0.0] [3.10.107] [GCC 7.2.1] Flash Kernel v3.1

Status
Not open for further replies.
Search This thread

nathanchance

Senior Recognized Developer / Contributor
Jul 22, 2015
13,760
50,104
29
Mesa, AZ
nathanchance.dev
UsFSxNO.png

Introduction

Hello everyone, this is my personal kernel for the Nexus 6P. While I am not a super star kernel developer, I do know my way around it. My philosophy on kernels is pretty simple:
  • Follow upstream Linux always
  • Stable kernel rules work best
  • Security and stability are paramount
  • Features will be added only as needed
Hopefully you enjoy :)


Thread Rules

  1. I refuse to acknowledge/respond to bug reports that do not include clear steps to reproduce, a logcat, and a console ramoops (if random rebooting) or a dmesg (any other issues). Follow this guide to do this. More on bug reporting policy here.
  2. Keep things civil, I do NOT tolerate flaming of any kind.
  3. OT is allowed.

Features
Here are the major features of the kernel (feel free to explore Github)
  • Updated to the latest security patch on the latest Android version (August on Oreo)
  • Updated to the latest Linux upstream version (3.10.107)
  • Several CVE fixes
  • Upstream patches from CAF and Linux
  • Touchboost force disabled
  • High brightness mode
  • KCAL color control
  • Adreno Boost
  • Wake gestures (sweep2wake, doubletap2wake, sweep2sleep, and camera launch gesture)
  • Faux Sound Control with high performance audio
  • ZRAM from 3.18
  • Maple I/O scheduler
  • Wakelock controls
  • TCP algorithms: bic, cubic, highspeed, htcp, hybia, illinois, lp, reno, scalable, vegas, veno, westwood (default)
  • F2FS support (latest from here)
  • Compiled with a Linaro 7.2.1 toolchain built with crosstool-NG (located here).
  • Makefile optimizations (courtesy of @adinkwok)
  • Forced encryption and dm-verity disabled
  • Hides bootloader unlock from SafetyNet (can still fail through other means)
  • Flashed with AnyKernel2 (thanks to @osm0sis)


Downloads

8.0.0 (v3.x): https://github.com/nathanchance/angler/releases

Legacy downloads:

7.1.2 (v1.x-v2.x): https://github.com/nathanchance/angler/releases
7.1.1 (4.x): Main
7.0 (3.x): Main
6.0.1 (1.x): Main

Do not mirror my kernels!


Installation
If you are on stock:

  • If you are on the stock kernel: flash the kernel zip and reboot
  • If you are on a custom kernel: flash the stock boot image matching your build number, flash the kernel zip, and reboot
If you are on a custom ROM:

  • If you are on the kernel that came with your ROM: flash the kernel zip and reboot
  • If you are on a custom kernel: dirty flash your ROM zip, flash the kernel zip, and reboot
Upgrading from one Flash version to the other:

Just flash the kernel zip and reboot


Changelog

Latest post

Kernel: https://github.com/nathanchance/angler/commits/8.0.0-flash
AnyKernel: https://github.com/nathanchance/AnyKernel2-archive/commits/angler-flash-public-8.0.0



Frequently asked questions
1.1 Q: I am having an issue, can you help me?
1.1 A: I am not an amazing kernel developer but I will certainly try my best. First, start by reading the release posts, as I may make note of a particular issue. Also search the thread to see if I have discussed it before. If you see nothing, please provide me with a dmesg/last_kmsg and logcat, your ROM/kernel version, and a detailed description of the issue, following this guide. If I can't reproduce reliably though, I'm not going to fix the issue.

1.2 Q: Can you add xyz feature?
1.2 A: If you link me the commits or tell me what kernel you had the feature in, I can take a look at them. I will not go digging super hard for commits and I will ignore requests that don't include this information. I won't promise that I will merge every request but I will always take it into consideration.

1.3 Q: How do I control the kernel?
1.3 A: I'd recommend using either @flar2's EX Kernel Manager or @Yoinx's Kernel Adiutor-Mod; both are extremely solid and have given me no issues.

1.4 Q: What ROM are you on? What are your settings?
1.4 A: Currently, I am on Dirty Unicorns and my settings are available here

1.5 Q: OMFG MY BATTERY SUXXXX PLS FIX!!!
1.5 A: The kernel doesn't drain any battery, use an app like BetterBatteryStats to figure out what app is screwing with your phone.


Thanks to:
@neobuddy89 for always providing great fixes and being a shining example of a great kernel developer
The various other developers for their patches (@ak, @Buckmarble, @flar2, @franciscofranco, @frap129, @imoseyon, and @Yank555 to name a few)
@osm0sis for AnyKernel2
@DespairFactor for helping me with some kernel compilation issues
@kwoktopus for giving me good advice on Makefile flags and other patches
@kantjer for being a beta tester along the way!
@malybru for my nifty new signature!
@phantom146 for the thread banner and default profile GlassCannon
All of you guys for viewing the thread


A note about donations

Quite a few people have asked to donate to me in the past and I have turned them down. I am not in this for the money, this is my hobby, something I truly enjoy. If you truly want to donate to something (it is not expected in the slightest), I recommend an entity like the Open Source Initiative, the Free Software Foundation, XDA, or any one of the people I have thanked in the OP. Additionally, you are free to copy any and all of my work; the only thing I request is that you not ask for donations as well (though I can't really enforce this lol). Thank you.


Kernel source links

8.0.0: https://github.com/nathanchance/angler/tree/8.0.0-flash
7.1.2: https://github.com/nathanchance/angler/tree/7.1.2-flash
7.1.1: https://github.com/nathanchance/angler/tree/7.1.1-flash
7.0: https://github.com/nathanchance/angler-old/tree/release-7.0
6.0.1: https://github.com/nathanchance/angler-old/tree/release-6.0.1


DISCLAIMER: I openly welcome off topic in my threads. Mods, please do not clean off topic discussion and users, do not complain about off topic discussion here. I may direct you to another thread if it is so suited but I won't have the discussion cleaned. Thank you.

XDA:DevDB Information
Flash Kernel, Kernel for the Huawei Nexus 6P

Contributors
nathanchance
Source Code: https://github.com/nathanchance/angler

Kernel Special Features:

Version Information
Status: Stable
Current Stable Version: v3.1
Stable Release Date: 2017-09-17

Created 2016-08-11
Last Updated 2019-07-02
 

nathanchance

Senior Recognized Developer / Contributor
Jul 22, 2015
13,760
50,104
29
Mesa, AZ
nathanchance.dev
How to compile the kernel

BUILD GUIDE: https://github.com/nathanchance/Android-Tools/blob/master/Guides/Building_Flash.txt
BUILD SCRIPT: https://github.com/nathanchance/Android-Tools/blob/master/Scripts/build-flash.sh


FORMER GUIDE:

1. Configure your environment

In order to compile this kernel, I'd recommend using Linux (OS X should be acceptable but this guide will be tailored for Linux). If you can't dual bot, use Virtual Box to create a virtual machine. To get the environment configured, either use Google's own guide here or my guide (only section 1) here.

2. Grab the source

  1. Grab the kernel source
    Code:
    mkdir ~/Android
    cd ~/Android
    git clone https://github.com/Flash-Kernel/angler.git Flash
    Explanation:

    First command makes a directory named Android in your home folder (mkdir = make directory). You can change the location if you want but keep it consistent throughout the guide.
    Second command moves into that directory (change directory)
    Third command pulls the source from my Github into a directory named Ninja (git clone <url> <folder_to_clone_in_to> is the format of the command).
  2. Grab the toolchain you want to use to compile the kernel
    Code:
    cd ~/Android
    git clone <kernel_url>
    Explanation:
3. Setup the build

  1. Make sure everything looks right
    After following the above steps, type:
    Code:
    ls
    You should see something like this:
    Code:
    aarch64-linux-android-4.9-kernel-linaro  Flash
    The toolchain directory make be different depending on what you cloned above. If it looks different, delete the Android folder and do step 2 again.
  2. Select the correct kernel branch
    Code:
    cd ~/Android/Flash
    git checkout release
    Explanation
    First command will move you into the Flash source directory we cloned above.
    Second command will checkout the branch you want to compile for (in this case, release)
4. Make the kernel

  1. Tell the makefile what toolchain and architecture you are building for
    1. Figure out the full path of your toolchain folder
      Assuming you have done this whole process correctly, you can move into your toolchain directory and type:
      Code:
      cd ~/Android/<toolchain_folder>
      pwd
      Example:
      Code:
      cd ~/Android/aarch64-linux-android-4.9-kernel-linaro
      pwd
      You should get something like this:
      Code:
      /home/nathan/Android/aarch64-linux-android-4.9-kernel-linaro
    2. Tell the compiler where that toolchain is
      Copy and paste that file location above into this command:
      Code:
      export CROSS_COMPILE=<toolchain_dir>/bin/aarch64-linux-android-
      Example:
      Code:
      export CROSS_COMPILE=/home/nathan/Android/aarch64-linux-android-4.9-kernel-linaro/bin/aarch64-linux-android-
    3. Set the architecture
      Angler is a 64-bit device so we need arm64
      Code:
      export ARCH=arm64
      export SUBARCH=arm64
  2. Clean up from a previous compilation and update the source
    Code:
    cd ~/Android/Flash
    git reset --hard origin/n
    git clean -f -d -x > /dev/null 2>&1
    make clean && make mrproper
    git pull
    Example:
    Code:
    cd ~/Android/Flash
    git reset --hard origin/n
    git clean -f -d -x > /dev/null 2>&1
    make clean && make mrproper
    git pull
    Explanation:
    The first command moves you into the Flash source directory.
    The second command will undo any local commits you have done and align your source with the most recent commit from me.
    The third command will clean any untracked or compiled files (this is send to /dev/null so you do not see it happen).
    The fourth and fifth command (strung together with &&) will remove you
    The sixth command will pull any new kernel changes from me into the source.
  3. Set up the defconfig
    A defconfig tells the compiler which features you want in the kernel. This is already set up by me. To set up the defconfig, type the following:
    Code:
    cd ~/Android/Ninja
    make flash_defconfig
  4. Name the kernel
    If you notice in About Phone > Kernel Version, it shows 3.10.103-FLASH-v3.10 (or something similar). You can customize this by opening the Makefile in the source directory and editing the EXTRAVERSION variable (this will be undone next time you compile).
  5. Make the kernel!
    Code:
    make -j#
    Example:
    Code:
    make -j4
    Explanation:
    The # after the "j" is how many simultaneous threads are run. Traditionally, this is the number of cores you have plus one. So a quad-core CPU would be -j5.

5. Zip it up and flash!

  1. Copy the zImage to the AnyKernel directory
    Code:
    cd ~/Android/Flash/arch/arm64/boot
    cp -v Image.gz-dtb ~/Android/Flash/anykernel/zImage
    Explanation:
    We need to copy the newly compiled kernel (which resides in the arch/arm64/boot folder) to the AnyKernel directory, while changing its name to zImage.
    cp = copy
    -v = verbose (prints the copying)
    Image.gz-dtb = file to be copied
    ~/Android/Flash/anykernel/zImage = destination and name
  2. Zip it up!
    Code:
    cd ~/Android/Flash/anykernel
    zip -r9 flash-kernel.zip * -x README flash-kernel.zip
    Using the above commands, your newly completed kernel will be located at ~/Android/Flash/anykernel/flash-kernel.zip

If you followed all of the above steps successfully, congratulations, you built the kernel!! Once you have done all five steps, you will just need to follow steps 4 and 5 to update in the future. Below, I have linked a script that will do all of this for you (with some variable edits at the top); however, please do it manually first so you know exactly what you are doing :) enjoy!

https://raw.githubusercontent.com/nathanchance/angler/release/build-flash.sh

Below are screenshots of me doing this process in a virtual machine (Mint 18) with 2 cores, 4GB of RAM, and 15GB of storage on my MacBook with a 2.5 GHz Intel Core i5 and 8GB of RAM (fairly average in the world of PC specs I think). It's totally possible to do this on your own. Additionally, in the next post, I have provided some tips for customizing the kernel even further!
 

Attachments

  • CwDH96j.png
    CwDH96j.png
    150 KB · Views: 5,554
Last edited:

nathanchance

Senior Recognized Developer / Contributor
Jul 22, 2015
13,760
50,104
29
Mesa, AZ
nathanchance.dev
How to do your own modifications to the kernel

Introduction

When I was getting started with compiling kernels, I relied a lot on Google and git documentation (this website is the best) to get what I wanted to accomplished. As a lot of that reading can be kind of dense. I decided to boil it down to the few commands and procedures you will need to modify this kernel (or any git repo).

LEARN GIT FROM THE COMMAND LINE. Seriously, do not use a program like SmartGit, it will cripple you and your workflow and potentially screw up authorship. Do it the right way using this guide.

Note: This is NOT supposed to be a super technical guide/how-to on Git. If there is something that is glaringly inaccurate, I will fix it but I am not going to add a ton of extra text here as there are plenty of Git tutorials you can easily find with Google. This is a crash course.


Git Introduction

What's a git?

Git is a version control system that allows developers to keep track of their changes to code. This is extremely helpful when working with large amount of code and changes across a large range of files (such as a kernel or ROM) as it allows you to easily revert or add changes as you see fit.

Terminology

These are not super precise definitions (you can find technical ones by Googling "what is a <word> git"):
  • Repository: the location that holds all of your code changes and files (this can be local or remote).
  • Commit: a change to your code
  • Branch: different snapshots of your code
  • Cloning: copying a remote repo to a local one
  • Forking: copying a repo (either remote or local) and making changes to it without affecting the other
Reading Github

Github is the most popular site for hosting git repositories. This is what my repo is hosted, which I will be using for my example. If you go to https://github.com/nathanchance/Ninja-Kernel, you will be greeted with this screen:
0EfvPhV.png

Here we will unpack those terms above. The repository (that view) contains files. At the top, you will see a tab called Commits. Clicking on this will bring you to a view similar to this:
SvVnIDM.png

This is a full list of the changes to the repository. The name of the commit message generally describes what it does and clicking on the title of the commit will bring you into the detailed view:
8uluqP7.png

In this commit, I have renamed the version from 1.1.1 to 1.2. Some commits will be very small like this, others won't be. Additionally, in the righthand corner of the commit message, you'll see a commit hash (bunch of numbers and letters). That will come in handy later.
Back on the home page of the repo, if you click on the branch dropdown, you will see the various different branches of the repo:
Nls83wT.png

If you click on a branch (let's do n in this case), you'll be brought to a page similar to the home page but there may be different commits in the commits tab. In this case, I have committed version 2.1 instead of 1.1:
xko5bmw.png

This should help you navigate around Github and find commits you may want to merge.


Git Documentation

Throughout the next sections, I will be using commands to show you how to modify the source. This section goes over the command format, what it does, and an example.

git clone

Format:
Code:
# Clone a repo into a directory the same as its remote name
git clone <url>

# Clone a repo into a directory with a specified name
git clone <url> <name_of_folder>
What it does:
- Copies a remote repo into a folder on your computer

Example:
Code:
git clone https://github.com/nathanchance/Ninja-Kernel.git
git clone https://github.com/nathanchance/Ninja-Kernel.git Ninja
Screenshot:
EgZTi7q.png


git checkout

Format:
Code:
# Changes to the specified branch (if it does not exist, it creates one)
git checkout <branch>
# Creates a new branch based off the specified one
git checkout -b <branch> <branch_to_be_based_on>
What it does:
- Whenever you want to make changes to files, you need to make sure you are on the right branch. You can see what branch you are currently on by running git branch; if you are on a different one, switch to the right one using the above commands
- If you want to create a new branch, use the second command.

Example:
Code:
# Switches to the m branch
git checkout m
# Creates a new branch "new-branch" based on old-branch
git checkout -b new-branch old-branch
Screenshot:
frXmH1h.png


git add

Format:
Code:
# Adds a file to the staging index
git add <file>

# Adds all of the changed files to the staging index
git add -a
What it does:
- This adds a file to the list of changes to commit (staging). So let's say you modify the README of your repo, deleting a line, and adding one. In order to register that change, you need to add the file to your staging index.

Example:
Code:
# Adds the file README to the index
git add README
Screenshot:
a2h4avr.png


git status

Format:
Code:
# Tells you what the status is of your repo
git status
What it does:
- Allows you to see what files you have staged for commit, where you are relative to where you are with your remote

Example:
Code:
Screenshot:
gwq2MCF.png


git commit

Format:
Code:
# Commit your changes and bring up a nano window to write your message
git commit

# Commit your changes and create the message as a parameter
git commit -m "Commit message here"
What it does:
- Saves all of your staged changes in a commit

Example:
Code:
git commit -m "This is a test commit message"
Screenshot:

68HTFql.png

r2fRW8v.png


ZKWu37f.png


git revert

Format:
Code:
# Undoes the changes by a certain commit
git revert <hash>
What it does:
- Undoes the commit you have chosen.
- NOTE: It is a good idea to add to the commit message why you are reverting a commit so people don't have to guess (did you not like it or did it break something?)

Example:
Code:
git revert 18d72d42648de9fde9bedcc810a936e0d253af9c
Screenshot:
Oq3tcWv.png


git pull

Format:
Code:
git pull
What it does:
- Retrieves the latest changes from your remote repository (like Github)

Screenshot:
4hCfxeA.png


git push

Format:
Code:
git push
What it does:
- Opposite of git pull, it sends your latest changes from your local repository to the remote

Screenshot:
ekqMh7h.png


git fetch

Format:
Code:
# Fetches the commits from the main branch of a remote repository
git fetch <url>

# Fetches the commits from the specified branch of a remote repository
git fetch <url> <branch>
What it does:
- Whenever you want to merge or cherry pick something from a repository other than your own, you need to fetch it so git knows where to pull commits from.

Example:
Code:
# Fetches the commits from the n branch of my repo
git fetch https://github.com/nathanchance/Ninja-Kernel.git n
Screenshot:
UV2FYLc.png


git merge

Format:
Code:
# Merge one branch of your repo with the current one
git merge <branch_to_merge>

# Merge a remote branch into the current one
git merge <remote>/<branch_to_merge>
What it does:
- Takes the commits in the specified branch and merges the ones that are not present in the current branch.

Example:
Code:
git merge n

git cherry-pick

Format:
Code:
# Takes a commit either from another branch or the list you fetched and merges it into your current branch
git cherry-pick <hash>
# Pick a range of commits
git cherry-pick <hash_1>^..<hash_2>
What it does:
- If you have a commit in another branch and want to merge it into your current branch, get the hash either from Github if pushed or git log (below) and run git cherry-pick
- If you have a commit in a remote repo you want to merge into your current branch, fetch the remote repo and run git cherry-pick with its hash (found on the remote repo's website)

Example:
Code:
git cherry-pick 68a8ff686ccb2ff01cbaa7b2704c4da6c066ecc8
gcp 7204eedd1076bd87c624aab4fb9c0cc6ac50933b^..102a72b895afb063240fb09292c17e11155e8dd9
Screenshot:
uberFSj.png


git log

Format:
Code:
# Brings up a list of commits with their full messages and hashes
git log
# Brings up a list of commits with the title of their message and full hashes
git lot --format="short"
# Brings up a list of commits with short hashes and messages
git log --oneline
What it does:
- This command allows you to see the revision history of your local repo

Screenshots: (git log, git log --format=short, then git log --oneline


rMlsdVu.png


QLIxLyR.png


Mb0ydRM.png


How To's

Merge Android security updates

There are two ways to do this (I personally recommend cherry-picking)
1. Cherry pick the individual commits

1. Fetch Google's repo
Google's kernel repository is located here: https://android.googlesource.com/kernel/msm/
Currently, Angler is on the branch android-msm-angler-3.10-marshmallow-dr1.6-1
Thus, the command looks like this:
Code:
git fetch https://android.googlesource.com/kernel/msm/ android-msm-angler-3.10-marshmallow-dr1.6-1
2. Figure out which commits you need to pick
  1. Click on the branch you want to merge commits from in Google's list
  2. Click on the "log" link next to the commit hash
  3. In that list, find the first commit at the top of the list and open it in a new tab (now referred to as the last commit)
  4. Start skimming the list, looking for the next commit that has a green android-6.0.1_r# next to it
  5. Open the commit right above that commit (now referred to as the first commit)
  6. Copy the individual hashes of the first and last commit (make sure to know which is which!)
3. Pick the commits!
Code:
git cherry-pick <hash_of_first_commit>^..<hash_of_second_commit>
Example
Commit log located here: https://android.googlesource.com/kernel/msm/+log/android-msm-angler-3.10-marshmallow-dr1.6-1
First commit: https://android.googlesource.com/kernel/msm/+/46b9920417db45ee0a93f16a07e80666219446d3
Last commit: https://android.googlesource.com/kernel/msm/+/909746bb5e4be07344b4fe4ce95c57fbfc8d9595
Code:
git fetch https://android.googlesource.com/kernel/msm/ android-msm-angler-3.10-marshmallow-dr1.6-1
git cherry-pick 46b9920417db45ee0a93f16a07e80666219446d3^..909746bb5e4be07344b4fe4ce95c57fbfc8d9595

2. Merge the whole branch

1. Add a remote
Google's kernel repository is located here: https://android.googlesource.com/kernel/msm/. A remote allows us to easily fetch a repo we use often. To add a remote, follow the below format:
Code:
git remote add <name> <url>
In this case:
Code:
git remote add aosp https://android.googlesource.com/kernel/msm/
Example:
uLF0xgn.png

2. Fetch the repo
Format:
Code:
git fetch <name_of_remote_above>
Example:
Code:
git fetch aosp
3. Merge the branch
On the left of Google's website, you will notice there are some branches. Currently, Angler is on android-msm-angler-3.10-marshmallow-dr1.6-1 (you can tell by the commit date of the first commit)
The format looks like this:
Code:
git merge <name_of_remote>/<branch_to_merge>
Example:
Code:
git merge aosp/android-msm-angler-3.10-marshmallow-dr1.6-1

Merge new Linux kernel updates

1. Fetch the kernel.org repo
We are on the 3.10 branch of the stable repo: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git
Code:
git fetch git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.y
2. Figure out which commits you need
  1. Go to the kernel.org website
  2. In the 3.10 line, click browse
  3. You will be presented with a full list of commits
  4. Open the first one in a new tab (which should be something in the form of "Linux 3.10.y" (now known as last commit)
  5. Use the next link at the bottom of the list and skim through the list of commits until you see the next commit in the form of "Linux 3.10.y"
  6. Open the commit directly above the previous commit (now known as the first commit)
  7. Copy the hash of the first and last commits (making sure you know the difference!)
3. Pick the commits
Code:
git cherry-pick <hash_of_first_commit>^..<hash_of_last_commit>
Example
First commit of 3.10.102: https://git.kernel.org/cgit/linux/k.../?id=ce9588a047eae53baf1607a408a8d1d5363f5fde (found on this page)
Last commit of 3.10.102: https://git.kernel.org/cgit/linux/k.../?id=ca1199fccf14540e86f6da955333e31d6fec5f3e (found on this page)
Code:
git fetch git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.y
git cherry-pick ce9588a047eae53baf1607a408a8d1d5363f5fde^..ca1199fccf14540e86f6da955333e31d6fec5f3e
If you get any conflicts. resolve them using the fix merge conflicts section below.


Add a feature from another kernel

I will be using @flar2's wake gestures as an example but this process will work for any set of commits. I have provided a Git example repo here. On the aosp-latest branch will be the latest kernel source from AOSP. If you want to follow along in this tutorial, clone that repo and checkout the branch like so:
Code:
git clone https://github.com/nathanchance/Git-Example.git && cd Git-Example && git checkout aosp-latest

1. Figure out which commits you need
This can be a little bit tricky. When adding a feature, there may be more than one commit you need to grab. The trick I use for figuring out if this is the case is going into the detailed commit view (take this commit for example), copying the location of one of the files changed, going back to the head of the repo (in this case, here), navigating to that file, and clicking the history button in the right hand corner. This should give you something like this:
fchKbG1.png

Now copy all of the commit hashes (you can click the little arrow clipboard icon next to the commit message to do this automatically. That gives us this list for wake gestures:

12cea9ee691f9794d3b0a76c6b381b4bde670bda
f4286dee51fde5c1082732381c9474c8381b8fb6
4c9e7f3f63eaf7514154633d320a6d4dd4f94831
5d10751af74617c23dfaf93bdf8149e39ce6da41
79d2aae008e51ed32d64e8a4a1dcf03231a22439
6495a2b15e501ce81bb58d39edd5923d52c2e45f
37daa721971b17a01d503c6dfa66c7c93b7cde2d


2. Fetch the repo
Now we need to fetch the repo that has the commits we need (in this case, the ElementalX repo).
Code:
git fetch https://github.com/flar2/angler.git ElementalX-1.00
Example:
YpGwRx3.png


3. Pick the commits
After fetching the repos, make sure you are on the proper branch using git checkout and git branch. Once this looks good, run git cherry-pick with the hashes:
Code:
git cherry-pick 12cea9ee691f9794d3b0a76c6b381b4bde670bda
git cherry-pick f4286dee51fde5c1082732381c9474c8381b8fb6
git cherry-pick 4c9e7f3f63eaf7514154633d320a6d4dd4f94831
git cherry-pick 5d10751af74617c23dfaf93bdf8149e39ce6da41
git cherry-pick 79d2aae008e51ed32d64e8a4a1dcf03231a22439
git cherry-pick 6495a2b15e501ce81bb58d39edd5923d52c2e45f
git cherry-pick 37daa721971b17a01d503c6dfa66c7c93b7cde2d
Screenshot:
Ng2EnPR.png

In this case, I was lucky not to have any conflicts. If you try to pick something and there are differences between the code that conflict, you'll get a merge conflict which you will need to fix before committing the cherry pick.

4. Check for any conflicts
Now when you merge a feature, you may need to enable in your defconfig. In this case, we need to add the line CONFIG_WAKE_GESTURES=y (tells the compiler to build the wake gestures module and add it). You can see an example of this here and here.


Fix merge conflicts


Special note: Authorship

Authorship is very important in the open source world, as it is what allows people to determine who is responsible for the commit and receive the proper credit. The general rule of thumb is if you didn't think of the idea and write the code, you are not the author. If you are cherry-picking properly, authorship should be automatically maintained; however, if you have to commit something that isn't yours or do some other wonky stuff, you may become the author. No worries though, it is very easy to fix it!

Apply authorship during commit:

Format:
Code:
git commit --author="Full Name <email@email.com>"
Example:
Code:
git commit --author="Nathan Chancellor <natechancellor@gmail.com>"
Screenshots:

K3BZn68.png

pHpitMy.png

Dce0iMt.png


Apply authorship after commit

Format:
Code:
git commit --amend --author="Full Name <email@email.com>"
Example:
Code:
git commit --amend --author="Nathan Chancellor <natechancellor@gmail.com>"
Screenshots:

hgmDcKe.png

Note: if you have already pushed your commit, you will need to amend the commit and force push it to change it:
Code:
git push origin --force
 
Last edited:

yung40oz84

Senior Member
Sep 23, 2014
3,090
1,027
sites.psu.edu
Only thing I noticed and maybe you could look into this, is sometimes when I unlock the phone and I am using chill governor it gets stuck at 302 frequency and will not go up at all........ Tried it on other kernel with chill, running same setup and was not the case. Thanks for the awesome kernel, very snappy!
 

Attachments

  • Screenshot_20160811-122446.png
    Screenshot_20160811-122446.png
    167 KB · Views: 39,584
Last edited:

nathanchance

Senior Recognized Developer / Contributor
Jul 22, 2015
13,760
50,104
29
Mesa, AZ
nathanchance.dev
Only thing I noticed and maybe you could look into this, is sometimes when I unlock the phone and I am using chill governor it gets stuck at 302 frequency and will not go up at all........ Tried it on other kernel with chill, running same setup and was not the case. Thanks for the awesome kernel, very snappy!
What kernel had it working properly? I am going to guess it is a wakeup issue or something. That governor is based on conservative, which has not be updated (at least on our Linux versiom 3.10.x) for big.LITTLE, so I am a little surprised it is working well elsewhere.
 

resynx

Senior Member
Jun 14, 2010
3,231
1,288
Just flashed this along with PN, excited to give it a run. Thanks for the kernel :)
 

SixFourSix

Senior Member
Mar 27, 2016
343
140
Best kernel for 6P. Not even an opinion, just based on performance.

I run Arise always and usually i need to put min freq of clust 1 to 480 MHz, so theres no clipping. This is with other kernels.

Ninja runs it perfect and smooth even with min freq set to 302 MHZ.
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 198
    UsFSxNO.png

    Introduction

    Hello everyone, this is my personal kernel for the Nexus 6P. While I am not a super star kernel developer, I do know my way around it. My philosophy on kernels is pretty simple:
    • Follow upstream Linux always
    • Stable kernel rules work best
    • Security and stability are paramount
    • Features will be added only as needed
    Hopefully you enjoy :)


    Thread Rules

    1. I refuse to acknowledge/respond to bug reports that do not include clear steps to reproduce, a logcat, and a console ramoops (if random rebooting) or a dmesg (any other issues). Follow this guide to do this. More on bug reporting policy here.
    2. Keep things civil, I do NOT tolerate flaming of any kind.
    3. OT is allowed.

    Features
    Here are the major features of the kernel (feel free to explore Github)
    • Updated to the latest security patch on the latest Android version (August on Oreo)
    • Updated to the latest Linux upstream version (3.10.107)
    • Several CVE fixes
    • Upstream patches from CAF and Linux
    • Touchboost force disabled
    • High brightness mode
    • KCAL color control
    • Adreno Boost
    • Wake gestures (sweep2wake, doubletap2wake, sweep2sleep, and camera launch gesture)
    • Faux Sound Control with high performance audio
    • ZRAM from 3.18
    • Maple I/O scheduler
    • Wakelock controls
    • TCP algorithms: bic, cubic, highspeed, htcp, hybia, illinois, lp, reno, scalable, vegas, veno, westwood (default)
    • F2FS support (latest from here)
    • Compiled with a Linaro 7.2.1 toolchain built with crosstool-NG (located here).
    • Makefile optimizations (courtesy of @adinkwok)
    • Forced encryption and dm-verity disabled
    • Hides bootloader unlock from SafetyNet (can still fail through other means)
    • Flashed with AnyKernel2 (thanks to @osm0sis)


    Downloads

    8.0.0 (v3.x): https://github.com/nathanchance/angler/releases

    Legacy downloads:

    7.1.2 (v1.x-v2.x): https://github.com/nathanchance/angler/releases
    7.1.1 (4.x): Main
    7.0 (3.x): Main
    6.0.1 (1.x): Main

    Do not mirror my kernels!


    Installation
    If you are on stock:

    • If you are on the stock kernel: flash the kernel zip and reboot
    • If you are on a custom kernel: flash the stock boot image matching your build number, flash the kernel zip, and reboot
    If you are on a custom ROM:

    • If you are on the kernel that came with your ROM: flash the kernel zip and reboot
    • If you are on a custom kernel: dirty flash your ROM zip, flash the kernel zip, and reboot
    Upgrading from one Flash version to the other:

    Just flash the kernel zip and reboot


    Changelog

    Latest post

    Kernel: https://github.com/nathanchance/angler/commits/8.0.0-flash
    AnyKernel: https://github.com/nathanchance/AnyKernel2-archive/commits/angler-flash-public-8.0.0



    Frequently asked questions
    1.1 Q: I am having an issue, can you help me?
    1.1 A: I am not an amazing kernel developer but I will certainly try my best. First, start by reading the release posts, as I may make note of a particular issue. Also search the thread to see if I have discussed it before. If you see nothing, please provide me with a dmesg/last_kmsg and logcat, your ROM/kernel version, and a detailed description of the issue, following this guide. If I can't reproduce reliably though, I'm not going to fix the issue.

    1.2 Q: Can you add xyz feature?
    1.2 A: If you link me the commits or tell me what kernel you had the feature in, I can take a look at them. I will not go digging super hard for commits and I will ignore requests that don't include this information. I won't promise that I will merge every request but I will always take it into consideration.

    1.3 Q: How do I control the kernel?
    1.3 A: I'd recommend using either @flar2's EX Kernel Manager or @Yoinx's Kernel Adiutor-Mod; both are extremely solid and have given me no issues.

    1.4 Q: What ROM are you on? What are your settings?
    1.4 A: Currently, I am on Dirty Unicorns and my settings are available here

    1.5 Q: OMFG MY BATTERY SUXXXX PLS FIX!!!
    1.5 A: The kernel doesn't drain any battery, use an app like BetterBatteryStats to figure out what app is screwing with your phone.


    Thanks to:
    @neobuddy89 for always providing great fixes and being a shining example of a great kernel developer
    The various other developers for their patches (@ak, @Buckmarble, @flar2, @franciscofranco, @frap129, @imoseyon, and @Yank555 to name a few)
    @osm0sis for AnyKernel2
    @DespairFactor for helping me with some kernel compilation issues
    @kwoktopus for giving me good advice on Makefile flags and other patches
    @kantjer for being a beta tester along the way!
    @malybru for my nifty new signature!
    @phantom146 for the thread banner and default profile GlassCannon
    All of you guys for viewing the thread


    A note about donations

    Quite a few people have asked to donate to me in the past and I have turned them down. I am not in this for the money, this is my hobby, something I truly enjoy. If you truly want to donate to something (it is not expected in the slightest), I recommend an entity like the Open Source Initiative, the Free Software Foundation, XDA, or any one of the people I have thanked in the OP. Additionally, you are free to copy any and all of my work; the only thing I request is that you not ask for donations as well (though I can't really enforce this lol). Thank you.


    Kernel source links

    8.0.0: https://github.com/nathanchance/angler/tree/8.0.0-flash
    7.1.2: https://github.com/nathanchance/angler/tree/7.1.2-flash
    7.1.1: https://github.com/nathanchance/angler/tree/7.1.1-flash
    7.0: https://github.com/nathanchance/angler-old/tree/release-7.0
    6.0.1: https://github.com/nathanchance/angler-old/tree/release-6.0.1


    DISCLAIMER: I openly welcome off topic in my threads. Mods, please do not clean off topic discussion and users, do not complain about off topic discussion here. I may direct you to another thread if it is so suited but I won't have the discussion cleaned. Thank you.

    XDA:DevDB Information
    Flash Kernel, Kernel for the Huawei Nexus 6P

    Contributors
    nathanchance
    Source Code: https://github.com/nathanchance/angler

    Kernel Special Features:

    Version Information
    Status: Stable
    Current Stable Version: v3.1
    Stable Release Date: 2017-09-17

    Created 2016-08-11
    Last Updated 2019-07-02
    128
    IT IS HERE!

    DOWNLOAD: http://nchancellor.net/Downloads/Kernels/

    Welcome to Flash Kernel 2.0 so to speak; this kernel has been completely rebased from the ground up. I have learned a lot in these past few months about what should and shouldn't be added for the best overall experience. So rather than fix my source in steps, I just decided to start from scratch so to speak. Here's what I did:

    1. Grabbed kernel source straight from Google fresh
    2. Picked upstream Linux commits from kernel.org, fixing conflicts again (as I had messed some up before)
    3. Added known working patches (like governors, I/O schedulers, file systems, and such)
    4. Went through the remaining patches, evaluating what the patch exactly did, and locating the original source to see if it had been altered
    5. Left out anything that was not relevant or helpful to our version
    6. Cleaned up dmesg a ton, by removing spammy logs and warnings that should not have been happening
    At the end, I have a much cleaner and stable kernel. You may notice that some of your favorite features are missing, that's not by accident. The part that got me really down a little bit ago is I felt like this process was going to be a waste. People have so many preconceived notions about kernels, like that they will give so much more battery and performance and it's hard as a developer to shake off those things. I've seen so many people in both this thread and a few others rave about and disparage this kernel for completely subjective and inaccurate reasons. While I don't necessarily care about number of users, it's disheartening to see something that I put out for free without absolutely no expectation of reimbursement get a bad rap. But I've just decided to ignore it or correct it when I can. If someone blames my kernel for their drain, so be it. I do this because I use my kernel myself and I like doing it, I hope you guys can respect that. Also, bug reports are going to change a bit. If I cannot reproduce your issue myself, I'm not going to fix it. Simple as that, I cannot go on wild goose chases for issues I don't experience. Logs will still be required but steps to reproduce will be as well. Anyways, off my soapbox lol, enjoy the kernel guys.
    122
    Alright guys, I am going to be changing up how I do things around here.

    1. Kernels will no longer be versioned as they will become daily, built from my personal branch. What this means for you is that you will get the kernel as I customize it (my custom settings from the OP as well permissive SELinux at boot) and some stuff may or may not be broken.
    2. I will no longer be taking bug reports (I will attempt to fix the Android Auto issue as a grandfathered thing). If it works, perfect; if not, it's most likely not a problem for me so I won't care.
    3. The thread will be closed for now (my Telegram channel will still be open for chatting and hanging out and the thread may be open eventually).

    I have become very worn out checking my threads all the time and maintaining multiple branches so I am going to simplify it. The experience should not change, only the process. Thanks for everything and I will still be around XDA in various capacities, I just don't have the time to continue maintaining the thread as I would like.

    Nathan

    Updated kernels will be served here (first one will be up in an hour or so): http://nchancellor.net/Kernels/angler/7.1.1/Personal
    122
    The end of an era

    It's with a heavy heart that I announce the end of Flash Kernel development for the Nexus 6P. I simply do not have the time to support this, DU for the 6P, and Flash Kernel for the OnePlus 5. I didn't want it to come to this but the recent issues with pretty much all custom ROMs has caused me to make this decision. For the record, I don't think these issues are because of the kernel but to eliminate it as a factor, I'd need to rebase the kernel from scratch and there is zero way I'm going to be able to do that. Rather than give you guys false hope or tarnish the kernel's name, I am just going to bow out. Joe Maples is most likely going to continue working on Electron so if you want a good kernel to migrate to, that one is it. However (and I say this having loved my time on the device), I would highly consider upgrading your device. The 810 was really a terrible chip in the long run and either an 821 or 835 device is going to make a HUGE improvement. I can consistently get 5-6 hrs of SOT without any issues on the OnePlus 5; I only did that in the first couple of months with this device. The Pixels (1 and 2), Essential Phone (once they get kernel source released and maybe shore up some camera issues), and the OnePlus 5 are all awesome destinations and should hold up much better than this device.

    It was great learning and talking with you guys in here. You're always welcome in Telegram (I will leave this chat open) or in my other threads.

    The Flash (Nathan)
    99
    Alright this thread is reopened for the time being, I will be revamping the OP here shortly with some new rules for how this thread is going to run.

    1. I refuse to accept/respond to bug reports that don't include a logcat, dmesg, and if applicable, a ramoops
    2. The kernel will boot with my personal settings (these can be changed after boot by a kernel manager) and while I will try to keep the OP up to date, you will need to read my init script to know for sure what is being set.
    3. There will be no changelogs or versions; I will build when I am able to and the changelogs will be my commit lists:
    https://github.com/Flash-ROM/kernel_huawei_angler/commits/n7.1.1
    https://github.com/Flash-Kernel/AnyKernel2/commits/angler-flash-personal-7.1.1

    Other than that, have fun and enjoy the kernel.