• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[KERNEL][08/11][3.10.102][UBER-5.4] Unofficial AK - 067

Search This thread


Senior Member
Sep 2, 2011
I changed the governor to fiops and 512 readahead. I also changed the min freq to 302 for cpu's, target loads for little/big cpu and also the hispeed delay. Probably couple other little things too. Basically took AmanuensisOne and made it try stay at lower frequencies slightly longer.
Have changed a few more things, v1.2 available here: https://drive.google.com/open?id=0BxNg1CsHZMjFNHdjZlhyUi00MDg

Maybe you can get high SOT with that, but at what cost? AmaOne_6P was unusable if you use Arise and listen to music at the same time. Would lag painfully much. And all the time, not just occasionally. But I guess it's not made for that kinda usage. Ninja 1.0 tried and true settings got things running super smooth again, not convinced about this profile, sorry.

@Juzman Thanks for the info, I'll try it out :)
@SixFourSix Thanks for the info, I didn't listen to music while I was testing, but also didn't notice any lag.

Ninja is super snappy indeed! No harm in trying out kernel profiles, that's also what we're here for. :)
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 77
    Hello everyone, this is my unofficial version of @ak's kernel. As he has been busy with life lately, I wanted to keep up with the Android security patches since this kernel runs amazingly on my phone; so I did just that. Because these are unofficial, you are NOT to discuss the use of them in ak's thread. Do that here. Read ALL of this post, I go over almost everything you could need to know. This kernel will only receive security updates and upstream Linux patches; I will not be changing anything else.

    For those of you who have come here before, I have moved the more feature packed kernel to here: http://forum.xda-developers.com/nexus-6p/development/kernel-ninja-kernel-v1-0-t3437247

    Differences from official
    • AK versions 064-066 (unreleased officially by ak)
    • Linux versions 3.10.74-3.10.83 and 3.10.102
    • August security patch
    • Patches for some CVEs
    • Compiled with latest Uber 5.4 toolchain

    Main folder

    • If on a previous version of my build OR the kernel that comes with your ROM: Flash the zip in TWRP and reboot.
    • If on another custom kernel: Dirty flash your ROM OR the boot.img if on stock, flash the zip in TWRP, and reboot.

    [*]Initial release

    Frequently asked questions
    1.1 Q: I am having an issue, can you help me?
    1.1 A: Keep in mind I am by no means a kernel developer. However, 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 and then provide me with a dmesg/last_kmsg and logcat plus your ROM/kernel version, I'll do my best to assist you.
    adb logcat -d > logcat.txt
    adb shell dmesg > dmesg.txt

    1.3 Q: Can you add xyz feature?
    1.3 A: Sorry, no. I will only be adding security patches. If you want a fully updated and feature packed kernel, check out my Ninja Kernel: http://forum.xda-developers.com/nexus-6p/development/kernel-ninja-kernel-v1-0-t3437247

    1.4 Q: How do I control the kernel?
    1.4 A: AK recommends using Synapse; if you do not care for Synapse, I would flash this UKM uninstaller in TWRP to keep your /data partition clean. Personally, I 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.5 Q: What are your settings?
    1.5 A: Here are my regular/tried and true settings for what I consider great performance and battery life:

    CPU governor: Interactive
    CPU governor (Cluster 2): Interactive
    Stock governor profile

    Max CPU frequency: 1708 MHz
    Min CPU frequency: 302 MHz
    Max CPU frequency (Cluster 2): 2054 MHz
    Min CPU frequency (Cluster 2): 302 MHz

    Input boost frequency: 0:768000 1:0 2:0 3:0 4:0 5:0 6:0 7:0
    Input boot milliseconds: 60

    msm_thermal: Enabled
    core_control: Disabled

    No modifications

    Sweep2Wake: Up, Down
    Camera launch gesture: Enabled

    No modifications

    No modifications (I leave zRAM enabled)

    No modifications (sioplus and 1536 are the defaults, which I use)

    Thanks to:
    @ak for the fantastic kernel
    The various developers for their patches (@flar2, @franciscofranco, and @imoseyon to name a few)
    @DespairFactor for helping me with some kernel compilation issues and the Uber prebuilt toolchains I use
    All of you guys for viewing the thread

    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
    Unofficial AK Kernel, Kernel for the Huawei Nexus 6P

    nathanchance, ak
    Source Code: https://github.com/nathanchance/AK-Angler

    Kernel Special Features:

    Version Information
    Status: Stable
    Current Stable Version: v067
    Stable Release Date: 2016-08-11

    Created 2016-06-19
    Last Updated 2016-08-11
    How to compile the kernel for yourself

    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). 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 my AK source
      mkdir ~/Android
      cd ~/Android
      git clone https://github.com/nathanchance/AK-Angler.git AK

      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 AK (git clone <url> <folder_to_clone_in_to> is the format of the command).
    2. Grab my AnyKernel source
      cd ~/Android
      git clone https://github.com/nathanchance/AK-Angler-AnyKernel2 AK-AK2

      First command moves into the Android directory we made above (change directory)
      Third command pulls the source from my Github into a directory named AK-AK2 (git clone <url> <folder_to_clone_in_to> is the format of the command).
    3. Grab the toolchain you want to use to compile the kernel
      cd ~/Android
      git clone <kernel_url>
    3. Setup the build

    1. Make sure everything looks right
      After following the above steps, type:
      You should see something like this:
      aarch64-linux-android-6.x-kernel-linaro  AK  AK-AK2
      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
      cd ~/Android/AK
      git checkout <branch>
      cd ~/Android/AK
      git checkout m-eas
      First command will move you into the AK source directory we cloned above.
      Second command will checkout the branch you want to compile for. A git repo can have multiple branches. For mine, these are the possible options:
      • m-standard (for the M Normal branch)
      • m-eas (for the M EAS branch)
      • m-nethunter (for the M NetHunter branch)
      • n-testing (for the N Normal branch)
    3. Select the correct AnyKernel branch
      cd ~/Android/AK-AK2
      git checkout ak-angler-anykernel
      First command will move you into the AK AnyKernel directory we cloned above. This is what allows you to flash the kernel (thank you very much @osm0sis for all the work you do).
      Second command will checkout the correct branch (in this case, ak-angler-anykernel)
    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:
        cd ~/Android/<toolchain_folder>
        cd ~/Android/aarch64-linux-android-6.x-kernel-linaro
        You should get something like this:
      2. Tell the compiler where that toolchain is
        Copy and paste that file location above into this command:
        export CROSS_COMPILE=<toolchain_dir>/bin/aarch64-linux-android-
        export CROSS_COMPILE=/home/nathanchance/Android/aarch64-linux-android-6.x-kernel-linaro/bin/aarch64-linux-android-
      3. Set the architecture
        Angler is a 64-bit device so we need arm64
        export ARCH=arm64
        export SUBARCH=arm64
    2. Clean up from a previous compilation and update the source
      cd ~/Android/AK-AK2
      git reset --hard origin/ak-angler-anykernel
      git clean -f -d -x > /dev/null 2>&1
      git pull > /dev/null 2>&1
      cd ~/Android/AK
      git reset --hard origin/<kernel_branch>
      git clean -f -d -x > /dev/null 2>&1
      make clean && make mrproper
      cd ~/Android/AK-AK2
      git reset --hard origin/ak-angler-anykernel
      git clean -f -d -x > /dev/null 2>&1
      git pull > /dev/null 2>&1
      cd ~/Android/AK
      git reset --hard origin/m-standard
      git clean -f -d -x > /dev/null 2>&1
      make clean && make mrproper
      git pull
      First set:
      The first command moves you into the AK AnyKernel 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 command will pull any new AnyKernel changes from me into the source.

      Second set:
      The first command moves you into the AK 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:
      cd ~/Android/AK
      make ak_angler_defconfig
    4. Name the kernel
      If you notice in About Phone > Kernel Version, it shows 3.10.102-AK.066-9.UBER4.9 (or something similar). You can customize this like so:
      export LOCALVERSION=-"kernel name"
      export LOCALVERSION=-"AK-Nathan-Personal"
    5. Make the kernel!
      make -j#
      make -j4
      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
      cd ~/Android/AK/arch/arm64/boot
      cp -v Image.gz ~/Android/AK-AK2/zImage
      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 = file to be copied
      ~/Android/AK-AK2/zImage = destination and name
    2. Make a current dtb file
      cd ~/Android/AK-AK2
      tools/dtbToolCM -v2 -o dtb -s 2048 -p ~/Android/AK/scripts/dtc/ ~/Android/AK/arch/arm64/boot/dts/
      No explanation, just do it :silly:
    3. Zip it up!
      cd ~/Android/AK-AK2
      zip [email protected] -r9 ak-kernel.zip *
      Using the above commands, your newly completed kernel will be located at ~/Android/AK-AK2/ak-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!


    When I was working on the N version of this kernel, I discovered that ak did not merge Linux versions 3.10.74 to 3.10.93 into the kernel (unless I was missing a commit somewhere). I decided to find out if there were any issues that preventing him from doing so. I merged each version one by one, built, and tested. There were a few problems along the way (freezes, no sound, and bootloops) but I have ironed all of those out. As a result, I rebased all three of the M branches around those new commits. Additionally, I added an fstab.angler file so that forced encryption and dm-verity are disabled (I did not realize this had not been done before so I apologize). I have tested for the past two days and experienced no issues (and @kantjer has as well). Should you experience any, please provide me with a kernel log and logcat using the following commands:
    adb logcat -d > logcat.txt
    adb shell dmesg > dmesg.txt

    Downloads: https://www.androidfilehost.com/?w=files&flid=83293

    Changelog (full list of commits on my Github)
    • Rebased to include all upstream Linux from 3.10.74 to 3.10.102
    • Default I/O scheduler and readahead are now sioplus 1536
    • Added fstab to AnyKernel zip so that forced encryption and dm-verity are disabled
    • Latest toolchain sources
    Change of plans

    Okay guys, I have done a bit of thinking and I have decided to switch something up. Recently, I have been feeling a little weird calling the kernel AK, as I am not AK and I am adding quite a bit on top of it, almost to the point it is starting to feel like a different kernel. As a result, I have decided to do two things:

    First, this thread will not be going anywhere but its purpose will change. Going forward, this thread will be dedicated purely to providing an updated "stock" AK Kernel. This means ONLY security updates and upstream Linux versions, I will not be adding or changing anything else. It will be compiled with Uber 5.x, have Synapse support (which you can remove with the UKM uninstaller), and be as close to AK as it gets (just like the official version).

    Second, I have taken the unofficial AK you have come to know and love and opened it under a new thread. It has acquired a new name as well: Ninja. Ninja is a bit of a nickname I have acquired here (goes along with the whole Flash thing too) so I decided to name the kernel this. This kernel will gain new patches and fixes as they come up. Check out the thread here: http://forum.xda-developers.com/nexus-6p/development/kernel-ninja-kernel-v1-0-t3437247

    Hope you guys are enjoying the kernel, @ak has worked some real magic I think.
    Update for M!

    Changelog: (Full commit list)
    • Version 066-8
    • August security patch
    • Removed the init.d option in AnyKernel zip (use su.d instead)
    • Added a patch to help with watchdog bites
    • Latest toolchain sources

    Downloads: https://www.androidfilehost.com/?w=files&flid=88179