• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such softwareNintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)CUSTOM ROMS You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspension / ban.

Additional Kernel Modules (cifs.ko and tun.ko)

39 posts in this topic

Posted (edited)

Here are some commonly needed modules that are missing from stock kernels, providing OpenVPN and Samba/CIFs support. Maybe someone will find them useful, at least whilst the G300 lacks a CyanogenMod port. However, if you don't know what they are, you probably don't need them...

Additional kernel modules for Gingerbread kernel 2.6.38.6-perf

Additional kernel modules for Ice Cream Sandwich kernel 3.0.8-perf

You'll need the Android SDK installed and root access on your handset. After unpacking the .zip, execute the following from the directory containing the modules:


adb push *.ko /sdcard/

adb shell

su

mount -o rw,remount /dev/block/mmcblk0p12 /system

cp /sdcard/*.ko /system/lib/modules/

chmod 644 /system/lib/modules/*

mount -o ro,remount /dev/block/mmcblk0p12 /system

exit

exit

Although OpenVPN Installer and OpenVPN Settings from the market are not as good as the CyanogenMod implementation (CM employs password protected certificate storage), they provide a perfectly serviceable solution.

Edited by unaszplodrmann
0

Share this post


Link to post
Share on other sites

Posted

Hello. I've been trying to compile tun.ko for ICS using the kernel from http://www.modaco.co...nel-kernel-308/ .

Unfortunatelly, without success.

Please let me know what toolchain you used to compile your modules.

Thanks

0

Share this post


Link to post
Share on other sites

Posted

Hello. I've been trying to compile tun.ko for ICS using the kernel from http://www.modaco.co...nel-kernel-308/ .

Unfortunatelly, without success.

Please let me know what toolchain you used to compile your modules.

Thanks

Odd. I just used the standard prebuilt 4.4.3 toolchain cloned from the Google repo. What do you have in /proc/version?

0

Share this post


Link to post
Share on other sites

Posted

I've used the same toolchain from the Android NDK.

Here's /proc/version

shell@android:/system/lib/modules # cat /proc/version

Linux version 3.0.8-perf-00213-g8dfa62b (android@localhost) (gcc version 4.4.3 (GCC) ) #1 PREEMPT Wed Jun 20 10:04:10 CST 2012

The strings from the compiled module:

/ics/source/drivers/net# strings tun.ko

tun_get_socket

tun_get_user

alias=devname:net/tun

alias=char-major-10-200

license=GPL

author=© 1999-2004 Max Krasnyansky <[email protected]>

description=Universal TUN/TAP device driver

depends=

vermagic=3.0.8-perf-00213-g8dfa62b preempt mod_unload modversions ARMv7

0x%x

include/linux/netdevice.h

<6>tun: netif_stop_queue() cannot be called before register_netdev()

<3>tun: unexpected GSO type: 0x%x, gso_size %d, hdr_len %d

tun:

drivers/net/tun.c

tun: GSO!

<3>RTNL: assertion failed at %s (%d)

<6>tun: %s, %s

Universal TUN/TAP device driver

<6>tun: %s

© 1999-2004 Max Krasnyansky <[email protected]>

<3>tun: Can't register link_ops

<3>tun: Can't register misc device %d

tun%d

tap%d

<3>tun: Failed to create tun sysfs files

net/tun

tun_flags

owner

group

GSO!

And insmod attempt

shell@android:/system/lib/modules # insmod tun.ko

insmod: init_module 'tun.ko' failed (Exec format error)

255|

I'm kinda stumped... :( :wacko:

0

Share this post


Link to post
Share on other sites

Posted

...

vermagic=3.0.8-perf-00213-g8dfa62b preempt mod_unload modversions ARMv7

...

insmod: init_module 'tun.ko' failed (Exec format error)

Disable CONFIG_MODVERSIONS in the loadable module support section and to avoid the kernel complaining about a magic value mismatch.

0

Share this post


Link to post
Share on other sites

Posted

No go.

vermagic=3.0.8-perf-00213-g8dfa62b preempt mod_unload ARMv7

shell@android:/ # insmod system/lib/modules/tun.ko

insmod: init_module 'tun.ko' failed (Exec format error)

255|

I must be doing something very wrong here... :(

0

Share this post


Link to post
Share on other sites

Posted

No go.

vermagic=3.0.8-perf-00213-g8dfa62b preempt mod_unload ARMv7

shell@android:/ # insmod system/lib/modules/tun.ko

insmod: init_module 'tun.ko' failed (Exec format error)

255|

I must be doing something very wrong here... :(

Darn. Nothing usful in dmesg? I'll grab the sources later today and give it a try. It'd be great if you could post the default config for 3.0.8.

0

Share this post


Link to post
Share on other sites

Posted

Sorry for the delay.

Dmesg only says this:

<4>[4749, insmod] [33075.044928] do_exit: exit code=65280

Original config.gz, from B927 rom.

http://dl.dropbox.com/u/30097546/config.gz

In detail, here's what I did.

On a fresh ubuntu 10.04, got the sources and Android NDK

Modified the config with:

CONFIG_CROSS_COMPILE="arm-linux-androideabi-"

CONFIG_LOCALVERSION="$(KERNEL_LOCAL_VERSION)-perf-00213-g8dfa62b"

# CONFIG_LOCALVERSION_AUTO is not set

CONFIG_TUN=m

Exported the path to the compiler, in my case

export PATH=$PATH:/ics/ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/

export ARCH=arm

Modified the setlocationversion script so it won't display "+" symbol:

<<

go to source directory

vi scripts/setlocalversion

locate the following line

if $short; then

echo "+"

change echo "+" to echo ""

>>

make modules

0

Share this post


Link to post
Share on other sites

Posted (edited)

Try the ones I've added to the OP. I thought that CONFIG_MODVERSIONS would be disabled in the new kernel too, as it was in 2.6.38, hence I suggested disabling it, having wrongly presuming you'd enabled it. Nice to see them being less zealous about kernel security.

I exported $PATH, $ARCH and $CROSS_COMPILE (set to "arm-eabi-"), then did a 'make oldconfig', followed by 'make menuconfig' to enable the modules. As CONFIG_MODVERSIONS is enabled, I didn't bother setting the versioning options.

Interesting also to see that USB OTG support is still present, but not fully enabled.

Edited by unaszplodrmann
0

Share this post


Link to post
Share on other sites

Posted

I tried your version, didn't work.

dmesg gives me the following, for both your build and one I compiled using your instructions.

[1978, insmod] [ 3390.762324] tun: no symbol version for module_layout

[4978, insmod] [ 3390.782884] do_exit: exit code=65280

0

Share this post


Link to post
Share on other sites

Posted

I tried your version, didn't work.

dmesg gives me the following, for both your build and one I compiled using your instructions.

[1978, insmod] [ 3390.762324] tun: no symbol version for module_layout

[4978, insmod] [ 3390.782884] do_exit: exit code=65280

I think what happens is that when tun comes back as no existing or no symbol present, it sets connectioninprogress to null. The connectionInProgess.isNumericToken() may be what is causing the errors, and potential force closing.

Try making the link between tun and connectionInProgress yourselves, before trying to run it.

Also, try setting permissions in /dev/net to rwx. If the folder isn't present, create it.

0

Share this post


Link to post
Share on other sites

Posted (edited)

I tried your version, didn't work.

dmesg gives me the following, for both your build and one I compiled using your instructions.

[1978, insmod] [ 3390.762324] tun: no symbol version for module_layout

[4978, insmod] [ 3390.782884] do_exit: exit code=65280

OK. It seems that Module.symvers is not being created and this is the root of the problem. Set the version string as you had it and do a full kernel build... Let me know ;)

Edit: It seems a problem with the Netfilter TCP MSS component prevents a clean build, so I disabled it, fudged the version string for good measure and ran a full build. Module.symvers was created. Here's the modinfo output:


filename:	   /media/work/android/g300/android_kernel_huawei_u8818/drivers/net/tun.ko

alias:		  devname:net/tun

alias:		  char-major-10-200

license:	    GPL

author:		 (C) 1999-2004 Max Krasnyansky <[email protected]>

description:    Universal TUN/TAP device driver

depends:	    

vermagic:	   3.0.8-perf-00213-g8dfa62b preempt mod_unload modversions ARMv7

http://dl.dropbox.com/u/4942645/tun.ko

Any joy? This is bugging me now; I'm tempted to install the ROM in an emulator, but I don't want to update my handset to ICD yet...

Edited by unaszplodrmann
0

Share this post


Link to post
Share on other sites

Posted

You Sir, are a certified module guru! This worked perfectly. I bow before you. Many thanks!

0

Share this post


Link to post
Share on other sites

Posted

Two heads, eh. Glad we worked it out between us. I'll be looking to switch to ICS once an official ROM is out there, so this will save me head-scratching at a later date. I'll hopefully add modules for OTG support here when that time comes.

0

Share this post


Link to post
Share on other sites

Posted

Interesting... nice read and great that it works. Thumbs up!

0

Share this post


Link to post
Share on other sites

Posted

I tried your version of cifs.ko, kernel 3.0.8-perf-00240- for my huawei g300, module loaded properly, but when trying to mount, the mount says "no such file or directory"

im just asking if having proper version of cifs.ko can influence mount in any way.. im starting to be desperate..

lsmod list module as live, all tools can access my network shared drives, but it fail only at mounting (with proper rights in target mount poins)..

0

Share this post


Link to post
Share on other sites

Posted

I never actually tried the CIFs module, other than checking it loaded correctly. I use ES File Explorer instead, on the odd occasion... I'm getting the same error n Gingerbread, so its not versioning thats the problem.

0

Share this post


Link to post
Share on other sites

Posted

Just a quick heads up; after finally upgrading to ICS, I went about compiling a tun module for the new kernel version included with B944, but then found that a nice person at Huawei has built support directly into the kernel this time around.

Thanks, nice person at Huawei - very considerate of you! ;)

0

Share this post


Link to post
Share on other sites

Posted

Hey unaszplodrmann, how is going the OTG support? :rolleyes:

0

Share this post


Link to post
Share on other sites

Posted

Hey unaszplodrmann, how is going the OTG support? :rolleyes:

It was discussed briefly on IRC lastnight, as it happens ;) :rolleyes:

I have an OTG cable but not a hub. Like I said, I might give it a whirl soon, if I can drag myself from XCOM for an evening. I doubt the G300 can supply power and it would be better if someone with a hub and a power meter (for the safety of the precious G300) tested it.

0

Share this post


Link to post
Share on other sites

Posted (edited)

off topic but they done a decent job with xcom :)

Edited by droiddruid
0

Share this post


Link to post
Share on other sites

Posted

Aye :) I guess they had to, or thousands of old farts would've complained vociferously... Just waiting for a bugfix update so 'classic' ironman is possible without hair loss ;)

0

Share this post


Link to post
Share on other sites

Posted

PS3 had a patch hit today but it's still a buggy mess.

0

Share this post


Link to post
Share on other sites

Posted

It was discussed briefly on IRC lastnight, as it happens ;) :rolleyes:

I have an OTG cable but not a hub. Like I said, I might give it a whirl soon, if I can drag myself from XCOM for an evening. I doubt the G300 can supply power and it would be better if someone with a hub and a power meter (for the safety of the precious G300) tested it.

Thanks for the reply

0

Share this post


Link to post
Share on other sites

Posted

No dice. It does indeed appear that an external hub is required for power, or that some or all G300s do not have a Micro AB USB jack.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.