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

[DEV] Loadable Modules for Gingersense Incredible [Updated 9/18 - Support for OTA]

OP tiny4579

13th August 2011, 01:51 PM   |  #1  
OP Recognized Developer
Thanks Meter: 4,321
 
8,039 posts
Join Date:Joined: Jan 2011
More
HTC released gingerbread via OTA but they did not support additional modules. This thread has flashable zips for both the leaked kernel and the one from the "OTA".

Added flashable modules to attachments that are flashable in recovery.

I have created a zip of some of the more useful modules for our device:
Code:
cpufreq_conservative.ko
cpufreq_smartass.ko (thanks Chad for the help here)
ext4.ko
jbd2.ko (necessary for me to load ext4)
tun.ko
perflock_disable.ko (I actually compiled this one a little different but confirmed it would load and not get the exec format error)
Update: Smartass is working now with assistance from chad in resolving those errors. Decided to not worry about interactive for now.

Further information:

If you don't use the CWM flashable zip you will need to load perflock_disable a special way as it needs to be called with a special parameter to make it work correctly. Try adding below to a script. Credit to Calkulin for the script.


Code:
if [ -e /system/lib/modules/perflock_disable.ko ]; then
    insmod /system/lib/modules/perflock_disable.ko
    if [ $? -eq 0 ]; then
	echo "Perflock DISABLED"
    else
	addr=`awk '$3 == "perflock_notifier_call" { print "0x"$1; }' /proc/kallsyms`
	if [ -n "$addr" ]; then
	    insmod /system/lib/modules/perflock_disable.ko "perflock_notifier_call_addr=$addr"
	    if [ $? -eq 0 ]; then
	    	echo "Perflock DISABLED"
    	    else
	    	echo "ERROR!!! Perflock could NOT be DISABLED"
	    fi
	fi
    fi
fi
Credits:
Conap (for BootManager and helping me test ext4 on an SD ROM)
XDA (for teaching me so much about Android)
HTC (for the kernel source)
Chad0989 (for assistance in getting smartass CPU governor working)
Coolbho3000 (perflock_disable)
Calkulin for the module load script
anyone else who inspired me (apologize if I forgot)

I have attached a zip file to this. If you are not a dev you can still use the modules here but some basic ADB/terminal knowledge would be needed. The modules are open for testing though.

Attached zip files and CWM-flashable zip files for both OTA and leak-based ROMs.

inc_modules.zip - Just the loadable modules.
inc_modules_ota.zip - just the loadable modules - OTA-based ROMS (August leak)
inc_modules_ota_091811.zip - just the loadable modules - OTA-based ROMS (actual OTA from September)
inc_modules_CWM_flashable.zip - flashable zip that will also autoload modules at boot.
inc_modules_ota_CWM_flashable.zip - flashable zip that will also autoload modules at boot - OTA-based ROMS (August leak)
inc_modules_ota_091811_CWM_flashable.zip - flashable zip that will also autoload modules at boot - OTA-based ROMS (Actual OTA from September)
Last edited by tiny4579; 19th September 2011 at 11:22 PM.
The Following 12 Users Say Thank You to tiny4579 For This Useful Post: [ View ]
13th August 2011, 02:05 PM   |  #2  
kzoodroid's Avatar
Senior Member
Flag Kalamazoo
Thanks Meter: 266
 
1,350 posts
Join Date:Joined: Jun 2010
More
I'm glad some one took this up I had been wondering the same thing since HTC opened the dev section. I had found another site that had a more extensive write up on how to build kernels but I'm not very fluent in linux and was a little intimidated at trying. At least I now know that it can be done. Maybe we can get Chad to try and port it over?
Last edited by kzoodroid; 13th August 2011 at 02:06 PM. Reason: added info
13th August 2011, 03:00 PM   |  #3  
baboonsRus's Avatar
Senior Member
Phoenix
Thanks Meter: 36
 
366 posts
Join Date:Joined: Oct 2010
Awesome. A ray of hope.
13th August 2011, 03:20 PM   |  #4  
jermaine151's Avatar
Senior Member
Flag Columbus, Ohio
Thanks Meter: 3,312
 
3,997 posts
Join Date:Joined: Jun 2010
Donate to Me
More
Good job Tiny! I know someone was just asking for a tun.ko module and now I can't remember who it was. Hopefully they see your post.
The Following User Says Thank You to jermaine151 For This Useful Post: [ View ]
13th August 2011, 03:39 PM   |  #5  
OP Recognized Developer
Thanks Meter: 4,321
 
8,039 posts
Join Date:Joined: Jan 2011
More
Quote:
Originally Posted by jermaine151

Good job Tiny! I know someone was just asking for a tun.ko module and now I can't remember who it was. Hopefully they see your post.

Thanks!

I'm trying to add more existing modules but my compiler treats warnings as errors so it won't build. Chad, if you see this post, any advice here?
13th August 2011, 03:54 PM   |  #6  
hightech316's Avatar
Senior Member
Thanks Meter: 56
 
654 posts
Join Date:Joined: Jan 2011
Quote:
Originally Posted by tiny4579

Thanks!

I'm trying to add more existing modules but my compiler treats warnings as errors so it won't build. Chad, if you see this post, any advice here?

--prefix

Sent from my ADR6300 using XDA App
13th August 2011, 04:07 PM   |  #7  
OP Recognized Developer
Thanks Meter: 4,321
 
8,039 posts
Join Date:Joined: Jan 2011
More
Quote:
Originally Posted by hightech316

--prefix

Sent from my ADR6300 using XDA App

I actually got them to build but they won't load still. I will play around with it more.
13th August 2011, 06:25 PM   |  #8  
Senior Member
Flag Cleveland, OH
Thanks Meter: 138
 
580 posts
Join Date:Joined: Jun 2010
More
This is awesome. I was hoping for a tun.ko module! Now, do I just grab these and drop then in system/lib/modules and they should just work? Or are there steps I need to take to make them work? (I am honestly only concerned with the tun.ko)
The Following User Says Thank You to jskolm For This Useful Post: [ View ]
13th August 2011, 06:28 PM   |  #9  
renzo.olivares's Avatar
Recognized Developer
Thanks Meter: 16,219
 
9,095 posts
Join Date:Joined: Jan 2011
Donate to Me
More
oh wow this is incredible great job tiny!!! and the reason you probably cant get those other governors to work is because htc released an uncomplete source
13th August 2011, 07:15 PM   |  #10  
OP Recognized Developer
Thanks Meter: 4,321
 
8,039 posts
Join Date:Joined: Jan 2011
More
Quote:
Originally Posted by jskolm

This is awesome. I was hoping for a tun.ko module! Now, do I just grab these and drop then in system/lib/modules and they should just work? Or are there steps I need to take to make them work? (I am honestly only concerned with the tun.ko)

Just drop in the ones you want and run insmod /system/lib/modules/tun.ko for tun.ko. You will have to do it at boot each time or get the dev to write an init.d script to load it.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes