Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[KERNEL][ROOT]The Ultimate Kernel for the HTC Desire 500

OP dummie999

Announcement from dummie999: Version 8 is out
15th May 2014, 08:01 PM   |  #1  
OP Senior Member
Thanks Meter: 365
 
688 posts
Join Date:Joined: Mar 2014
More
The Ultimate kernel for the HTC Desire 500, both one sim and dual sim!
Software version 1.32/1.26 only! It probably won't work on earlier versions, but it might work on later versions (1.34), I haven't tested that.

Use at your own risk!

Features:
Quote:

  • /system write protection removed
  • two new frequencies added: 1300 and 1400 mhz
  • init.d support
  • intelli_plug
  • sweep2sleep
  • sweep2wake and doubletap2wake, both with pocket detection
  • ntfs read/write support
  • Governors added: SmartassV2 and Lulzactive
  • ioschedulers added: sio and fiops Default: sio
  • Fastcharge
  • Unsecure (ro.secure=0)

If you don't want to overclock your device, then simply choose the download link with no overclocking.

Requirements:
Quote:

  • Unlocked bootloader
  • Custom recovery (cwm or twrp)
  • Fastboot installed


Installation instructions:
Quote:

  • Download the latest boot.img
  • Boot your phone into fastboot mode
  • Open up your commandline
  • cd to the directory containing the boot.img
  • In the command line type: fastboot flash boot boot5.img
  • Boot into cwm/twrp
  • Wipe cache and dalvik-cache
  • If you don't have it yet (your phone is not rooted), flash SuperSU or superuser


Downloads:
Quote:

Version 8: Not overclocked: boot8_no_oc.img, Overclocked: boot8_oc.img
Version 7: Not overclocked: boot7_no_oc.img, Overclocked: boot7_oc.img
Version 6: boot6.img
Version 5: boot5.img
Version 4: boot4.img
SuperSU: SuperSU

If your phone does not boot after installing an overclocked kernel, then try installing the not overclocked kernel.

Changelog:
Quote:

Version 8:

  • Removed the underclocking, it was way too low, and caused wakeup issues
  • Added 1300 mhz frequency
  • Updated intelli plug from faux123's github
  • Updated to 1.34, many thanks to @0lvin
  • Little fixups on sweep2wake/doubletap2wake

Version 7:
  • Added overclocking up to 1400 mhz
  • Underclocking down to 19 mhz
  • Added sweep2wake and doubletap2wake
  • Added intelli plug, a replacement for Qualcomm's closed source mpdecision
  • Enabled perflock again
Version 6:
  • Add fastcharge
Version 5:
  • Disabled -O3 optimization
Version 4:
  • -O3 optimization
  • ntfs read/write support
  • Governors added: SmartassV2 and Lulzactive
  • ioschedulers added: sio and fiops Default: sio

Version 3 and below:


Kernel source:

Credits:
@flar2 for sweep2sleep
@xpirt for helping me with Smartass
@GreatEmerald for helping me with kernels in general
@eexter for testing for 1.26
@0lvin for updating to 1.34

To the devs:
Feel free to include this kernel in your rom/rooting tool. Just give proper credits and put a link to this thread in your rom thread (Required for GPL).

XDA:DevDB Information
The Ultimate Kernel, Kernel for the HTC Desire 500

Contributors
dummie999, 0lvin
Kernel Special Features: dt2w | s2w | intelli_plug | fastcharge | oc | init.d

Version Information
Status: Stable

Created 2014-10-14
Last Updated 2014-10-14
Last edited by dummie999; 14th October 2014 at 07:34 PM.
The Following 24 Users Say Thank You to dummie999 For This Useful Post: [ View ]
15th May 2014, 08:01 PM   |  #2  
OP Senior Member
Thanks Meter: 365
 
688 posts
Join Date:Joined: Mar 2014
More
Reserved
15th May 2014, 08:01 PM   |  #3  
OP Senior Member
Thanks Meter: 365
 
688 posts
Join Date:Joined: Mar 2014
More
Reserved
15th May 2014, 08:02 PM   |  #4  
OP Senior Member
Thanks Meter: 365
 
688 posts
Join Date:Joined: Mar 2014
More
Upcoming features
* Intellidemand (implemented - needs tweaking)
* F2FS
Last edited by dummie999; 13th October 2014 at 06:19 PM.
The Following 2 Users Say Thank You to dummie999 For This Useful Post: [ View ]
15th May 2014, 08:02 PM   |  #5  
OP Senior Member
Thanks Meter: 365
 
688 posts
Join Date:Joined: Mar 2014
More
Tips
How to change sleep/wake options:
Quote:

The options for sweep2sleep, sweep2wake and doubletap2wake:
sweep2sleep: 0 - disabled, 1 - enabled, both directions, 2 - enabled, left->right only, 3 - enabled, right->left only
sweep2wake: 0 - disabled, 1 - enabled, both directions, 2 - enabled, left->right only, 3 - enabled, right->left only
doubletap2wake: 0 - disabled, 1 - enabled, full screen, 2 - enabled, bottom half screen, 3 - enabled, center down of the screen (hope you get it)
To change the options, put a script in /system/etc/init.d:

Code:
#!/bin/sh
echo "0" > /sys/android_touch/sweep2sleep
echo "0" > /sys/android_touch/sweep2wake
echo "0" > /sys/android_touch/doubletap2wake
This setting disables all the sweep/wake options
Code:
#!/bin/sh
echo "1" > /sys/android_touch/sweep2sleep
echo "1" > /sys/android_touch/sweep2wake
echo "2" > /sys/android_touch/doubletap2wake
This setting enables sweep2sleep and sweep2wake, and enables doubletap2wake bottom half of the screen

How to use fastcharge:
Quote:

If you charge your phone via usb (from your computer) then it will only charge at 500mA even while most usb ports are capable of supplying 1000mA. Enabling fastcharge will allow your phone to charge at 1000mA via usb.
!!! Warning: you must be sure your usb can supply 1000mA !!!

Fastcharge is disabled by default. You can enable it in 2 different ways:
1. Writing a 1 to /sys/kernel/fast_charge/force_fast_charge. You can do this with a text editor, or with a script in init.d (see above)
2. Or you can simply install an app. I tested Fast Charge by Mathew Winters and Fast Charge by Chris Conley, both worked.

To hard? Use this app by Ufonek: Kernel Settings


A word about governors:
Some governors lower the frequencies to fast. For example, when I play angry birds when using lulzactive, the phone laggs a lot. This is, however, not the fault of the kernel, but the fault of the way the governor is tweaked. It is the price you pay for the better battery life you have. If you want to do something about it, tweak your governor, there are a lot of tutorials about this.
Don't come here complaining the phone laggs, and that I should fix it, I won't, because I can't. Everyone has his own preferences, and if you can't live with this, then I recommend you use the ondemand governor.
Last edited by dummie999; 9th October 2014 at 06:56 PM.
The Following User Says Thank You to dummie999 For This Useful Post: [ View ]
15th May 2014, 08:26 PM   |  #6  
OP Senior Member
Thanks Meter: 365
 
688 posts
Join Date:Joined: Mar 2014
More
Compilation instructions
Instructions for compiling the kernel yourself.

Prerequisites:
1. A linux computer
2. Basic bash knowledge
3. ~120 MB free space
4. The android-eabi toolchain:
git clone https://android.googlesource.com/pla...m/arm-eabi-4.6 for 4.6
(use darwin-x86 instead of linux-x86 for mac)
And then add it to your $PATH (You need to have the arm-eabi-4.6/bin folder in your path)

Instructions:
1. Download the kernel source
2. Open the cmdline and cd to the directory with all the files (Documentation, arch, block etc.)
3. type: make dummie_z4u_defconfig
4. type: make menuconfig
........A menu will open, and you can change some settings. If you want everything to be the way I built it, then skip this step.
5. type: make
The actual building will begin.

Troubleshoot:
If you run into a python problem, you might want to change, in android_kernel_htc_z4u/scripts/gcc-wrapper.py this:
"#! /usr/bin/env python" into "#! /usr/bin/env python2", credits @svalo

If the building succeeds, then you will find the file zImage in arch/arm/boot.

Next step: turn the zImage into a boot.img
1. Download imgtools, and add it to you $PATH
2. Download my boot.img
3. Open cmdline, cd to the directory containing boot.img and type: unpack boot.img
........You will end up with: ramdisk.cpio.gz, ramdisk and zImage (and the boot.img that was already there)
4. Replace the zImage with the zImage you build earlier (arch/arm/boot)
5. Rebuild the kernel:
Code:
repack_ramdisk ramdisk initramfs.cpio.gz
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x3b00000 --cmdline 'no_console_suspend=1 console=null' -o new_boot.img
You will now see a file called new_boot.img, containing your own kernel, which you can install the very same way

Good luck
Last edited by dummie999; 13th July 2014 at 05:04 PM.
The Following 2 Users Say Thank You to dummie999 For This Useful Post: [ View ]
15th May 2014, 08:27 PM   |  #7  
GreatEmerald's Avatar
Member
Flag Vilnius
Thanks Meter: 11
 
53 posts
Join Date:Joined: Jan 2014
More
Note that -O3 does not work for the kernel, at all, and never has. You can set it but it won't do anything. The compiler will still use -O2, because all the parts where performance matters are written in assembly or through GCC-specific extensions already. There is nothing that automatic code optimisation would improve. Meanwhile -O3 enables non-safe options that can result in imprecise calculations, which can lead to disasters in things that are as important as the kernel. So you should disable that.
The Following User Says Thank You to GreatEmerald For This Useful Post: [ View ]
15th May 2014, 08:32 PM   |  #8  
OP Senior Member
Thanks Meter: 365
 
688 posts
Join Date:Joined: Mar 2014
More
Quote:
Originally Posted by GreatEmerald

Note that -O3 does not work for the kernel, at all, and never has. You can set it but it won't do anything. The compiler will still use -O2, because all the parts where performance matters are written in assembly or through GCC-specific extensions already. There is nothing that automatic code optimisation would improve. Meanwhile -O3 enables non-safe options that can result in imprecise calculations, which can lead to disasters in things that are as important as the kernel. So you should disable that.

Then why do people use it?
15th May 2014, 08:50 PM   |  #9  
GreatEmerald's Avatar
Member
Flag Vilnius
Thanks Meter: 11
 
53 posts
Join Date:Joined: Jan 2014
More
Quote:
Originally Posted by dummie999

Then why do people use it?

Placebo. It makes them think they're gaining something, even though in truth they aren't (but are not certain).
15th May 2014, 08:59 PM   |  #10  
joe-khalil's Avatar
Senior Member
Flag beirut
Thanks Meter: 6
 
126 posts
Join Date:Joined: Jun 2012
More
so i need to flash the boot image than flash the kangbang kernel????

Post Reply Subscribe to Thread

Tags
desire 500, kernel
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes