[KERNEL] 32a kernel with tun (VPN) support - myTouch 3G, Magic Android Development

Hello.
First of all, thanks again to TigerTael for making this possible.
Flashing this will make VPN connections possible from your phone.
The config is based on the latest gbo, with a few tweaks and the new kernel module and auto load from init.rc.
So to install just push wlan.ko and tun.ko to /system/lib/modules and flash boot.
You can ofcourse test this kernel by fastbooting into it.
Download link: http://www.megaupload.com/?d=047LXTK0
I have managed to connect to our Cisco VPN concentrator at work using this kernel and http://get-a-robot-vpnc.googlecode.com/files/VPN_Connections_v08.apk.
To get VPN Connections working I had to:
Install Busybox
Create /etc/vpnc
Copy /data/data/org.codeandroid.vpnc_frontend/files/vpnc-script to /etc/vpnc
Run vpnc from /data/data/org.codeandroid.vpnc_frontend/files via terminal
I am pretty sure there's an easier way, however the GUI just didnt work for me.
This is my first ever release to this forum, please dont bite me if it doesnt run on your device for some reason. And you do this on your own risk
Cheers,
Mockillo

i just uploaded it to megaupload.com, there isnt a download limit and speeds are fast
http://www.megaupload.com/?d=7KMWMZLU

NguyenHuu said:
i just uploaded it to megaupload.com, there isnt a download limit and speeds are fast
http://www.megaupload.com/?d=7KMWMZLU
Click to expand...
Click to collapse
Thanks
Added it to the post.

I'm interested in getting vpnc working (reliably) also.
mockillo said:
First of all, thanks again to TigerTael for making this possible.
Flashing this will make VPN connections possible from your phone.
The config is based on the latest gbo, with a few tweaks and the new kernel module and auto load from init.rc.
So to install just push wlan.ko and tun.ko to /system/lib/modules and flash boot.
Click to expand...
Click to collapse
Right.
snip ...
mockillo said:
To get VPN Connections working I had to:
Install Busybox
Create /etc/vpnc
Copy /data/data/org.codeandroid.vpnc_frontend/files/vpnc-script to /etc/vpnc
Run vpnc from /data/data/org.codeandroid.vpnc_frontend/files via terminal
Click to expand...
Click to collapse
Why did you need to install busy box?
Presumably you needed to create an /etc/vpnc/default.conf as well, yes?
mockillo said:
I am pretty sure there's an easier way, however the GUI just didnt work for me.
Click to expand...
Click to collapse
Yes, the GUI seems to make quite a number of assumptions that are plain wrong.
I've built VPN connections from an svn (rev 125) checkout and the original sources for libcrypt, libgpg-error and vpnc. I also built a kernel from the android-msm-2.6.27 git source (with the TT v2 patch, not that it matters, and a config from my Armon_RA 1.2.1 ROM kernel) and then built tun.ko externally so I could include it in the package. So far the module still has the srcversion info so the kernel version strings must match. I've pushed the module to /system/lib/modules so the module loading changes I've made to VPN connections haven't been tested for the case the module isn't present.
VPN connections seems quite fragile and I really don't like the coding style so I'm trying to change that as I go. After making a few changes to VPN connections I am able get the gui side working. But a really odd and annoying thing is that, while I can get it to work over my WiFi, I can't get it to work over my phone network connection. The configurations setup by vpnc are essentially the same, but no go!
Ian

Related

Rebuild Rogers kernel for tethering

I've got Ubuntu up and running and I'm willing to rebuild the kernel to enable tethering.
Problem 1 is that I have not received my Magic yet
Problem 2 is that I have no idea what I need to do
So who wants to help?
sammypwns said:
I've got Ubuntu up and running and I'm willing to rebuild the kernel to enable tethering.
Problem 1 is that I have not received my Magic yet
Problem 2 is that I have no idea what I need to do
So who wants to help?
Click to expand...
Click to collapse
I'll help. I've got tethering working using Azilink, but it would be nice to get it working using the Hero's built-in tethering option. Here's my post at ubuntuforums.org:
http://ubuntuforums.org/showthread.php?t=1202059
So are you rebuilding the kernel to get the iptables? I can't even get to make Ubuntu see the Magic as a communications device now.
It took me about 15 minutes to get the SDK up and running on Ubuntu 32 bit but I don't know where to find the source for the kernel or evena copy of the kernel itself. Once I have those it shouldn't take more than 5 minutes to compile the kernel including iptables. In fact if I had the source to a kernel that does allow tethering it would be even faster because I could just drag and drop what I need into the build directory. I haven't seen the source but I think that the HTC branded kernel only differs by a few files and it might even be easier to move the HTC files to the Google kernel. Need more help and testers.
sammypwns said:
It took me about 15 minutes to get the SDK up and running on Ubuntu 32 bit but I don't know where to find the source for the kernel or evena copy of the kernel itself. Once I have those it shouldn't take more than 5 minutes to compile the kernel including iptables. In fact if I had the source to a kernel that does allow tethering it would be even faster because I could just drag and drop what I need into the build directory. I haven't seen the source but I think that the HTC branded kernel only differs by a few files and it might even be easier to move the HTC files to the Google kernel. Need more help and testers.
Click to expand...
Click to collapse
Do you have the port tools? They allow you to unpack the boot.img. I'll upload the port tools for you:
http://www.mediafire.com/?fnzdtnj4gmy
Just put all of the tools in your /android/tools folder.
To unpack the boot.img, you just have to run this command:
unpack-H.pl boot.img
Click to expand...
Click to collapse
That's it. Good-luck. Messing around with the kernel is way above my know-how.
@hotweiss thanks a bunch
This guide shows you how to push the IP tables on the Magic:
http://android-unleashed.com/2008/1...d-g1-phone-with-iptables-no-proxy-needed.html
do I just need to incorprate the iptables binary with the kernel when I build it. Again I haven't seen either kernel to compare them.
sammypwns said:
do I just need to incorprate the iptables binary with the kernel when I build it. Again I haven't seen either kernel to compare them.
Click to expand...
Click to collapse
Haven't done it myself yet, but it looks like it's just an issue of following a few steps. The biggest problem right now is to make Ubuntu see the Magic as a modem.
again I don't have my magic yet so I can't comment on that but if anyone has a google branded version could you please check and see if you can get ubuntu to recognize it as a modem. if so then we know that it has only to do with the kernel itself.
EDIT: Also I can't get unpack-H.pl to work, i keep getting bash: /home/sammy/android-sdk-linux_x86-1.5_r2/tools/unpack-H.pl: Permission denied
sammypwns said:
again I don't have my magic yet so I can't comment on that but if anyone has a google branded version could you please check and see if you can get ubuntu to recognize it as a modem. if so then we know that it has only to do with the kernel itself.
EDIT: Also I can't get unpack-H.pl to work, i keep getting bash: /home/sammy/android-sdk-linux_x86-1.5_r2/tools/unpack-H.pl: Permission denied
Click to expand...
Click to collapse
right click on unpack-H.pl, set the permissions, and make it executable.
hotweiss said:
This guide shows you how to push the IP tables on the Magic:
http://android-unleashed.com/2008/1...d-g1-phone-with-iptables-no-proxy-needed.html
Click to expand...
Click to collapse
well you dint need go all the steps , just pushing iptables and insmod should be enough if you use wifi tethering app. but is the kernel in htc magic and g1 the same , do they run the same binary ?
i will check it but dont know if it works.
Edit :
No ipfilter in the kernel = not working
the binary itself works just fine (strange)
its because the kernel is missing netfilter too. there are actually 3 things we require for this to work. we need to build netfilter as a module, build iptables as a module and then include the iptables binary so that other programs can talk to it. unfortunately i don't have a magic but if you could pm me your im screen names we could do this faster
sammypwns said:
its because the kernel is missing netfilter too. there are actually 3 things we require for this to work. we need to build netfilter as a module, build iptables as a module and then include the iptables binary so that other programs can talk to it. unfortunately i don't have a magic but if you could pm me your im screen names we could do this faster
Click to expand...
Click to collapse
Things will be complicated by the fact that the Rogers and T-Mobile Magic's are different. I'm still confident that we'll work it out.
hotweiss the google branded ion does not require these modules

[Info/brainstorming] Compiling modules for the 2.6.32 beta kernel OBSOLETE

This thread is now obsolete.
Kernel sources for build 5.26.0 have been released:
https://opensource.motorola.com/sf/go/projects.milestone/frs.milestone_source_froyo
I've pushed some new pre-compiled modules to github, though beware, I haven't had time to test all of them on device yet:
https://github.com/nadlabak/android...mmit/b300803348705d3fc5ce76d8c88d57186748a370
As the kernel sources are not yet available from the Motorola's open source project, here is an outline how I compiled the overclock and cpufreq governor modules. (Btw., the overclock module needed a substantial adaptation, see the source here: http://android.doshaska.net/2.6.32oc )
I'm using the sources from this AOSP repo:
Code:
git clone git://android.git.kernel.org/kernel/omap.git
git checkout --track -b android-omap-2.6.32 origin/android-omap-2.6.32
Use the sholes config:
Code:
make sholes_defconfig
flags that need to be disabled:
CONFIG_LOCALVERSION_AUTO
CONFIG_MODVERSIONS
CONFIG_DEBUG_MUTEXES
CONFIG_SCHEDSTATS
CONFIG_SCHED_DEBUG
[updated on 17.01.2011, thanks go to Skrilax_CZ]
At least the ext2 will work without panics when compiled using this config.
For tun, cifs and nfs there is still some additional config mismatch that prevents the modules to work without null pointer dereference oops.
Also, even when no custom kernel module is used, you can get the kernel panic very easily, try to enable wifi and do:
Code:
cat /proc/kallsyms
If you're interested in a more detailed android kernel compilation guide, you can e.g. roughly follow this Droid kernel guide: http://www.droidforums.net/forum/rescue-squad-guides/31452-how-compile-your-own-kernel.html
Thanks for starting this thread kabaldan! It is a great starting point in tackling the issue of adding tun support to the new kernel (tun.ko module). I am not as good as many others in this, but trying won't hurt. Meanwhile if someone else is working on tun support - share experience here!
If kernel seems to be ok, sometimes mounting with new version of busybox won't work.
I used to get kernel panic when use newer version of busybox (not Android kernel but my own embedded linux)
Hey Nadlabak can you add DLNA function of CM6?
same problem using droidx kernel sources. insmod ok, mount reboots the phone
yantz
I tried droid2 kernel module - doesn't work either
I noticed OpenVPN included in CM6 also relies on this kernel module. Hence doesn't work. I guess we won't (ever) see kernel sources for that leaked kernel we are now using. I assume Motorola will release the sources sooner or later, but not before official Froyo layout. The waiting is killing me! kabaldan, can't you try to do some magic as you did with the overclock module? The beer is from me!!!
Can you test this attached tun.ko?
Insmod is OK, but I currently don't have time for any further tests...
EDIT: don't bother, kernel panic as usual
Module loads fine, but when attempt to use it, phone reboots, just like with the module compiled from DroidX sources..
leobg said:
Module loads fine, but when attempt to use it, phone reboots, just like with the module compiled from DroidX sources..
Click to expand...
Click to collapse
So, I got it loaded - insmod works just great, just like it did on the 2.1 kernel.
I'm trying to use the CM6 built-in OVPN settings, but I can't find any documentation on the setup. How did you get it set up?
I have
/sdcard/openvpn/
cert.crt
ca.crt
config.conf
config.ovpn
pem.key
I realize that config.conf and config.ovpn are the same file- but I use this VPN on windows and on Mac, and I wasn't sure the requirements on Linux.
If I can't find some documentation I'll try downloading the OpenVPN settings app from the market and playing with that.
Also, I don't know if it's true or not, but I heard the Milestone2 source compiled driver could work.
Are you trying the module kabaldan provided? It doesn't seem to work, at least for me. Loads fine, but phone crashes when setting up tun interface. I couldn't get OpenVPN in CM6 0.3 to work so far. I am testing the tun.ko with the cisco vpn package (which worked great on the old kernel with CM6 0.2) vpnc. When I initiate the connection, phone reboots if the attached here tun.ko is used. I also tried with tun.ko compiled from DroidX sources - same thing - phone reboots. I am not sure where did kabaldan take/compile this module from.
Sent from my Milestone using Tapatalk
I was using the same one, I was thinking maybe he could use the info from more than one phone. I'll try get-a-robot or OpenVPN Installer, but I won't hold my breathe. I was just hoping to use the built-in functionality of the ROM.
*edit* Just saw he removed it because it doesn't work yet, oh well.
the kernel doesnt seem to like any other fs not built into it. i've tried several, ext2, ext3, ext4, cifs, jffs, reiserfs etc. all modules would load without a problem but system will reboot during mount. heck i even tried creating logical volume on the partition. volume created fine, but when time to mount, it reboot
i ended up using a 2nd vfat partition for apps2vfat, on top of native froyo move to sd. moved my debian arm there and manually, yes manually, replace many symlinks in libs to copied files
hopefully next froyo release for other regions would provide a different kernel
yantz
hey kabaldan wondering if you've had another chance to look at an updated tun.ko
Finally some breakthrough. The great Skrilax_CZ has made some hard debugging and one very good guess:
CONFIG_DEBUG_MUTEXES must be disabled in the kernel config.
At least the ext2 module compiled this way is working without panics now.
Congrats to Skrilax!
EDIT: Tun nor nfs not tested yet..., cifs unfortunately still not working.
kabaldan said:
Finally some breakthrough. The great Skrilax_CZ has made some hard debugging and one very good guess:
CONFIG_DEBUG_MUTEXES must be disabled in the kernel config.
At least the ext2 module compiled this way is working without panics now.
Congrats to Skrilax!
EDIT: Tun nor nfs not tested yet..., cifs unfortunately still not working.
Click to expand...
Click to collapse
This means that now the app2ext work?
Where are the modules for we test?!
Thanks for the news!
Modules for testing:
ext2 - http://code.google.com/p/cyanogenmod4milestone/issues/detail?id=197#c19
tun - http://code.google.com/p/cyanogenmod4milestone/issues/detail?id=222#c4
Hi sort of a newbie here... So does this mean that data2ext will work?
Sent from my Milestone using XDA App
Hi Nadlabak...maybe you already know.
For the cifs module, how about slow-work is made available as a module.
as is done at this link
http://forum.xda-developers.com/showpost.php?p=9271775&postcount=4
after further testing:
ext2 mounting now works, reading from ext2 partition too, but writing still causes panic
tun causes panic too
Let's hope for a soon kernel source release, as it looks like we won't get much further without it.
edowar: thanks for the link
@kabaldan
Could it be possible to create a swap module for milestone ?
It seems that running kernels does not have this feature yet and i'm not sure motorola to implement it for next 2.2 release so .... well just wondering !

[KERNEL] Sense 2.6.32.24+BFS+HAVS+USB HOST+UVOC+CIFS+NFS+NTFS+TUN

Hello,
I have compiled my own version of the bravo froyo kernel, I have mixed the work of kingklick for the incredible and the work of snq- as the 2.2b-sdfix kernel, changing some defaults voltages and add the Sven Killg's usb-host support. I have also added NFS, tun/openvpn, NTFS, UTF-8 and some usb devices I need. This kernel supports HAVS, that is Hybrid AVS that adjust the CPU voltage based the hardware feedback. In my desire is working quite fine, have no time for battery testing but it seems good. More feedback is welcome!
I am still waiting for an USB OTG Cable, so I cannot test the USB-Host part, it should work without problem following the instructions at http://sven.killig.de/android/N1/2.2/usb_host/ but if you find any problem, report it here.
Changelog:
-gg1:
GPU Fix from snq- and change versioning scheme.
v0.3:
Major change, based on official bravo and mix several patches from different sources. Now the kernel version is 2.6.32.24 and includes lots of changes. BFS, HAVS and more from the kingklick incredible kernel.
v0.2:
Remove usb sound support and add tun.ko for openvpn.
v0.1
I have put back IPv6 support, only 100Kb more and Google Googles works again :-D
Of course thanks to snq-, kingklick, LeeDroid, Sven, Koush and everybody here doing such a great job!
Next step should be a kind of toggle for the usb host mode, something userfriendly...
Any chance for something like this?
Diamondback2010 said:
Next step should be a kind of toggle for the usb host mode, something userfriendly...
Any chance for something like this?
Click to expand...
Click to collapse
The problem is that as far as I know once you have the ehci-ucd module loaded the usb mode change, even if you unload it. Doing an app to load unload all the usb-modules should be trivial, once I get the usb-otg cable I'll try it. Maybe I will code some kind of no-gui just a menu switch-on switch-off app, but doing it blindly would not be very easy :-D
Regards,
with ipv6 removed, google goggles will no longer work. any reason why you removed it? just curious.
Does it work.in hd Rom ?
I flashed it, and it works fine (the usual stuff, that is).
I also went to the linked website, and followed the instructions (though some of it made not much sense).
Then i plugged it into my computer over usb and selected mount as storage, and it mounted - so it didnt work?
Which instructions are the ones we need to follow?
Josh.
w.0.o.t said:
with ipv6 removed, google goggles will no longer work. any reason why you removed it? just curious.
Click to expand...
Click to collapse
Trying to save some bytes, I've put it back as it is only 100Kb more :-D
fllash said:
I flashed it, and it works fine (the usual stuff, that is).
I also went to the linked website, and followed the instructions (though some of it made not much sense).
Then i plugged it into my computer over usb and selected mount as storage, and it mounted - so it didnt work?
Which instructions are the ones we need to follow?
Josh.
Click to expand...
Click to collapse
The instructions about usb host-mode you need a OTG cable and a powered usb hub and then using conectbot or adb through wireless you need to manually load the needed modules, they are all at /system/lib/modules. The minimum is usbcore.ko and ehci-hcd.ko but you will need others to do usefull things. I think that we will need to kill some htc process because it seems that it is accessing the usb in slave mode. Once I'll get the OTG cable I'll try to get further, but right now the usb-host is just supported in the kernel, nothing else.
Regards
kahuna0k said:
Trying to save some bytes, I've put it back as it is only 100Kb more :-D
Click to expand...
Click to collapse
thanks very much. i'm flashing the new one in a minute.
Hy , thanks for u'r work, one more thing can u add support for open-vpn? i flashed u'r kernel but openvpn aint working anymore
thanks
tun module not work,please check
miyu-hitori said:
tun module not work,please check
Click to expand...
Click to collapse
littlej said:
Hy , thanks for u'r work, one more thing can u add support for open-vpn? i flashed u'r kernel but openvpn aint working anymore
thanks
Click to expand...
Click to collapse
new version with tun.ko included
Thank you for very good kernel, but WiFi n?
New version including the snq- gpu fix
kahuna0k said:
New version including the snq- gpu fix
Click to expand...
Click to collapse
so this has BFS scheduler? and does it include the SD read ahead fix?
Hmmm...
I've flashed the kernel but I got an error message when I tried to execute insmod ... ehci-hcd.ko, for the usbcore.ko was ok...
The error says something like "Device or resource busy".
Using Modaco R9 with Sub501 mods (CIFS, Undervolt, CFQ IO Scheduler, Custom governor), baked directly from the Modaco online kitchen.
I really need a help to solve this.
Thank you all!
a question: is bluetooth hid working with this kernel ??
Thanks for this, I LOVE a good kernel for my phone! This feels really nice, not sure if it'll beat out Ziggy's as my favourite but after a few hours I'm loving it!
I'll check back with battery life stats after a day at work
Skilling said:
Hmmm...
I've flashed the kernel but I got an error message when I tried to execute insmod ... ehci-hcd.ko, for the usbcore.ko was ok...
The error says something like "Device or resource busy".
Using Modaco R9 with Sub501 mods (CIFS, Undervolt, CFQ IO Scheduler, Custom governor), baked directly from the Modaco online kitchen.
I really need a help to solve this.
Thank you all!
Click to expand...
Click to collapse
I have the same problem. Please help!!!

Folio 100 - Kernel development

This thread should serve as a general source of information for those patching and extending the kernel.
Anyone who does changes to the kernel should drop a note here (especially on those builds that go into FolioMod or TnT)
I'll also try to keep a list of patches and a current config file in the first post of this thread.
Just to make sure that anyone has a common base, the Folio 100 kernel source can be found at TegraMid wiki: http://tegramid.com/wiki/Main_Page
To upgrade to nvidia-10.9.8 apply the attached patch to the source tree.
Note that the zip file also contains a disabled folder, this contains 3 patches that were NOT applied as they prevent the folio from booting.
There were quite a few changes for handling audio devices, this may fix the issues with bluetooth headsets and sound coming from speaker and headphone (not tested though), also there was a change in some wakeup configuration structure for wlan, so this may also fix the wakeup issue.
Changes from DerArtem to support 3G Modems are not (yet) included in the kernel.
I also had two freezes when booting the system wuith this kernel (system_server not responding) however I could not reproduce them.
OK, I'm stupid!
Forget the patches above, I pushed the updated kernel images to the wrong directory (/sdcard instead of /sdcard/sdcard-disk0) So I was constantly flashing the last plain folio kernel on the device.
Damn you shell scripts!!!
Updated the patches above, the kernel should work and everyone should be able to recompile with the patch applied.
I've also attached a binary for users to test the kernel.
weeds2000 said:
Updated the patches above, the kernel should work and everyone should be able to recompile with the patch applied.
I've also attached a binary for users to test the kernel.
Click to expand...
Click to collapse
How do we install these files? Or do we better just wait for a new foliomod version?
killerbie said:
How do we install these files? Or do we better just wait for a new foliomod version?
Click to expand...
Click to collapse
If you look into update-nvidia-10.9.8.zip file, you could see that it is normal update file for kernel. So that I guess you rename update-nvidia-10.9.8.zip to update.zip and then update as any other update. But you should better always know what you are doing. If not, wait for full foliomod update.
To weeds2000: thanks for keeping kernel repository updated for the others.
weeds2000 said:
Updated the patches above, the kernel should work and everyone should be able to recompile with the patch applied.
I've also attached a binary for users to test the kernel.
Click to expand...
Click to collapse
Hedphones plus speakers issue seem solved, many thanks!
Foliowidget correctly report battery status and AP name but to set buttons light or display properties don't works.
Rom cooking
Most tools found to build Android ROM is for linux .Is there tools to build android ROM in WINDOWS environment?
Rom cooking
Most tools found to build Android ROM is for linux .Is there tools to build android ROM in WINDOWS environment?
This kernel is based on the stock Toshiba Kernel with modifiactions from DerArtem.
I've added UTF8 NLS support as required by the vold patch as well as the lag on wakeup fix.
Could someone please confirm that 3G support is still working with this build. As I don't have a 3G modem I cannot test this.
weeds2000 said:
This kernel is based on the stock Toshiba Kernel with modifiactions from DerArtem.
I've added UTF8 NLS support as required by the vold patch as well as the lag on wakeup fix.
Could someone please confirm that 3G support is still working with this build. As I don't have a 3G modem I cannot test this.
Click to expand...
Click to collapse
i can try install already on folionotion?? just for not reinstall the system..
I cannot guarantee that this works, but in case you cannot boot it should be enough to just flash the ROM again without making a Factory Reset.
Make sure you have an adb connection or some way to get an update.zip to your SD Card in case the device does not boot.
check out wifi drivers from here:
http://git.chromium.org/gitweb/?p=atheros.git;a=summary
is it possible to enable the tunnel support in the kernel?
Has anyone emailed toshiba to request the latest source? it took amout a month to arrive last time (on cd)
Could you please PM me the address you have writen the request to?
I searched the toshiba page yesterday, but couldn't find a developer page or something like that.
Or should I simply contact customer support?
weeds2000, can you attach the precompiled toolchain? i got smp compile error so maybe it is the toolchain im using.
what i did was:
1) download and extract the source
2) download and patch the tegra patch you attached in post 1
3) download the tegra config file you attached in post 1 and extract the config to .config to kernel directory
4) make ARCH=arm CROSS_COMPILE=/path_to_crosstoolchain/arm-eabi-
it was 2am when i did it so maybe i missed something.. lol
EDIT: Nevermind, found the toolchain from android.com.
PS. Anyone happens to have a copy of Tegra 250 technical datasheet?
Hmm.. Cannot get it to boot into OS.. The kernel booted and adb ran..
Also tried the binary you have attached in post #1 but also doesnt boot into OS. Did you get it to boot at your end?
Attached are dmesg and logcat
The image in post #1 should work with FolioMod 1.3. As the display/touchscreen driver seems to have changed it may not work with 1.4.
I'm not 100% sure, but this looks like a problem with the nvrm_daemon binary which is not started or has crashed.
please implemet tun.ko
Hi,
i need the tun.ko for the folio, so i can connect via vpnc to my fritzbox and make phonecalls for free over wlan hotspots. (like i do on my desire)
Please can you provide a tun.ko for this.
Cheers
xoom honeycomb source / git
Just got a note from MCLP on the honeycomb git.
so i downloaded it, and extracted the config.gz from xoom tablet (boot.img, that is) .
the kernel completely compiles without a single error, and no questions on the .config file i used, so the xoom config.gz matches the environment of the git (Koush said he also used it to compile the recovery kernel for xoom)
git is here
View attachment config.zip xoom edition.
now's the question if we can make it run on Folio
update:
removed(too many bugs) is the 2.6.36.3 with the Folio100 ODM_KIT included, i don't see any chance of making it work without, as i read the odmkit, its toshiba custom drivers + tegra for betelguese platform. this is NOT a working source, but inprogress.. but maybe someone else can assist?

[CUSTOM][KERNEL][HOWTO] Droidwall on the Samsung Galaxy Y

Hi there
I got droidwall running on the SGY.
Please first read the whole post. I add changes at the end of it.
Here's what I did:
1. follow this great tut from irfanbagus. Thanks a lot irfanbagus!
2. After running "make bcm21553_totoro_05_defconfig", set this in .config:
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_NETFILTER_XT_MATCH_OWNER=y
and continue irfanbagus's steps
3. Install the new boot.img, e.g. via mai77's method as shown here
4. Profit! (as in: use droidwall )
Notes:
Alternatively the changes in .config could be set in cm21553_totoro_05_defconfig or via make menuconfig
If you don't have your boot.img as a normal file, run this in adb, then pull the file:
dd if=/dev/block/bml7 of=/data/local/boot.img
I was surprised that there was no such modified kernel till now. Maybe this is because the TARGET_REJECT option is essential but only XT_MATCH_OWNER is largely discussed when dealing with droidwall.
See attachment (mikstev_SGY_Kernel_netfilter_for_droidwall_boot.img.zip) for a boot.img with only these modifications.
Please test and report. I only tested blacklist/whitelist mode with Google Play blocked/allowed on Wifi connection, but it worked.
Edit 1: I've added the necessary (and probably some more) modules so that droidwall's logging works. Use the second attached file instead the first one.
Here are the changes I made, compared to normal .config:
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_NETLINK_LOG=y
CONFIG_NETFILTER_XT_MATCH_OWNER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_LOG=y
CONFIG_IP_NF_TARGET_ULOG=y
I guess the first two aren't necessary but I didn't bother to check every single module if it's the correct one which droidwall needs for logging. However this shouldn't matter anyway. See mikstev_SGY_Kernel_netfilter_for_droidwall_with_log_boot.img.zip
Edit 2: Due to request I've added init.d support to the latest release. Thanks irfanbagus! See mikstev_SGY_Kernel_droidwall_initd_boot.img.zip
Edit 2.5: Seems only the following modules are required but that only as a side note:
CONFIG_NETFILTER_XT_MATCH_OWNER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_LOG=y
Edit 3: New method for adding init.d support to a (newest) boot.img, with kernel modules for droidwall (+logging) and init.d scripts to load these modules. Please read the readme, if you have questions, post here. Special thanks to irfanbagus See mikstev_add_initd_to_boot.img__kernel_modules_initd_scripts_for_droidwall.zip
Edit 4: Thanks to an idea by irfanbagus and another tutorial to include init.d support by kurotsugi, here's another release. Adding init.d support is now easier with kurotsugi's method plus there's a update.zip (modules_droidwall_signed.zip) which does the other steps for you (copying the modules, init.d scripts and applying the correct permissions for these files). NOTE: this update.zip is yet untested. If you test it please report. See mikstev_add_initd_to_boot.img__kernel_modules_initd_scripts_for_droidwall_v2.zip
Edit 5: The update.zip from edit 4 seems to work. If you're using a kernel with init.d support you only need to install the update.zip and it should work fine.
good job. i know droidwall depend on other kernel features beside CONFIG_NETFILTER_XT_MATCH_OWNER. since i don't have plan to use droidwall, i don't bother to find it.
Profit indeed! It works! Good job, mikstev! I was able to block dolphin HD on my phone just to test if it works and it did, much to my delight!
And to irfanbagus as well for that wonderful guide on how to compile a kernel.
Great job, guys!
Now let's hope that all the other kernel developers include this small bit of configuration in their builts
finally! ive been waiting for this for ages. thank you very muchhhh!
Sent from my GT-S5360 using xda premium
Logging doesn't work yet. I'll try the solution from highlandsun: http://forum.xda-developers.com/showpost.php?p=11110889&postcount=357 tonight and upload new kernel if successful.
No need for so much hassel
Just use "lbe privacy guard" (free in store) it has much more features than droidwall and it doesnt require any special kind of kernel.
Y u no press "thanks"!?
Sent from my GT-S5360 using XDA
Ok, logging works now, I'll upload the new kernel. See first post.
devilrulz4ever said:
No need for so much hassel
Just use "lbe privacy guard" (free in store) it has much more features than droidwall and it doesnt require any special kind of kernel.
Y u no press "thanks"!?
Sent from my GT-S5360 using XDA
Click to expand...
Click to collapse
It seems that there're at least some people who see this differently. Here're some of my reasons, why I prefer droidwall over LBE Privacy Guard:
- it's a good and easy to use firewall. Not more, nor less. That's what I want.
- no "hassel" (to use your words) with resticting internet access of "trusted" apps
- I did not find a way in LBE to block LBE from using internet. In the iptables rules created by Droidwall I can clearly see that droidwall is not allowed = blocked
@mikstev: I'm just curious...is it based on sgy's newest kernel?
I think so, the source code is the one mentioned in irfanbagus' post (update2) which I linked above.
nice...I can integrate dualboot and data-2sd mod into this kernel easily. thx
i got other option to make droidwall work.
on init.rc i added this line:
service netfilter /system/bin/iptables
disabled
oneshot
this also work with avast firewall..
gear12 said:
i got other option to make droidwall work.
on init.rc i added this line:
service netfilter /system/bin/iptables
disabled
oneshot
this also work with avast firewall..
Click to expand...
Click to collapse
Can anyone confirm this? I can't see how this could replace the missing kernel modules.
mikstev said:
Can anyone confirm this? I can't see how this could replace the missing kernel modules.
Click to expand...
Click to collapse
nope. iptables only a user space application that depend on kernel features. and you can't call iptables without command/params.
the firewall works great, also, I can see the logs but after disconnecting from the internet and a few minutes the log is empty again, is this normal or a bug?
off topic:
and can I make a request? can you make the your boot.img support init.d as well? please...
Adam_Blade said:
the firewall works great, also, I can see the logs but after disconnecting from the internet and a few minutes the log is empty again, is this normal or a bug?
Click to expand...
Click to collapse
Yep, I noticed this too. The droidwall source seems ok at first glance and I don't think it's related to the netfilter modules etc. My guess would be that it's dmesg's fault, maybe the log is truncated or something but this is just speculation. I'll investigate in this in a few days. Maybe someone else knows why this happens?
Adam_Blade said:
and can I make a request? can you make the your boot.img support init.d as well? please...
Click to expand...
Click to collapse
Sorry, I currently don't have the necessary skills, so if you're looking for a quick solution you might better ask someone else for help. (Especially since there're already kernels with this feature and including the modifications for netfilter/droidwall should be trivial). However as I wanted to build up my knowledge regarding android/kernel development anyway, I'll try to add this feature one time, but that surely would take >1 week.
Regarding dmesg: the buffer size is set by CONFIG_LOG_BUF_SHIFT=19 which means 2^19 Bytes = 512KiB. I'll check later if this relatively huge size is really used up.
@mikstev: make init.d support kernel is easy. we only have to add a few script inside init.rc file. we can do it easily by using dsixda's kitchen or put the script manually. you can see my modified init.rc here http://www.mediafire.com/?cc1kg8s7cx27onb
I believe the script that have to be added is
service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
disabled
oneshot
Just to get sure: the init.rc which needs to be modified is the one in the initial ramdisk and not in the kernel (zImage), right?

Categories

Resources