Guest unaszplodrmann Posted July 27, 2012 Report Posted July 27, 2012 (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 July 29, 2012 by unaszplodrmann
Guest khumhurezu Posted July 27, 2012 Report Posted July 27, 2012 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
Guest unaszplodrmann Posted July 27, 2012 Report Posted July 27, 2012 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?
Guest khumhurezu Posted July 28, 2012 Report Posted July 28, 2012 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:
Guest unaszplodrmann Posted July 28, 2012 Report Posted July 28, 2012 ... 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.
Guest khumhurezu Posted July 28, 2012 Report Posted July 28, 2012 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... :(
Guest unaszplodrmann Posted July 28, 2012 Report Posted July 28, 2012 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.
Guest khumhurezu Posted July 28, 2012 Report Posted July 28, 2012 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
Guest unaszplodrmann Posted July 28, 2012 Report Posted July 28, 2012 (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 July 28, 2012 by unaszplodrmann
Guest khumhurezu Posted July 28, 2012 Report Posted July 28, 2012 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
Guest dragpyre Posted July 28, 2012 Report Posted July 28, 2012 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.
Guest unaszplodrmann Posted July 28, 2012 Report Posted July 28, 2012 (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 July 29, 2012 by unaszplodrmann
Guest khumhurezu Posted July 29, 2012 Report Posted July 29, 2012 You Sir, are a certified module guru! This worked perfectly. I bow before you. Many thanks!
Guest unaszplodrmann Posted July 29, 2012 Report Posted July 29, 2012 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.
Guest omegamoon Posted July 30, 2012 Report Posted July 30, 2012 Interesting... nice read and great that it works. Thumbs up!
Guest nosmicek Posted October 6, 2012 Report Posted October 6, 2012 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)..
Guest unaszplodrmann Posted October 6, 2012 Report Posted October 6, 2012 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.
Guest unaszplodrmann Posted November 3, 2012 Report Posted November 3, 2012 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! ;)
Guest tmor Posted November 8, 2012 Report Posted November 8, 2012 Hey unaszplodrmann, how is going the OTG support? :rolleyes:
Guest unaszplodrmann Posted November 9, 2012 Report Posted November 9, 2012 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.
Guest droiddruid Posted November 9, 2012 Report Posted November 9, 2012 (edited) off topic but they done a decent job with xcom :) Edited November 9, 2012 by droiddruid
Guest unaszplodrmann Posted November 9, 2012 Report Posted November 9, 2012 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 ;)
Guest droiddruid Posted November 9, 2012 Report Posted November 9, 2012 PS3 had a patch hit today but it's still a buggy mess.
Guest tmor Posted November 9, 2012 Report Posted November 9, 2012 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
Guest unaszplodrmann Posted November 10, 2012 Report Posted November 10, 2012 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.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now