Every Android kernel is made of few parts, which (depending on the OEM) contains a zImage created during kernel compilation and a ramdisk where some device-specific settings are stored. Sometimes, the ramdisk contains a recovery, logo, and so on.
If you’ve ever tried to work on a precompiled kernel, you’ve noticed that it can’t be extracted with a simple archive manager. Rather, you need some tools capable of unpacking and repacking the kernel as an IMG file. These tools can be easily built on Linux. And thanks to XDA Senior Member A.S._id, you can download them easily and compile your 0wn.
The current set of tools includes such binaries as: mkbootfs, simg2simg, make_ext4fs, mkbootimg, ext2simg, img2simg, simg2img, sgs4ext4fs, and unpackbootimg. Some of them were created by XDA Senior Recognized Developer Chainfire and the CyanogenMod team.
The compilation process is presented in the thread. It’s really simple, and needs just two commands. If you have problems executing them, don’t forget to set the correct permissions by setting the files as executable. After compilation, you end up with binaries that can be used in the kernel modification process.
Naturally, this tool works only on Linux machines. Having configured Github account is also recommended. You can learn more about those binaries by visiting the original thread.
December 19, 2013 By: Tomek Kondrat
The kernel is arguably the most important part of any ROM. A well written kernel makes the device rock stable, battery-friendly, and lag-free. That’s why we have so many greatly written kernels are available here at XDA. But having a good kernel is one thing, and squeezing the maximum performance out of it is another. And without experience and excessive knowledge, it’s sometimes difficult to modify even simple variables.
More than a year ago we informed you about Trickster MOD, a great tool designed to change various kernel settings. Unfortunately, many of functions available in Trickster MOD are available only in premium version of this app. XDA Senior Member xcesco89 created an alternative, fully free application to adjust some kernel values without messing around using adb shell or terminal emulator. With the tool, he made it’s possible to tweak your CPU and GPU, as well as set scheduler and many other variables. If you are planning to play with your kernel, an application like Kernel Tweaker Beta should be tucked away in your drawer.
You can get the newest version of this app and read more about its features in the development thread. We recommend that you exercise caution though, as setting improper values can damage your phone in some extreme situations.
August 10, 2013 By: Samantha
Greg Sony”. It’s a rather affectionate title that Sony’s been given for the past few months, particularly for their leading track record in GPL compliance as displayed on multiple occasions. So to make sure that they’re continuing their fairly extraordinary performance, they’ve just released the open source files for the recently announced Xperia Z Ultra and M.
Much in the spirit shown by Sony back with the Xperia Z, the company’s gone ahead to make sure developers can play with the workings behind both the yet-to-be-released Xperia M and the just released Xperia Z Ultra. It’s been iterated before, and it has to be done again, but nothing but commendation can be given to Sony Mobile for this.
The Xperia Z Ultra is Sony’s answer to the very successful Note series from Samsung, boasting a 6.4-inch display at 1080p resolution. Keeping it going is the 2.2GHz quad-core Snapdragon 800 processor, 2 GB of RAM, and a 3000 mAh battery. With a thickness, or thinness rather, of 6.5mm, it retains the attractive OmniBalance design we’ve seen featured in the 2013 Xperia family. This is also true for the Xperia M, a mid range device with quite a modest spec sheet. Yet despite its 1GHz dual-core Snapdragon processor and 1GB of RAM, it definitely still has enough horsepower to go about the uses of the average user.
So if you’re thinking of thinking about getting either of these devices, or curious about their “behind the scenes,” you can find the files for the Xperia Z Ultra and the Xperia M at their respective posts on Sony Developer’s Open Source Downloads site here and here.
August 6, 2013 By: Jimmy McGee
Par for the course at XDA is to customize our devices. This includes a custom theme or a custom ROM with different launchers, layouts, and color schemes. However, an important part of a device’s firmware and software package is the kernel. The kernel is like salt in a recipe for cookies. You don’t notice when it’s working fine. But when it’s not, you notice.
In today’s video, XDA Developer TV Producer Kevin talks about the unsung hero of Android. He gives a basic overview of what a kernel does. Then Kevin talks about a few custom kernels on XDA and what they can provide for you. So if you want to learn more about the kernel, check this video out.
We don’t usually cover individual custom kernels here on the Portal for the simple reason that thanks to the development community, there are so many great options available that we wouldn’t have time to cover anything else. However, every once in a while, a kernel developer brings so much awesome to the table that it would be downright rude of us not to sit down and stuff our faces until we are fat and happy. Devil Kernel by XDA Recognized Developer DerTeufel1980 definitely falls into that category.
This is no ordinary Note 2 kernel. It’s a Linux 3.0.80 kernel based on the sources of the popular Perseus kernel that many Note 2 owners will no doubt be familiar with. The crucial (but by no means only) difference though is that Devil (in conjunction with DerTeufel1980’s custom recovery) will allow you to dual boot your device by splitting the system partition and enabling you to have two different ROMs installed at the same time—even a combination of AOSP- and TouchWiz-based ROMs.
This does take a little bit of setting up and there are some things that you will certainly want to be aware of before diving into this, so as always make sure to read through the details thoroughly before just throwing things at your device to see what sticks. Once set up, this is an incredibly beneficial option for those of you (and indeed myself) who are torn between a stock or AOSP firmware for this device. And yes, for those of you with an N7105 or AT&T/T-Mobile variant, you’re not being left out . There is a version of the kernel and recovery for these devices too.
Check out the original development thread for more information.
May 3, 2013 By: Conan Troutman
Despite being an almost sickeningly desirable, ultra-specced, and feature laden beast of a device—so desirable in fact that this self confessed Samsung fanboy considered making it his next device—the HTC One isn’t without it’s little quirks. These are quirks that may just be enough to sway somebody from choosing it over a competitor. One of these is the somewhat baffling decision by HTC to offer only two capacitive buttons and opt for an on screen software menu button in the absence of the commonly seen, yet commonly missing, Android action bar overflow. This can result in an unfortunate amount of screen space being wasted in certain applications.
That however, is now avoidable thanks to a mod known as HTCLogoMenu, which has been incorporated into a custom kernel for the device by XDA Senior Member tbalden. The mod actually enables the HTC logo between the two capacitive buttons to act as a menu key and offer the user a much more familiar and intuitive hard key setup. The logo can also be assigned to other functions such as waking the device if that is something that you would prefer or even a combination of the two functions, all of which are selectable via the kernels AROMA installer.
This is well worth looking into if you’re finding yourself unable to adapt to the stock configuration of the device. You can find more in the original thread.
We’ve previously covered step-by-step guides on how to compile your own kernel from source. Simply compiling some readily available source code though is only half the battle. For there to be any benefit of compiling and flashing your own kernel, you’re going to need to make some modifications. Which particular changes you make is of course entirely up to you, and there are a huge number of improvements that can be made at kernel level to improve the performance of any given device. If you’re at the stage of having compiled your own kernel but are a little unsure of where to go from there, XDA-University has a guide which will be of interest to you.
The tutorial covers the process of adding CPU governors, I/O schedulers and the ability to overclock the device’s CPU to your kernel. These are among some of the more basic modifications that you can make, but they are also some of the most sought after by users. All the required steps are clearly outlined and backed up with easy to follow code examples that will have you modified and ready to compile in no time. You will of course need to be familiar with Github in order to document your changes and remain GPL compliant. If you need a refresher course, be sure to check out this excellent guide to becoming a Git wizard.
Be sure to head on over to XDA Univesity and check this one out if you want to take your own kernel to the next level, as this provides a great jumping off point for further more advanced developments.
Some devices just refuse to die, no matter how long they’ve been around. That said, a team of devoted developers has come together to bring the Linux kernel 3.0.8 to every 2011 Xperia device. The last official kernel release from Sony (Ericsson) for 2011 Xperia Devices was version 2.6.32.
XDA Recognized Developer nobodyAtall based this kernel on the ‘M7630AABBQMLZA404033I’ CAF tag, which is ‘the latest tagged release for this arch and is linux 3.0.8.’ The supported devices and the developer behind each one are as follows:
The kernel for each of the listed devices is available for download and testing from the kernel thread. The kernels for the Mini, Live with Walkman, Pro and Neo and Neo V are said to be bootable and usable, with near 100% functionality, while the rest are still at various stages of development (at the time of writing). More detailed status for each of these kernels can be found in the discussion thread.
April 11, 2013 By: Will Verduzco
OK. It’s no big secret. The HTC One is a great and exciting device. You’ve heard us talk about it—everything from the launch event and preliminary benchmarks to giving the device and its carrier variants a place on our forums. Now, we have kernel source for some One variants, which is great news for those looking to start development work for HTC’s latest flagship. And since the device was only recently launched, with many carrier variants still pending release, HTC has done a great job of keeping to their GPL requirements.
In addition to the One, HTC also saw fit to
release update kernel source for the Droid DNA to match an OTA that was released back in early February. In other words, the company is now GPL compliant with binaries released two months ago. The DNA, if you may recall, was released quite some time ago. Available since November of last year, it took nearly five months for the device to become GPL compliant. Better late than never, but we can’t help but think how much further along the development community would be for the device, had the GPL obligations been fulfilled earlier. In fact, we’ve even seen better from certain relatively obscure manufacturers.
Let’s just hope that in the future, the One that we’re waiting for isn’t an HTC device’s (up-to-date) kernel source code. Those looking to get in on the goods can find them in the links below.
Update: As pointed out by reader and “HTC Champion” Leigh, my previous statements were somewhat mistaken. Article text has been updated accordingly.
If your Android device has an unlocked bootloader, it’s undeniable the usefulness of having a custom kernel on your device. With no release of Linux Kernel version 3.4 from Samsung as of yet, it’s great to see developers on XDA all contributing to make this possible for a mid-range Samsung device, the Galaxy S Plus GT-i9001.
The mastermind behind this creation is XDA Senior Member educk, who rebased support for the i9001 on the 3.4 kernel baseline, ahead of a release from Samsung. The kernel is still in the alpha stage of development with improvements and features such as:
Standard functions of the i9001 such as the camera, Wi-Fi, 3G and calls are reported to still be working with no bugs and faults as of now.
Accepting contributions from the development community, educk has done and is doing a remarkable job with this project for the Android community. Make sure to head over to the original thread for more details and discussions.
February 12, 2013 By: jerdog
One of the most highly-anticipated devices debuted at CES 2013 is the Sony Xperia Z. With a 5″ 1080p screen with a ~441 ppi, sitting atop a quad-core 1.5GHz Qualcomm S4 Pro with 2 gigs RAM and a 13.1 MP camera, there’s no doubt that anticipation is warranted. With the device recently released in Japan, and a worldwide release date is speculated to be in the next few weeks, what is this? Kernel source already?
This year, Sony Mobile has already demonstrated with their commitment to supporting the open source developer community. The most recent previous example is their kernel source code release for their alpha Jelly Bean build for the Xperia T (massive GPL-compliance anyone?). Now, they’ve released the kernel source code for the Xperia Z, which hasn’t even gone on sale around the world yet. Sure Sony isn’t the first OEM to do this, but they have a track record of releasing complete, compilable, and working kernel source (cough, cough Samsung). They also have shown consistency at releasing source immediately (sneeze, HTC). And to top it off, they just plain release the source (ahem, Rockchip, Huawei, and countless others) like the GPLv2 requires you to.
So if you are in the mood for compiling a kernel for a new, top-of-the-line device even though you don’t have it in front of you, head on over to Sony Developer’s Open Source Downloads site. Obviously, you won’t be able to test out the source, but it can provide a good indication of what they have planned for a device that is slated to be the big one for Sony Mobile in 2013.
January 26, 2013 By: jerdog
Here at XDA, we take the responsibility of carriers and OEMs to provide timely updates to their devices (and to honor their GPL requirements) seriously. There are those who do a good job (Samsung is one of them), those who don’t always do a good job (HTC, Motorola, LG), and those who do a terrible job (Huawei, ZTE, Rockchip to name a few). But there is one who right now is doing a terrific job, and that is Sony Mobile.
Back at the end of 2012, we selected Sony Mobile as our OEM of the Year for many reasons. One of those had to do with their public support of the developer community. Another was the release of beta OS builds for impending updates, shared on XDA by Sony staff in order to seed the ROM development pipeline. In addition, they were very active in supporting AOSP for the Sony Xperia S in the Google AOSP device tree, released the AOSP binaries, and eventually branched out to open their own Github for future AOSP development.
On Friday, Sony continued their string of community contributions by releasing an ALPHA build of Jelly Bean (Android 4.1.2) for the Sony Xperia T. This build is most definitely an alpha, meaning that many of the core components do not work, so it is not meant to be flashed or even mucked around with by the end user. It is meant solely for custom ROM developers to take and use and help make it better in preparation for Sony’s upcoming official build of Jelly Bean for the Xperia T. In order to flash this you will need to use their EMMA tool and your device must have its bootloader unlocked, or else the device will boot to a black screen and you will need to return to stock via Sony’s Update Tool. More information can be found at their Developer World blog. Again, this is not for the end user.
Sony evidently wasn’t content just to be the only OEM to provide OFFICIAL alpha builds for their devices. They ALSO released the kernel source for the alpha build. No other company in our memory has ever done this. Sure, one could argue that it is their obligation to release the kernel source under GPL requirements because they distributed the alpha build. But let’s keep in mind that we’re talking about an ALPHA build—something that is essentially in the infant-stages of its evolution, and not a production build or a finished product.
Let’s also keep in mind that instead of letting it leak like other manufacturers do, and thus not need to adhere to the GPL because they can claim ignorance and that they themselves aren’t the one distributing, they are embracing the fact that the GPL is not harmful. They are stating their case that this is how OEMs should work with the community. They are saying that this sort of thing encourages trust and a sense of togetherness between the community and the OEM, which in turn trickles down to the consumer’s good will towards the OEM. It’s a veritable marketplace “circle of life.” (You’re welcome for having planted the Lion King firmly in your subconscious for the next few hours.)
Other OEMs, like Samsung, frequently release incomplete kernel source that will not build (GPL violation); or fail to release the kernel source for a production build that they later retract even though it was distributed and is live in the wild on consumer’s devices (GPL violation). Or in the case of HTC, just plain ignore the GPL and wait for petitions to be filed or lawyers to be engaged before releasing the kernel source for a software version that is now out of date (GPL violation).
Let this be a lesson to the OEMs out there: When you choose to embrace the very ecosystem that has driven your profits high, and endeavor to work with that ecosystem in a mutual give-and-take, you will see positive results and karma that far exceeds your expectations. Or you can choose to neglect the very base that at one time made you the top smartphone manufacturer in the world and ultimately see your profits and market share slide into the abyss where there is little to no hope of return. Your choice. Choose wisely.
March 20, 2012 By: Ian Stacy
HTC has always had a good relationship with its users, by industry standards. They’ve made several game-changing decisions in the past year, including unlocking device bootloaders and confirming Ice Cream Sandwich support for a wide range of handsets, including some that were lower range than most competitors bothered to support. Now, continuing in an effort to improve that relationship, HTC is challenging the idea that the company is slow to deliver source code for its devs and fans!
HTC ‘s relationship with the community definitely grew tighter this past weekend when the company released the Ice Cream Sandwich Kernel Source for the HTC Sensation, the HTC Sensation XE and the HTC Vivid. Developers can now get their hands on the code necessary to truly compile functioning ROMs that fully utilize the device hardware. This is great news for all HTC fans, as the source for the rest of the ICS line will undoubtedly follow!
The heads-up was first spotted in our forums for the Sensation here thanks to XDA Senior Member erto90 and for the Vivid here thanks to Senior Member come at me bro. Developers, head on over to the HTCDev download page here to nab the new kernel sources. You can also follow HTCDev on Twitter if you’d like to thank them!