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

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)

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?

Awesome. A ray of hope.

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.

jermaine151 said:
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.
Click to expand...
Click to collapse
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?

tiny4579 said:
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?
Click to expand...
Click to collapse
--prefix
Sent from my ADR6300 using XDA App

hightech316 said:
--prefix
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
I actually got them to build but they won't load still. I will play around with it 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)

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

jskolm said:
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)
Click to expand...
Click to collapse
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.

tiny4579 said:
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.
Click to expand...
Click to collapse
would i need to make one for every module?

JoelZ9614 said:
would i need to make one for every module?
Click to expand...
Click to collapse
Joel,
No, just one script should work. I believe Synergy ROM already has the init.d script for some of them. See 00cpufreq_modules in /system/etc/init.d
All,
Updated OP with latest zip file. If you have downloaded previously, redownload to get the latest.

would it be likes this?
http://www.multiupload.com/J9WTSA4VWF

JoelZ9614 said:
would it be likes this?
http://www.multiupload.com/J9WTSA4VWF
Click to expand...
Click to collapse
The first line should be:
Code:
#!/system/bin/sh
and it needs to have execute permissions or it won't execute. Also make sure to save it in UNIX format. I would also add the smartass module as it is quite popular. To test type lsmod from adb or terminal after boot. Hope this helps.

tiny4579 said:
The first line should be:
Code:
#!/system/bin/sh
and it needs to have execute permissions or it won't execute. Also make sure to save it in UNIX format. I would also add the smartass module as it is quite popular. To test type lsmod from adb or terminal after boot. Hope this helps.
Click to expand...
Click to collapse
eeh im not good with init.d scripts lol

ok i think i got it would it be like this?
Code:
#!/system/bin/sh
/system/bin/insmod /system/lib/modules/tun.ko

Every shell script should contain
#!/system/bin/sh
Sent from my ADR6300 using XDA App

JoelZ9614 said:
ok i think i got it would it be like this?
Code:
#!/system/bin/sh
/system/bin/insmod /system/lib/modules/tun.ko
Click to expand...
Click to collapse
Exactly!
Then just make a line for each module.
EDIT: Though you could just write it like this:
Code:
#!/system/bin/sh
insmod /system/lib/modules/tun.ko
Though to be safe and to make sure you are running that particular insmod command you can leave it the way you have it.

ok done its in my rom RLS3 Thanks Tiny Great work

JoelZ9614 said:
ok done its in my rom RLS3 Thanks Tiny Great work
Click to expand...
Click to collapse
No prob! It's been a good project for me.

Related

Compatible cifs.ko

Can some one compile or point me to a cifs.ko that is compatible with the incredible. The ones I can find do not seem to be. Thanks in advance.
Interesting
http://linux.die.net/man/8/mount.cifs Not that I can help but if anyone wanted a quick reference.
Alot of the roms for other phones have it but its not compatible with out kernel. Is there a guide how to compile kernels? I made a couple in linux that worked. long ago..
here ya go...what app are you using to browse CIFS shares? I haven't tested this module, but just compiled it now.
Forgive me as I haven't actually tried this, but here is the 10,000 foot view:
At a minimum, you will need a linux system, with a gcc-arm cross compiler set up. I believe the android-sdk provides one. The version used by current kernels is gcc-4.4.4.
Then you will need the sources of the kernel you are running. The hydra kernel git tree is here: http://github.com/ejhart/Hydra-kernels.git , and the stock kernel sources are here: http://member.america.htc.com/download/RomCode/Source_and_Binaries/incrediblec_cc1c2268.tar.bz2
The hydra git tree doesn't seem to have a a working .config included, but this isn't so important if you are only building and installing kernel modules. From there, you'll need to configure the kernel in cross compiler mode, add the modules you want, and you will need to make sure the version magic string is identical to the kernel you are using. From there run make, and once the compile is finished, find the .ko 's you want, and push them to the /system/modules folder where you can insmod them.
Edit: You can use the .config from /proc/config.gz, didn't see it in there before.
mattwood2000 said:
here ya go...what app are you using to browse CIFS shares? I haven't tested this module, but just compiled it now.
Click to expand...
Click to collapse
I got one from another user but thanks do you still want me to try it? I mounted my share in a directory on the SDCARD so i can browse it with any file manager. I think any app that scans the sd card will also scan my server with about 8TB so that is a minor issue.
kernel compile guide
A guide for compiling kernels can be found here :
http://code.google.com/p/android-serialport-api/wiki/Htc
I not a techie and a newbie at any android development.
Since the guide is more or less a a set of instructions with no theory.
Got it to run, but not sure what I was doing.
Any assistance in provide either cifs.ko for the HTC Aria w/ kernel version :
liberty-2.6.29-21f066a6 or instructions on how to compile the module would be greatly
appreciated.
BTW - there an app on the store for automating the CIFS mount (CIFSManager
Regards,
-d
veli69 said:
I got one from another user but thanks do you still want me to try it? I mounted my share in a directory on the SDCARD so i can browse it with any file manager. I think any app that scans the sd card will also scan my server with about 8TB so that is a minor issue.
Click to expand...
Click to collapse
Could you please post the cifs.ko file that you have that works. Thanks.
OOMatter said:
Could you please post the cifs.ko file that you have that works.
Click to expand...
Click to collapse
Note that the post you quote was from before the 2.2 OTA, and hence that cifs.ko would be incompatible with the current kernel.
elborak said:
Note that the post you quote was from before the 2.2 OTA, and hence that cifs.ko would be incompatible with the current kernel.
Click to expand...
Click to collapse
Thanks for pointing that out. So does anyone have a compatible cifs.ko for the current DINC kernel?
OOMatter said:
Thanks for pointing that out. So does anyone have a compatible cifs.ko for the current DINC kernel?
Click to expand...
Click to collapse
I do. Check my blog. http://adrynalyne.us
Sent from my ADR6300 using XDA App
veli69 said:
Alot of the roms for other phones have it but its not compatible with out kernel. Is there a guide how to compile kernels? I made a couple in linux that worked. long ago..
Click to expand...
Click to collapse
http://marakana.com/forums/android/examples/111.html
GOOOOOOOOOOOOOOOOOOOOOOOOOOOGLE!!!!!!!!! YEAH!
Thats all fine and dandy except our source isn't on any git.
developer.htc.com
philips w732 vermagic '3.0.13 preempt mod_unload armv7' working cifs.ko and md4.ko modules
narod.ru/disk/63766749001.47b679339538b050028c3c7d87506dd2/md4.ko.html
narod.ru/disk/63743140001.693272f3661d5aac547ecc760f04db05/cifs.ko.html

DroidX source posted! tun.ko should be possible now

Sources are here:
opensource.motorola.com/sf/frs/do/viewRelease/projects.droidx/frs.droidx_source.shado_x3_1_13_5_10
Hopefully I'll get some time to work on tun.ko for openvpn or vpnc.
But if someone beats me to it, please post it here.
Jeb
Downloading the source and pre-req's now. Will work on the tun.ko when I get back from dinner if no one else has it done.
Droid X source code! What!? Does this mean a bright future could be ahead for us?
XDA App = Pwnage
jebc4 said:
Sources are here:
opensource.motorola.com/sf/frs/do/viewRelease/projects.droidx/frs.droidx_source.shado_x3_1_13_5_10
Hopefully I'll get some time to work on tun.ko for openvpn or vpnc.
But if someone beats me to it, please post it here.
Jeb
Click to expand...
Click to collapse
What exactly is this?
drew630 said:
Downloading the source and pre-req's now. Will work on the tun.ko when I get back from dinner if no one else has it done.
Click to expand...
Click to collapse
Good luck to you and all for any work on this sweet phone. You rock!
Sent from my DROIDX using XDA App
Hi Drew,
Did you have any luck with tun.ko?
Thanks & all the best!
You can click in the bottom right of that that link and download all the files in one zip. SHADO_X3_1.13.5.10.zip is around 275MB.
I have unzipped that, then untarred all the individual archives.
According to the README, you need some files from source.android.com, but their link doesn't work, so that will take some more digging. (maybe I missed something...)
It appears to be the complete build process. I was just hoping to jump in and get a tun.ko modules compiled, but I still can't find the kernel config (I was just quickly looking around).
Anyway, bottom line is that I will have to get up to speed on the android build process, not just the cross compiled kernel process. This will take me some more time.
If anyone gets one before me, please post.
Thanks, Jeb
Anyone had any luck yet?
Sent from my DROIDX using XDA App
hmmm... I think that you should be able to compile the kernel with the default config options, but just enable the tun/tap module... I don't think that the module would really depend too heavily on any of the other config options?
I have compiled the module multiple times with multiple config files but none work. I get a exec failed error which is presumably because i compiled for the wrong architecture.
I have tried all the omap3 configs i found and the defconfig with no luck. I am away today but will look at it again tomorrow.
Sent from my DROIDX using XDA App
I'm no droid expert but it looks like according to the droid readme file you want ARM arch, but the compiler that youo should be using is arm-eabi-gcc (comes from the prebuilt tools from android) - in the Makefile set CROSS_COMPILE to /path/to/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- (or whatever the path to the file is on your build environment)
All the best,
Okay, after a bunch of hours I finally got it compiled
The 'exec format error' that you were probably seeing is not because it was compiled for the wrong architecture. I originally compiled the kernel modules with the default .config file that 'make menuconfig' generated.
When I tried to load it, I got the 'exec format error'. 'dmesg' showed:
<3>[46706.378570] tun: version magic '2.6.29 mod_unload modversions ARMv5 ' should be '2.6.29 preempt mod_unload ARMv7 '
So, that gave me a big hint - after a few hours of customizing I finally got the .config file to a version that will properly compile and load the openvpn module.
I'm attaching the .config file (config.zip) and tun.ko file (tun.ko.zip)
*NOTE* - I have not tested the kernel module yet, so I have no idea if it works. Even if it does work, the .config file is the default one that I manipulated so that the tun module would compile. You probably don't want to use the .config file as it may not match all of the hardware and configs of the droid x. If someone has the actual droid x .config file used by motorola then that would be very helpful.
*update* - the attacked files *do not work*. The working version is available at http://forum.xda-developers.com/showthread.php?p=7417520
Hmm... it looks like tun.ko does compile and install, but is not working properly
# lsmod
tun 11392 0 - Live 0xbf00c000
sec 4808 0 - Live 0xbf000000
# cat /dev/net/tun
/dev/net/tun: No such device
#
The response should be 'cat: /dev/net/tun: File descriptor in bad state'
If we only had the .config file from motorola this would be a lot easier.
mab2 said:
Hmm... it looks like tun.ko does compile and install, but is not working properly
# lsmod
tun 11392 0 - Live 0xbf00c000
sec 4808 0 - Live 0xbf000000
# cat /dev/net/tun
/dev/net/tun: No such device
#
The response should be 'cat: /dev/net/tun: File descriptor in bad state'
If we only had the .config file from motorola this would be a lot easier.
Click to expand...
Click to collapse
I'll post on Motodev board for the running .config (they should have left it in the running kernel at /prog/config.gz ...)
Anyway, thanks trying -- could you post any tips on getting a dev env setup?
I've been using linux for years, but this is my first android setup.
jebc4 said:
I'll post on Motodev board for the running .config (they should have left it in the running kernel at /prog/config.gz ...)
Anyway, thanks trying -- could you post any tips on getting a dev env setup?
I've been using linux for years, but this is my first android setup.
Click to expand...
Click to collapse
I'm in the same boat as you - android newbie, linux veteran.
I started out by getting the whole android environment - http://source.android.com/source/download.html - and ran 'repo init -u git://android.git.kernel.org/platform/manifest.git' - all of that was just so I could get the prebuilt directory with the arm-eabi- files that will be used below.
Then I just downloaded the entire project from opensource.motorola.com - extracted it all, went into the kernel directory and hacked away at the .config file from there.
To compile the kernel I ran:
CROSS_COMPILE=/home/MY_USERNAME/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make -j 4 kernel
CROSS_COMPILE=/home/MY_USERNAME/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make modules
I spent a few hours with it - playing around with environment variables and modifying some Makefiles so I may have left out a small thing or two
It looks like running 'make mapphone_defconfig' created a functioning .config file and I used that to generate tun.ko.
I've posted the files at http://forum.xda-developers.com/showthread.php?p=7417520
Attachments removed as per OP's request.
mab2 said:
I'm no droid expert but it looks like according to the droid readme file you want ARM arch, but the compiler that youo should be using is arm-eabi-gcc (comes from the prebuilt tools from android) - in the Makefile set CROSS_COMPILE to /path/to/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- (or whatever the path to the file is on your build environment)
All the best,
Click to expand...
Click to collapse
Thanks but I already got that, been compiling kernels for other Android devices for a while...
drew630 said:
Thanks but I already got that, been compiling kernels for other Android devices for a while...
Click to expand...
Click to collapse
didn't know that - no harm intended
All the best,
mab2 said:
Okay, after a bunch of hours I finally got it compiled
The 'exec format error' that you were probably seeing is not because it was compiled for the wrong architecture. I originally compiled the kernel modules with the default .config file that 'make menuconfig' generated.
When I tried to load it, I got the 'exec format error'. 'dmesg' showed:
<3>[46706.378570] tun: version magic '2.6.29 mod_unload modversions ARMv5 ' should be '2.6.29 preempt mod_unload ARMv7 '
So, that gave me a big hint - after a few hours of customizing I finally got the .config file to a version that will properly compile and load the openvpn module.
I'm attaching the .config file (config.zip) and tun.ko file (tun.ko.zip)
*NOTE* - I have not tested the kernel module yet, so I have no idea if it works. Even if it does work, the .config file is the default one that I manipulated so that the tun module would compile. You probably don't want to use the .config file as it may not match all of the hardware and configs of the droid x. If someone has the actual droid x .config file used by motorola then that would be very helpful.
*update* - the attacked files *do not work*. The working version is available at http://forum.xda-developers.com/showthread.php?p=7417520
Click to expand...
Click to collapse
i'm having a similar issue, how did you fix this ARMvX Version problem when compiling a module? Thanks in advance!

[KernelModule] Overclock

**** Do Not Repost! Link back to this thread! ****
*** Update: This works on Thrill/Optimus 3D. There are seperate kernel modules for Froyo/GingerBread/CyanogenMod kernels***
Here ya go... I prefer this method rather than hard coding changes in the kernel. Assuming you have both kernel modules extracted to /sdcard
Switch to root
Code:
$ su
Copy files from sdcard to /system/lib/modules directory - You only do this once
Code:
# cp /sdcard/symsearch.ko /system/lib/modules/symsearch.ko
# cp /sdcard/opperator.ko /system/lib/modules/opperator.ko
Load modules, always do symsearch.ko first - You do this every time you reboot
Code:
# insmod /system/lib/modules/symsearch.ko
# insmod /system/lib/modules/opperator.ko
Set Frequency - You do this when you want to change frequency - in hz, that's 6 additions Zero's to make Mhz
Code:
# echo 1188000000 > /proc/opperator
This uses SYMSEARCH by Skrilax_CZ
https://github.com/SkrilaxCZ
Inspired by Milestone Overclock by Tiago Sousa, but totally rewritten for omap kernel 2.6.35-7 and above.
http://code.google.com/p/milestone-overclock/
This is a stripped down version. I'm working on a fully featured version, that will allow you to play with voltage as well. There are some hurdles to overcome before that is ready for prime time... In the mean time, lets see what stock voltage can do... 1188 is my sweet spot on stock voltage, what is yours? I get up to 1235 without reboots, or real noticeable lags but the linkpacks are all over the place, where it stays in the 80's at 1188. And remember, the number is in hz a.k.a. cycles per second, so to get Mhz, you must add 'Six Zeroes' to the end of your desired Mhz.
* Note2Devs: Feel free to put this in your ROM, but please do credit me for the Overclock in your release, and link back to this thread. You can also post a link to your ROM here as a way to make myself and other aware of it. Thanks...
* Echts shows us how he integrate's the module into his own ROM. TY, Echts...
http://forum.xda-developers.com/showpost.php?p=19542521&postcount=52
* Thanks to greenbats for helping figure out the O3D gingerbread kernel issue!
** And don't ask to put it in an app. I won't be happy about that. I'm serious! **
Here go some of my Recording Engineer work...
http://www.youtube.com/watch?v=Je8K_hCej3s
http://www.youtube.com/watch?v=yfBfcdSL1pc
http://www.youtube.com/watch?v=iIU8DO4rdKI
http://www.youtube.com/watch?v=msavF7LIdvY
Essentially, hardware wise, the Thrill has exactly the same specs as the Optimus 3D ? I mean, CPU wise.
It's the same hardware
omgomg said:
Essentially, hardware wise, the Thrill has exactly the same specs as the Optimus 3D ? I mean, CPU wise.
Click to expand...
Click to collapse
Yes, give this a go on the O3D, the module is actually compiled against the cyanogenmod cosmo kernel, which is really for the O3D. Should work.
for test \
How do I install this on the optimus 3D?
greenbat said:
How do I install this on the optimus 3D?
Click to expand...
Click to collapse
No real installing... It's just the modules... You can throw them in /system/lib/modules, and then use an init script to load them up, then set the frequency, but don't do that until you know what works *STABLE* for you.
If you have a favorite ROM, let the dev know about this, and maybe they'll integrate it.
I'm not sure if custom kernels like acurateam's might be too different to work properly at this point. But it won't hurt to try. Just don't start loading it at boot right away.
tekahuna said:
No real installing... It's just the modules... You can throw them in /system/lib/modules, and then use an init script to load them up, then set the frequency, but don't do that until you know what works *STABLE* for you.
If you have a favorite ROM, let the dev know about this, and maybe they'll integrate it.
I'm not sure if custom kernels like acurateam's might be too different to work properly at this point. But it won't hurt to try. Just don't start loading it at boot right away.
Click to expand...
Click to collapse
Thanx for your advice and Great find!!!
I have send your xda link to acura. Hopefully he can integrate it.
greenbat said:
Thanx for your advice and Great find!!!
I have send your xda link to acura. Hopefully he can integrate it.
Click to expand...
Click to collapse
I didn't find this. I made it! First OC'd OMAP4 period! Unless you count RAZR's... hah
Great invention
tekahuna said:
I didn't find this. I made it! First OC'd OMAP4 period! Unless you count RAZR's... hah
Click to expand...
Click to collapse
Great invention and congratulations!
Great job.... we use to use this type of script in motorola defy and moto bravo. It was easier with those because of the 2nd init recovery booting.
Sent from my LG-P925 using XDA App
tekahuna said:
**** Do Not Repost! Link back to this thread! ****
Here ya go... I prefer this method rather than hard coding changes in the kernel. Assuming you have both kernel modules extracted to /sdcard
Switch to root
Code:
$ su
Copy files from sdcard to /system/lib/modules directory - You only do this once
Code:
# cp /sdcard/symsearch.ko /system/lib/modules/symsearch.ko
# cp /sdcard/opperator.ko /system/lib/modules/opperator.ko
Load modules, always do symsearch.ko first - You do this every time you reboot
Code:
# insmod /system/lib/modules/symsearch.ko
# insmod /system/lib/modules/opperator.ko
Set Frequency - You do this when you want to change frequency - in hz, that's 6 additions Zero's to make Mhz
Code:
# echo 1188000000 > /proc/opperator
Is it possible for you to change this into a scriptmanager file?
Click to expand...
Click to collapse
Type this in scriptmanager shell.
greenbat said:
tekahuna said:
**** Do Not Repost! Link back to this thread! ****
Here ya go... I prefer this method rather than hard coding changes in the kernel. Assuming you have both kernel modules extracted to /sdcard
Switch to root
Code:
$ su
Copy files from sdcard to /system/lib/modules directory - You only do this once
Code:
# cp /sdcard/symsearch.ko /system/lib/modules/symsearch.ko
# cp /sdcard/opperator.ko /system/lib/modules/opperator.ko
Load modules, always do symsearch.ko first - You do this every time you reboot
Code:
# insmod /system/lib/modules/symsearch.ko
# insmod /system/lib/modules/opperator.ko
Set Frequency - You do this when you want to change frequency - in hz, that's 6 additions Zero's to make Mhz
Code:
# echo 1188000000 > /proc/opperator
Is it possible for you to change this into a scriptmanager file?
Click to expand...
Click to collapse
What I'd really like is for the ROM making dev's to come to a consensus as to how to integrate this... Mainly, the best place to throw the script that does this at boot on these phones. I know how we did it on droid X, but I haven't dug deep enough into this phone just yet to be sure... I'll update the OP as methods improve and I get more feedback.
Click to expand...
Click to collapse
Or use callmearia kernel and make script for system/etc/init folder... havent tried his kernel but it should support the script at boot up. Acura roms should work that way too.
The way most roms use overclock is the init script that starts at boot...
Sent from my LG-P925 using XDA App
rdannar said:
Great job.... we use to use this type of script in motorola defy and moto bravo. It was easier with those because of the 2nd init recovery booting.
Sent from my LG-P925 using XDA App
Click to expand...
Click to collapse
Those would have been based on Milestone Overclock... Which is where I gained most of my knowledge by contributing to getting the droidx/2 side of things working. MO's method of manipulating frequency and voltage no longer works on OMAP4, or rather kernel 2.6.35+... I had to come up with a new way of doing things, which didn't fit well under the existing framework of MO. So, I started from scratch... This is just the tip of the iceberg... Basic, basic, basic...
i get insmod: init_module /system/lib/modules/symsearch.ko failed (exec format error).
What am i doing wrong?
I also get the same error: insmod: init_module '/system/lib/modules/symsearch.ko' failed (exec format error)
Is it because I have gingerbread?
Must I use froyo?
borelis said:
i get insmod: init_module /system/lib/modules/symsearch.ko failed (exec format error).
What am i doing wrong?
Click to expand...
Click to collapse
Both O3D's, huh? What kernel are you running? give me output of
# dmesg
and
# busybox uname -a
And if it's acurateam, a link to their kernel source
tekahuna said:
What kernel are you running? give me output of
# dmesg
and
# busybox uname -a
And if it's acurateam, a link to their kernel source
Click to expand...
Click to collapse
"LINK Boot_2.0 More RAM, No Lags, More Speed.." from acura. Think he uses stock kernel. Im on GB by the way.
Outputs is a bit over my head. Tell me how and i´ll provide it for you.

[HOWTO] Increase available RAM in ROMs based on "That kernel" and "Those libs"

[HOWTO] Increase available RAM in ROMs based on "That kernel" and "Those libs"
Most Atrix users using ROMs with "That kernel" and "Those libs" are stuck with 778MB or 784MB of available RAM (even after applying the ramfix for international Atrix users), but a few users are reporting getting around 855MB of RAM available on their phones. After a quick comparison of the /proc/cmdline on these phones (and since having more RAM can't hurt), here's a guide how to increase your available RAM on these ROMs. This guide is intended for people who have 778-784MB available on their phone when using ROMs based on "That kernel" and "Those libs" with the original ramfix. DO NOT USE ON OTHER ROMS!
WARNING: STOP NOW AND DO NOT FLASH IF YOU DON'T KNOW WHAT YOU'RE DOING!!!
PLEASE READ AND UNDERSTAND EVERYTHING BEFORE YOU DO ANYTHING!
I have personally tested this with Somebody's CM10 and AtrICS v2.
It should theoretically work with other ROMs based on "That kernel" and "Those libs", but use it at your own risk!
Now, on to the good part:
1. Get your current /proc/cmdline.
You can do this by using terminal emulator and typing:
su
cat /proc/cmdline
Click to expand...
Click to collapse
or by using a root browser and copy your /proc/cmdline to your sdcard.
A note from NFHimself:
NFHimself said:
Hi,
Please emphasize that the script needs YOUR complete /proc.cmdline in there, from a working phone adb session, not recovery adb session as the recovery has it's own possible /proc/cmdline via a different kernel, etc. You are not just editing the mem=?? stuff.
What would be best is to first create a zip that is plain jane what your /proc/cmdline is or one that uses setcmdline with a blank argument or "". That way you can reset to default in case of errors. Or you can just fastboot flash your boot partition, no need for an sbf.
Cheers!
Click to expand...
Click to collapse
2. Download attached file.
3. Edit the updater-script file in the zip.
Extract the zip and find META-INF\com\google\android\updater-script
Windows users: Edit the file using Notepad. DO NOT USE WORDPAD. WordPad changes the Unix-style CR to Windows style CR-LF, which may cause problems.
Once you open the file, find this in the file:
run_program("/tmp/setcmdline", "[email protected] [email protected] [email protected] vmalloc=256M video=tegrafb console=null usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=mbr:d00:100:800,kpanic:2100:400:800 security=tomoyo mot_prod=1 androidboot.serialno=XXXXX00000");
Click to expand...
Click to collapse
Change the red part with your own cmdline, which you got in step 1. Take care especially on the tegrapart and androidboot.serialno parameters. DO NOT USE A TEGRAPART AND/OR SERIAL NUMBER FROM ANOTHER PHONE!
If your original cmdline that you got in step one was:
[email protected] [email protected] [email protected] vmalloc=320M video=tegrafb console=null usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=mbr:1100:100:800,kpanic:2500:400:800 security=tomoyo mot_prod=1 androidboot.serialno=12345ABCDE
Click to expand...
Click to collapse
then you should modify the part of the updater-script mentioned above to look like this:
run_program("/tmp/setcmdline", "[email protected] [email protected] [email protected] vmalloc=256M video=tegrafb console=null usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=mbr:1100:100:800,kpanic:2500:400:800 security=tomoyo mot_prod=1 androidboot.serialno=12345ABCDE"
Click to expand...
Click to collapse
Only the change the red part in the script with the red part in your original cmdline. DO NOT MODIFY ANYTHING ELSE!
4. Save the file, and repack the zip.
5. Flash zip.
6. You should now have 855MB of RAM available. Enjoy your extra 70+MB of RAM.
WARNING: DO NOT FLASH IF YOU DON'T KNOW WHAT YOU'RE DOING!!!
I AM NOT RESPONSIBLE FOR ANYTHING THAT GOES WRONG BECAUSE OF YOU BORKING YOUR CMDLINE!!!
Thanks to: NFHimself for creating the ramfix binary and Ilkinansr92 for his cmdline.
Thanks!!! I will givi it a try.
Edit: Working just fine....thanks again!
from the (m)ATRIX...
Thanks!
Now i have 855mb of RAM available
I have 815mb of ram available and i am using Nottachtrix Rom, i am going to try this method in 2 mins and i will give feedback..
Edit:
it gives me error which number 6 (my rom is working, no problem). i know nottachtirx is not based on that kernel but i had wanted to try it whether work or not.
ramanujan20 said:
I have 815mb of ram available and i am using Nottachtrix Rom, i am going to try this method in 2 mins and i will give feedback..
Edit:
it gives me error which number 6 (my rom is working, no problem). i know nottachtirx is not based on that kernel but i had wanted to try it whether work or not.
Click to expand...
Click to collapse
I got that error too....on JB...but that was because I was doing something wrong.
But I think this is for JB...
Cocolopes said:
I got that error too....on JB...but that was because I was doing something wrong.
But I think this is for JB...
Click to expand...
Click to collapse
are you using something related to "that rom"? (kernel, libs, rom)
jhonnyx said:
are you using something related to "that rom"? (kernel, libs, rom)
Click to expand...
Click to collapse
No...someones Cm10 here...but now is working...I just replace the update script in the zip...and work perfect
from the (m)ATRIX...
successful
oh yeah~
now i have 855mb ram now!
i found that you can copy the file /proc/cmdline to computer,and select the words you need
in this way,you can do it more simple and more safe!
Well. 855 MB RAM. I am using CM10 with that libs.
Thank a lot.
Cocolopes said:
No...someones Cm10 here...but now is working...I just replace the update script in the zip...and work perfect
from the (m)ATRIX...
Click to expand...
Click to collapse
Well, "Somebody's" CM10 IS using the kernel & libs from "That ROM", so I'd say it's very much related.
Can anybody help me i don't even have 500 mb in manage apps - running apps section
International user and using MRom
Sent from Otterbox Atrix 4G Rockz
ranjithkumar1201 said:
Can anybody help me i don't even have 500 mb in manage apps - running apps section
International user and using MRom
Sent from Otterbox Atrix 4G Rockz
Click to expand...
Click to collapse
Have you applied the ramfix? If not download this and apply it and it will fix that problem:
http://forum.xda-developers.com/attachment.php?attachmentid=710806&d=1315237274
Perfect. Thanks !
I hope the OP doesn't mind...
Here's my take on this. I took the source of the cmdline utility and improved it greatly, now it's almost a full-featured kernel cmdline editor. Then I used this new utility in the update script to dynamically edit the system cmdline.
Bottom line: this ZIP should work on all systems without any modifications.
WARNING: not fully tested, use at your own risk!
(If anything goes wrong, it should be easily revertable simply by reflashing the kernel, either from recovery or via fastboot.)
EDIT: added a couple more options, recompiled the cmdline binary and repackaged the ZIP.
ravilov said:
I hope the OP doesn't mind...
Here's my take on this. I took the source of the cmdline utility and improved it greatly, now it's almost a full-featured kernel cmdline editor. Then I used this new utility in the update script to dynamically edit the system cmdline.
Bottom line: this ZIP should work on all systems without any modifications.
WARNING: not fully tested, use at your own risk!
(If anything goes wrong, it should be easily revertable simply by reflashing the kernel, either from recovery or via fastboot.)
EDIT: added a couple more options, recompiled the cmdline binary and repackaged the ZIP.
Click to expand...
Click to collapse
Works beautifully on someone's cm10! Big thanks.
Sent from my MB860
ravilov said:
I hope the OP doesn't mind...
Here's my take on this. I took the source of the cmdline utility and improved it greatly, now it's almost a full-featured kernel cmdline editor. Then I used this new utility in the update script to dynamically edit the system cmdline.
Bottom line: this ZIP should work on all systems without any modifications.
WARNING: not fully tested, use at your own risk!
(If anything goes wrong, it should be easily revertable simply by reflashing the kernel, either from recovery or via fastboot.)
EDIT: added a couple more options, recompiled the cmdline binary and repackaged the ZIP.
Click to expand...
Click to collapse
sorry for ask but i don't get it this is a script to modify the cmdline or is an auto modify tool for the cmdline?
Maibol said:
sorry for ask but i don't get it this is a script to modify the cmdline or is an auto modify tool for the cmdline?
Click to expand...
Click to collapse
Both actually.
It includes a tool that can modify the cmdline, and a script that does modify the cmdline automatically, by utilizing the tool.
ravilov said:
Both actually.
It includes a tool that can modify the cmdline, and a script that does modify the cmdline automatically, by utilizing the tool.
Click to expand...
Click to collapse
thanks nice tool i gon give it a try
Why so some Atrixes have 815 MB RAM and some others 879 MB ?
And ravilov, does your script work on gingerbread ROMs, too?
Sent from my CM7 powered Atrix using TapaTalk \o/
the.cybot said:
And ravilov, does your script work on gingerbread ROMs, too?
Click to expand...
Click to collapse
Actually, I'm not sure. It doesn't seem to work for me. The boot image gets updated correctly but for some reason the new cmdline is not used when the kernel boots. I'm using MROM, latest release. Maybe it works different on another ROM. Maybe this whole cmdline business is specific to stock kernels only. Needs more research.

Compiling frandom module for kernel 2.6.32.9

hi.
i would like to get some information about how to compile frandom module for my kernel.
here is the wiki... https://github.com/pier11/kernel_hu...-packing-the-kernel-into-a-flashable-boot.img
and git https://github.com/pier11/kernel_huawei_u8220
so which command i should use ? (i ve been told ---> CONFIG_*=m)
and when ?
i have the frandom kernel module tarball. dl it here= http://billauer.co.il/frandom.html
do i have to extract it? in which directory?
thank you very much...
desalesouche said:
hi.
i would like to get some information about how to compile frandom module for my kernel.
here is the wiki... https://github.com/pier11/kernel_hu...-packing-the-kernel-into-a-flashable-boot.img
and git https://github.com/pier11/kernel_huawei_u8220
so which command i should use ? (i ve been told ---> CONFIG_*=m)
and when ?
i have the frandom kernel module tarball. dl it here= http://billauer.co.il/frandom.html
do i have to extract it? in which directory?
thank you very much...
Click to expand...
Click to collapse
as there is no teachers(for the moment) in that "university", i had to "harass" some regonized people from xda...(sorry for that)
and they kindly try to help me...
i had this kind of answer which i could do : i think that the following is to build the module included in the kernel..
Download Makefile, Kconfig, and frandom.c and put all three in your downloaded kernel source (drivers/char directory) overwriting any existing file.
this part is done...
but how to do that ? add FRANDOM=m to the kernel .config file ? and where is located that file?
2 minutes of googling suggests you take a look at these:
http://forum.xda-developers.com/showthread.php?t=1236576
http://yatsec.blogspot.co.uk/2011/01/guide-to-compiling-custom-kernel.html
pulser_g2 said:
2 minutes of googling suggests you take a look at these:
http://forum.xda-developers.com/showthread.php?t=1236576
http://yatsec.blogspot.co.uk/2011/01/guide-to-compiling-custom-kernel.html
Click to expand...
Click to collapse
i have been googling far much more than 2 minutes and i already found these threads...but couldn't manage...
by egg with this one ...which contains error... http://yatsec.blogspot.co.uk/2011/01...om-kernel.html
PREPARING YOUR KERNEL SOURCE
First we must retrieve and copy the kernel config from our device.
Code:
$ cd /path/to/android-sdk/tools ----->ok
$ ./adk pull /proc/config.gz ----->not good! you have to make first $ adb devices in terminal....then $ adb pull /proc/config.gz
$ gunzip ./config.gz ----->ok
$ cp config /path/to/kernel/.config not working! ----> cp: cannot create regular file /path/to/kernel/.config : No such file or directory....
so what to do now?
how to solve this please? i will keep on googling to try to find out solution...any help is welcome
thank you
when i will finish my little project , i think that other people would benefit from that... i might make a how to .
for information ,i have been setting ubuntu 12.10 64 bits from this thread ---->http://soupdawg.wordpress.com/2012/...-for-building-android-jellybean-all-variants/
new link : http://nathanpfry.com/2014/02/07/how-to-prepare-ubuntu-14-04-lts-trusty-tahr-to-compile-android-roms
Re: [Q] Compiling frandom module for kernel 2.6.32.9
desalesouche said:
i have been googling far much more than 2 minutes and i already found these threads...but couldn't manage...
by egg with this one ...which contains error... http://yatsec.blogspot.co.uk/2011/01...om-kernel.html
PREPARING YOUR KERNEL SOURCE
First we must retrieve and copy the kernel config from our device.
Code:
$ cd /path/to/android-sdk/tools ----->ok
$ ./adk pull /proc/config.gz ----->not good! you have to make first $ adb devices in terminal....then $ adb pull /proc/config.gz
$ gunzip ./config.gz ----->ok
$ cp config /path/to/kernel/.config not working! ----> cp: cannot create regular file /path/to/kernel/.config : No such file or directory....
so what to do now?
how to solve this please? i will keep on googling to try to find out solution...any help is welcome
thank you
when i will finish my little project , i think that other people would benefit from that... i might make a how to .
for information ,i have been setting ubuntu 12.10 64 bits from this thread ---->http://soupdawg.wordpress.com/2012/...-for-building-android-jellybean-all-variants/
Click to expand...
Click to collapse
That's because you are meant to put in the path to your kernel, rather than literally /path/to/kernel...
@OP
I know you sent me a PM, but it's better if I reply here.
THIS is what did it for me. Of course my goal wasn't achieved as the extraversion bit was wrong. The X8 is a tricky device.
And make sure to go through the whole thread first.
And also try to use the arm-eabi toolchain from CM as that one throws the least errors.
sgt. meow
hi all. i manage to compile the module thanks to Blechd0se http://forum.xda-developers.com/member.php?u=4855459 i will soon edit the working how to kindly provided by him.
i thank all people who have been providing help and advices... and XDA
here are the change provided by bledchOse to be able to compile the frandom module for my kernel. and little how to
1---> https://github.com/pier11/kernel_hu...-packing-the-kernel-into-a-flashable-boot.img
2---> https://github.com/desalesouche/kernel_huawei_u8220
make the change in kernel before to build it ( change are in green)
3---> https://github.com/desalesouche/jordan-kernel/commit/52e4f2d00b2ea11e3643adb4c4235bdda7a87b5b
4---> Originally Posted by Blechd0se
" change CONFIG_FRANDOM=y to CONFIG_FRANDOM=m, it make you a nice and shiny *.ko file.
And if you already compiled your kernel its inside the kernel, no need to compile another module which does exactly the same and you can instead push your kernel to your device "
5 build the kernel and or module and finish to follow explanation of link 1...
you will find the frandom .ko under drivers/char/frandom/ where your kernel is located... copy it under system/lib/modules/ in your rom zip.
you will need a script to make it load:be activated at boot
Et voilà!!!
It's funny because it is true.....
pulser_g2 said:
2 minutes of googling suggests you take a look at these:
http://forum.xda-developers.com/showthread.php?t=1236576
http://yatsec.blogspot.co.uk/2011/01/guide-to-compiling-custom-kernel.html
Click to expand...
Click to collapse
Had been researching kernel mods came across frandom, googled "frandom module".... Your post was number 2 result.... your first link was my answer.... I win! 5 seconds googling!!! Thank you sir!

Categories

Resources