Android 4.4 (KitKat) kernel for Nexus 10

Not sure what this is about? Read this post first.

Update (26 Nov): I’ve updated this twice now, once to add several 3G modem/dongle drivers, and the last round to put back the out of tree driver for my USB Ethernet stick.

Update (14 Dec): I’ve added a kernel for those of you running KOT49H (ie. Android 4.4.2)

The kernel sources were finally released yesterday morning (in my timezone). I’m guessing this happened at the same time KRT16S became available. Anyway, I’ve compiled my tweaked version of the kernel for the Nexus 10. Download it here:

And yes! I’ve finally gotten round to making an update.zip of the boot image. The zip flashes the boot partition, copies the kernel modules into /data/kernel_modules/<kernel name> and symlinks /system/lib/modules/<kernel name> to /data/kernel_modules/<kernel name>. The symlink is necessary because, at least on my device, there is very little space left on /system, and my modprobe is configured to look in /system/lib/modules.

Note that I’ve only tested the update.zip on CWM Recovery 6.0.4.3. In any case, you should always be able to flash this using fastboot. To flash it manually with fastboot, just extract the zip – the kernel modules and boot image are inside.

I believe the most common drivers for 3/4G USB dongles are already compiled in. Some others many be present as loadable modules.

PPP Widget Note:

I don’t personally use PPP Widget, but I realised many of you are using 3/4G USB dongles with your Nexus. Nigel (in the comments below) pointed out that PPP Widget does not set the DNS servers in Android correctly all the time, and you may be using DNS servers from the last time your tablet was connected to WiFi. The fix for this is disable WiFi before connecting with PPP Widget.

60 thoughts on “Android 4.4 (KitKat) kernel for Nexus 10

    1. tan-ce Post author

      To clarify, it doesn’t work as in you couldn’t install the kernel, or that your 3G modem doesn’t work?

      Reply
        1. tan-ce Post author

          Oops, I haven’t been very consistant with my kernel module selection. I’ve made a new version, why don’t you give that a try and see if I added the right drivers.

          Reply
          1. Alek7

            Now I can connect my 3g modem with ppp widget but I can’t surf on internet. It says that I’m not connected to internet. I hope that you can help me. 😉

            Reply
            1. tan-ce Post author

              I’m afraid I’m not familiar with this PPP widget. If it’s a matter of drivers I could probably help you, but I don’t use 3G USB dongles myself. (I tend to stick to bluetooth or WiFi tethering.)

              That said, do you have a terminal emulator? What’s the output of ifconfig after connecting the 3G modem?

              Reply
                  1. Alek7

                    You have probably right : it’s ppp widget the problem. Can I connect me by an another way than ppp widget (for ex: terminal command) ?

                    Reply
                    1. tan-ce Post author

                      I’m not sure what would work in the default Android terminal. Have you tried searchin xda-forums or in general?

    1. tan-ce Post author

      The boot image only contains the drivers I choose to compile in. Within the update zip are the loadable kernel modules which are basically additional drivers.

      Reply
      1. Sergio

        And could you include the same drivers as you included in 4.3 boot image for build JWR66Y
        Because, in 4.3, if I flash with fastbooot the file tan-ce_manta_JWR66Y_boot.img my 3g moden run perfectly
        But in 4.4, not. I have stock recovery then i cant flash zip…

        Could you include the loadable modules in the boot image, as in 4.3 version?

        Thank you!

        Reply
        1. tan-ce Post author

          It’s not possible to include loadable modules in the boot image, but it is possible to compile them in (so they are always loaded.) Have you tried the second version I uploaded? I added 3 drivers used by 3G modems when Alek7 pointed out they were missing.

          If yes, then do you remember which modules you need? Or at least let me know which 3G modem you are using?

          Reply
          1. Sergio

            Hi, i will try 2nd version
            My 3g modem is Huawei K3675
            The modules i think that i need are:
            cdc-acm.ko
            option.ko
            ppp_async.ko
            usb_wwan.ko
            usb_serial.ko

            But im not sure if all are necesay, or not, for my 3g modem huawei
            Your 4.3 boot image version works perfect in ice cream.

            Tank you!

            Reply
            1. tan-ce Post author

              In the 2nd version onwards, all those modules are compiled in. In the first verison, I missed the option, async, and wwan drivers. The current one available for download should work.

              Reply
  1. frank

    Hi, thank you for good work!
    I have a question: I can’t write to a (mounted) ntfs-external HDD with Android 4.4. Is a additional kernel-module needed to write to a ntfs-USB-Storage?
    Thanks a lot!

    Reply
    1. tan-ce Post author

      My kernel has the ntfs driver with write support enabled… but I just realised that Android now has SELinux enabled in enforcing mode, and it is SELinux which is denying access to the filesystem. I need to learn more about this first.

      Reply
  2. loaded247

    tan-ce,

    I’d like to know if you have thought about compiling kernel for a USB wireless adapter with a broadcom chipset, so those of us who own a 2013 nexus 7 can make use of Reaver/Aircrack-ng etc… I had a 2012 nexus 7 running CM 10, and found bcmon.apk to work flawlessly. as a matter of fact I do believe I was 1st to confirm it to be working on 2012 nexus 7, with the dev’s of bcmon.apk, using internal adapter.
    Link to my blog: http://loaded247.blogspot.com/2013/07/bcmonapk-monitor-mode-working-for.html

    do u think bcmon would work using external adapter?

    Reply
    1. loaded247

      oh… BTW, my 2013 nexus 7 is the 32GB WiFi only model…
      Rooted, running 4.4 KitKat, build number KRT16S.

      ps… still very noob to android, but i’ve got the itch, and can’t stop scratching. I understand compiling kernel is difficult, but if you can point me in the right direction, I’d be very much appreciative.

      thanks In advance,
      loaded247

      Reply
      1. tan-ce Post author

        Actually compiling the kernel isn’t very difficult, but for some reason I haven’t been able to get a working version of the 2013 Nexus 7 kernel. Also, because I don’t have a Nexus 7, I can’t test and try to figure out why those builds aren’t working. Anyway, the instructions for compiling the kernel are given by Google (link below).

        I suggest trying to compile a vanilla kernel and injecting it into your boot partition first. Then you’ll know whether you got the steps right.

        The high level steps for getting a working kernel on your device are:

        1. Compile the kernel. (http://source.android.com/source/building-kernels.html has the full steps, but I usually skip getting the device tree.)
          • Get the pre-compiled toolchain.
          • Get the kernel source for your device. For you, this will likely be the git repo at https://android.googlesource.com/device/asus/flo-kernel/

            Hint: the kernel version shown in your About Device shows the git commit used to compile it. So, if your kernel is 3.4.39-g79b81c6, then the git commit you are looking for is 79b81c6

          • Follow the steps in Google’s building kernels article for preparing the build tree, then compile the kernel
        2. Download the factory image for your device, extract the boot partition image. (boot.img)
        3. Extract the compressed initrd image from the boot partition
        4. Combine the initrd image with your kernel to create a new boot partition image.
        5. Flash the boot partition image
        6. When I have more time, perhaps I’ll write a full step by step article on these steps.

        Reply
    2. tan-ce Post author

      If the driver is in-tree then it’s really just a matter of me enabling and compiling the module. Do you know the exact name of the driver used for those broadcom chipsets?

      Reply
  3. Nigel

    You saved me! On stock Android 4.4 on Nexus 10, I had PPP-widget “no device driver” when plugging in my AT&T E368 USB dongle. With your kernel, easy install, modem got recognised.

    I had an issue that I was apparently not online but a terminal shell showed it was a DNS issue as could ping IP not hostname, so I guess the PPP Widget not over-writing the Wifi DNS servers, so the fix was to either disable Wifi before PPP-Widget connect, or (which I did) was to make my router give out the Internet-facing DNS server IP not itself. (e.g. give out 8.8.8.8 and not 192.167.x.y)

    I now Nexus 10 with 4G!

    Reply
    1. tan-ce Post author

      Glad to hear it’s working for you. Also, thanks, others who may be trying the same thing as you will likely find this helpful.

      Reply
      1. Nigel

        No probs. I have gone to the top few hits with “Nexus 10 ppp widget” and posted the fix, pointing to this page and the workaround. Hopefully those in the same boat will get notified in the forums and find the answer and it might lead to request to add more drivers? Thanks to you for compiling in ppp and drivers.

        4.4 Kitkat is noticeably faster and more stable than 4.3.

        Reply
  4. Nigel

    I also confirm that if you use the Pogo cable to provide power, the USB port still works and delivers power running your kernel.

    I’ve been charging at the same time as online with 4G dongle.

    Don’t get too high an expectations, the 2A output of the USB wall charger is only 10Watts (2Ax5V) and if I connect external devices and drive screen brightness to max and play HD video, then battery level steadily drops, so don’t think we can basically make a laptop type equivalent which has the luxury of a 12V-19V input.

    Reply
  5. Frank

    Is a new Version of your boot.img (especially the kernel) needed for the new Stock Android 4.4.2?
    In 4.4.2 is a new boot.img included i think…
    Thanks a lot.

    Reply
    1. tan-ce Post author

      This kernel and modules is meant for Android 4.4 on the Nexus 10 (which is build KRT16S).

      I haven’t checked yet for 4.4.2 because the factory images don’t seem to be released yet. I’ve only seen references to the OTA. But since this is an incremental update, there’s a good chance nothing changed in boot.img. This kernel might still work. If you know anyone who has stock 4.4.2, post the kernel version here and I’ll know if something has changed.

      Reply
  6. Nigel

    I have N10 on stock 4.2.2 KOT49H and your kernel boots and I can run ppp-widget. That’s the good news confirmation.

    I tried and failed to overlay your compiled modules over the Franco kernel. I tried copying your modules also into /pppwidget/lib but still no joy. What DOES work is to swap kernels i.e. once you get a working PPP going using the kernel then install Franco kernel and when you want ppp I install the zip. I had a similar issue on my N7 2012 of booting Timur USB host kernel when I wanted to use PPP.

    Reply
    1. tan-ce Post author

      It sounds like what you’re doing is swapping out kernel whenever you want to use PPP.

      Again, my modules won’t work with other kernels. Each time a kernel is compiled it’s given an ID based on its configuration. You’re not supposed to mix and match modules from different kernels.

      Reply
  7. Frank

    Hi,the factory 4.4.2 image for the Nexus 10 is now downloadabel from Google.
    A update from stock 4.4 to 4.4.2 with your boot.img failed at my Nexus 10 🙁
    My there are some changes done by google on the kernel?

    Reply
      1. tan-ce Post author

        There were changes to the kernel. Unlike some of the earlier updates (4.2.2, I think?), this update to 4.4.2 changed the kernel. I’m also reviewing the config changes, and Google also changed some of the default kernel config.

        I don’t recommend running the 4.4 kernel on the 4.4.2 image. I’m compiling and cooking right now. My 4.2.2 kernel should be up within the hour.

        Edit: It’s up now

        Reply
  8. Tae Kim

    Could anyone recommend what would be the best way to upgrade the firmware from 4.4 to 4.4.2 without a factory reset? (I.e. keeping the settings and installed apps…)

    Reinstall the stock 4.4 and use OTA update and install custom 4.4.2 firmware? Somehow it didn’t work well when I tried it for the upgrade to 4.4. I probably did something wrong at the time.

    Reply
  9. tan-ce Post author

    Oh, no, to downgrade you cannot use the OTA. The “correct way” to downgrade is to reset, and reflash everything. If you want to try downgrading without resetting, your best hope is to do a “dirty flash” – reflash all the partitions exact the data partition. It may or may not work well still, though.

    Reply
      1. tan-ce Post author

        I’ll take a look at it soon. Looks interesting, but I think I’d want to look through the patch first before applying it wholesale.

        Reply
    1. Tae Kim

      Hi tan-ce,

      First, thank you for the kernel works. I really appreciate the help. 🙂

      Actually, what I was wondering about was upgrading 4.4 to 4.4.2. When I did upgrade from 4.3 to 4.4, something was messed up (probably, my mistake) and I had to do a factory reset. I like to avoid the same mistake this time.

      Can I use OTA (4.4 –>.4.4.2) if I reflash the stock 4.4? Or, do I have to use another updater?

      Reply
      1. tan-ce Post author

        Oh, sorry, I read your first message wrongly, I thought you wanted to go from 4.4 to 4.2.2.

        Before running the OTA, you should restore the boot partition to stock using fastboot and a copy of the factory image. It’s usually recommended to restore stock recovery too before running an official OTA, although I seem to remember using Clockwork Recovery to run my OTA. (I don’t remember if I actually succeeded…)

        In any case, the safest is to take a nandroid backup using your recovery. That way, if you screw up the upgrade, you can revert to the way things were.

        However, if you’re prepared to reflash (and therefore reset) everything, you should just go straight for the full 4.4.2 image.

        After upgrading to 4.4.2, then download and install my 4.4.2 kernel.

        Reply
  10. Pingback: Come utilizzare la chiavetta USB per navigare con Nexus 10 - Forum Android Italiano

      1. tan-ce Post author

        I’m not sure I can help you with this – it sounds like a problem with our PPP dialer or your modem.

        Reply
  11. tan-ce Post author

    Yeah, I do plan to build one for the 4.4.3 kernel, but the timing is unfortunate. I’ve been travelling for work, and I’ll be busy for the next two weeks at work too, so I expect I’ll only be able to get round to this in 2 weeks time.

    Reply

Leave a Reply to Alek7 Cancel reply

Your email address will not be published. Required fields are marked *