Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,813,216 Members 53,485 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
tiny4579
Old
(Last edited by tiny4579; 19th September 2011 at 10:22 PM.)
#1  
Recognized Developer - OP
Thanks Meter 4,181
Posts: 7,792
Join Date: Jan 2011
Default [DEV] Loadable Modules for Gingersense Incredible [Updated 9/18 - Support for OTA]

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)
The Following 12 Users Say Thank You to tiny4579 For This Useful Post: [ Click to Expand ]
 
kzoodroid
Old
(Last edited by kzoodroid; 13th August 2011 at 01:06 PM.) Reason: added info
#2  
kzoodroid's Avatar
Senior Member
Thanks Meter 263
Posts: 1,340
Join Date: Jun 2010
Location: Kalamazoo
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?
Moto X GSM Dev. Ed.- 4.4.3, Stock w/ Xposed GEL; Nexus 4 - Stock 4.4.4, Rooted; Galaxy Tab 7 Plus - Stock 4.2
 
baboonsRus
Old
#3  
baboonsRus's Avatar
Senior Member
Thanks Meter 36
Posts: 366
Join Date: Oct 2010
Location: Phoenix
Awesome. A ray of hope.
 
jermaine151
Old
#4  
jermaine151's Avatar
Senior Member
Thanks Meter 3,296
Posts: 3,977
Join Date: Jun 2010
Location: Columbus, Ohio

 
DONATE TO ME
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.
You can find me @jdlogan151
The Following User Says Thank You to jermaine151 For This Useful Post: [ Click to Expand ]
 
tiny4579
Old
#5  
Recognized Developer - OP
Thanks Meter 4,181
Posts: 7,792
Join Date: Jan 2011
Quote:
Originally Posted by jermaine151 View Post
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?
 
hightech316
Old
#6  
hightech316's Avatar
Senior Member
Thanks Meter 55
Posts: 645
Join Date: Jan 2011
Quote:
Originally Posted by tiny4579 View 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?
--prefix

Sent from my ADR6300 using XDA App
" Talk is cheap. Show me the code. ", Linus Torvalds .
 
tiny4579
Old
#7  
Recognized Developer - OP
Thanks Meter 4,181
Posts: 7,792
Join Date: Jan 2011
Quote:
Originally Posted by hightech316 View Post
--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.
 
jskolm
Old
#8  
Senior Member
Thanks Meter 136
Posts: 576
Join Date: Jun 2010
Location: Cleveland, OH
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: [ Click to Expand ]
 
renzo.olivares
Old
#9  
renzo.olivares's Avatar
Recognized Developer
Thanks Meter 16,218
Posts: 9,095
Join Date: Jan 2011

 
DONATE TO ME
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
 
tiny4579
Old
#10  
Recognized Developer - OP
Thanks Meter 4,181
Posts: 7,792
Join Date: Jan 2011
Quote:
Originally Posted by jskolm View Post
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.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes