• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [KERNEL] MiRaGe - SPH-M950/icon optimized for stock JB MD6/MI2 - 10222013

mrg666

Android Enthusiast
Nov 26, 2011
363
313
This is a kernel I developed for Samsung Galaxy Reverb stock JB ROM based on the MD6/MI2 version of the Samsung source code. The main purpose of development is to make kernel leaner and more efficient since the latest JB update was running terribly on my phone. I have done a big deal of clean up since the original source was incredibly bloated with all kinds of unnecessary drivers for many devices that one would never need on a cell phone. Below is a short changelog and you can find the details of all changes including the full source code at my github repo

- Deleted many unneeded drivers
- Deleted ondemand, userspace, conservative governors, added the latest interactive governor from AOSP 3.4 kernel as the default governor.
- Deleted CFQ scheduler, added the latest ROW scheduler from CAF 3.4 kernel as default.
- eliminated most of the debug code (e.g. WiFi module size decreased to 0.5MB from 5MB!)
- disabled DEBUG_FS to increase RAM available to system and enhance security
- enabled autogroup scheduler with a patch to use per-uid task groups
- eliminated unncessary file systems, NFS, YAFFS, EXT2, EXT3
- merged all changes up to Linux 3.0.101
- deleted network schedulers to use simple FIFO scheduler
- backported the latest lowmemorykiller
- backported the latest android logger and reduced the logcat size to save RAM
- added a patch to reduce entropy depletion
- backported rwsem lib from Linux 3.10
- backported workqueue from Linux 3.6
- patched the msm cpufreq driver to boost the CPU freq after resume event to increase responsiveness.
- backported the latest Qualcomm Crypto Engine and enabled in the kernel
- cpu overclock up to 1.8 GHz (1.8 GHz might not be stable on every phone, don't use min frequency lower than 245 MHz)
- remapped kernel memory allocation to add ~38MB RAM to user space (thanks to SultanXDA)
- built with Linaro gcc 4.7

I have tested on my Galaxy Reverb with stock JB ROM and there is a significant improvement of performance. Jellybean is as smooth as it can get with MiRaGe kernel due to reduced RAM occupied by kernel, reduced overhead, and better efficiency.

Here is the download link for the latest MiRaGe kernel (10/22/2013). The kernel zip file will be flashed in the CWM recovery. You will of course need a rooted stock JB ROM and information about root is available at the previous CWM link. There is no need to wipe anything and no data, setting, etc will be lost. The package only replaces the kernel and the kernel modules. Just flash in the recovery and reboot. However, it is always recommended to do a nandroid backup before flashing anything major in the recovery.

Please let me know if you find any problems but don't post any feature requests, especially for additional governors, schedulers, fast charge, sweep2wake, etc. I am only interested in the performance and reliability reports.

The followings are for restoring the stock boot images
MD6 stock boot image
MI2 stock boot image
Enjoy!
 
Welcome to the Reverb forum... and thanks for the instant contribution! I downloaded and flashed the kernel about 11 this a.m., so far all is well; but admittedly I'd have more to report if I had an idea how to "field test" a kernel... Lol! Seriously, though, it IS snappier.

What exactly DO you run to test one? (sorry, noob question)...
 
  • Like
Reactions: mrg666
Upvote 0
Welcome to the Reverb forum... and thanks for the instant contribution! I downloaded and flashed the kernel about 11 this a.m., so far all is well; but admittedly I'd have more to report if I had an idea how to "field test" a kernel... Lol! Seriously, though, it IS snappier.

What exactly DO you run to test one? (sorry, noob question)...

What matters is how you *feel* while using your phone. Benchmark scores don't mean anything than just numbers. Do what you usually do with your phone and see how is it different. Our Galaxy Reverb was not smooth at all with the stock kernel. That was the reason I have started this development because the kernel seemed to be a very inefficient one to me. My kernel made a significant improvement in the user interface of this Galaxy. It is like a whole new phone to me now.

I need to say this: shame on you Samsung! Shame on you for putting this garbage of a kernel in this phone. I have been cleaning up the code and configuration since almost a week. I have worked on the kernel codes from HTC, LG, Barnes and Noble too. This is by far the worst. Just look at this commit to see how much garbage they left in a single file. I have been cleaning the kernel configuration and have seen dozens of unnecessary drivers straying around. The WiFi module's file size was an unbelievable 5MB, larger than the kernel itself. I was able to reduce it to just 450KB only by eliminating the debug code. I have no idea what kind of a software engineer would accept that module size on a mobile device. This is a phone that has barely enough resources to run JB and one would expect the vendor to pay a little more attention for optimization.

End of rant.
 
Upvote 0
I have updated the kernel again. Many more updates and optimizations were merged in. I have also noticed that there was a significant delay for the cpu governor to kick in to ramp up the cpu frequency after resume due to a race condition. I have modified the cpufreq driver so that the cpu starts at max freq after resume. With this change kernel is much more responsive after the wakeup event, cpu governor scales back cpu freq whenever cpu load gets lower.

Please see my repo for the details and the full list of changes.
 
Upvote 0
Do you know if the MB2 update kernel is the same in terms of trash? Jellybean didn't work well for me (frequent crashes and reboots) so I'm curious about the ICS kernel since I reverted.

I haven't looked at the ICS kernel. But I wouldn't be surprised to see the same junk. ICS is probably working better with the similarly bad OEM kernel since ICS doesn't need as much memory.
 
  • Like
Reactions: siyangqiu
Upvote 0
OK, thanks. And thanks again for putting these improvements together for the community!

I had to share it. Because I love open source and Android. It is so great to have access to the resources required for improving our devices and even greater to have the ability to share our development. These two reverberate constantly and benefit the Android community. What we are experiencing here is a revolution that is changing our digital world forever. Having created such a popular OS, I don't see a danger of Google monopoly either. It is open source! Whenever the process is abused by a company, nobody is forced to stay there. Community and other companies can easily fork it and move on with all the compatibility and apps already in existence.

Actually, the Reverb belongs to my wife. She was not happy with the JB upgrade at all due to unresponsive UI, delayed app starts, ... etc. I looked into buying a new phone for her. I have played with my son's GS3 some; it is a really nice phone. To me, only GS3 is a worthy upgrade after Reverb (larger screen, higher resolution, 2GB RAM, dual core, 4G). But it is too expensive yet. With the MiRaGe kernel, JB runs as smooth as it gets on the Reverb and her phone is effectively upgraded until GS3 gets cheaper. I use an EVOV running another MiRaGe kernel and it will hold up for me until the same time.
 
Upvote 0
Wow, thanks so much for your work on this.

I've also been disappointed with the performance of my Reverb after the Jelly Bean update, but I've been reluctant to go back to ICS because I like new features like Google Now. So your approach to this kernel is exactly what I've been looking for: stock JB with better performance.

I flashed your kernel today and have had no issues so far. In fact, as you promised, I've seen a very noticeable improvement in app launch speed, app responsiveness and task switching. Also, the phone doesn't seem to get as warm as it used to with certain apps (e.g., Feedly). These alone are huge improvements.

I'm curious whether I can expect better battery performance, as this has been one of my biggest complaints with JB. I'll monitor this over the next few days.

Really appreciate your effort!
 
  • Like
Reactions: mrg666
Upvote 0
Wow, thanks so much for your work on this.

I've also been disappointed with the performance of my Reverb after the Jelly Bean update, but I've been reluctant to go back to ICS because I like new features like Google Now. So your approach to this kernel is exactly what I've been looking for: stock JB with better performance.

I flashed your kernel today and have had no issues so far. In fact, as you promised, I've seen a very noticeable improvement in app launch speed, app responsiveness and task switching. Also, the phone doesn't seem to get as warm as it used to with certain apps (e.g., Feedly). These alone are huge improvements.

I'm curious whether I can expect better battery performance, as this has been one of my biggest complaints with JB. I'll monitor this over the next few days.

Really appreciate your effort!

You can expect better battery performance with lighter daily use since the system is more efficient and lighter now. So battery will not be wasted while the kernel keeps struggling to respond to the OS. When you constantly play games and keep the CPU fully loaded for long times, the battery life can't be much better. However, games will probably run smoother ;)

You are welcome, glad to be useful.

Edit: here is a screenshot of battery with very light use
6uge.png
 
Upvote 0
Thank you thank you thank you....
Before, it would take a few seconds to get any response from the capacitive buttons... Now... Seamless...
I recently gave up on using Google now on my reverb (just ask everything on my tablet instead) because it would take so much time for it to open... Now... Seamless...
Before, chrome was not an option for me as it was way too slow... Now, I just tap and it starts seamlessly...

Request to rename kernel to seamless kernel :)

Thanks op!!!
 
  • Like
Reactions: mrg666
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones