Also modifing /system access I'm not able to mv iptables from /data
to /system(i take an error : cross-device link).
I don't understand if I have to put into emulator also objs folder and
lib folder, or is it sufficient only to put iptables file.
Another question is as follows.
to compile iptables via NDK-build, I had to create a folder "jni" and
move into it all the files of iptables.
Is this procedure correct?



On Oct 26, 9:22 pm, Antonio Conforti <[email protected]> wrote:
> I change permission of /system from ro to rw as follow:
> ./adb shell
> #su
> #mount or #cat /proc/mounts
> rootfs / rootfs ro 0 0
> tmpfs /dev tmpfs rw,mode=755 0 0
> devpts /dev/pts devpts rw,mode=600 0 0
> proc /proc proc rw 0 0
> sysfs /sys sysfs rw 0 0
> none /acct cgroup rw,cpuacct 0 0
> tmpfs /mnt/asec tmpfs rw,mode=755,gid=1000 0 0
> none /dev/cpuctl cgroup rw,cpu 0 0
> /dev/block/mtdblock0 /system yaffs2 ro 0
> 0<-----------------------------------------------------/system folder
> is read-only
> /dev/block/mtdblock1 /data yaffs2 rw,nosuid,nodev 0 0
> /dev/block/mtdblock2 /cache yaffs2 rw,nosuid,nodev 0 0
> /dev/block/vold/179:0 /mnt/sdcard vfat
> rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allo­w_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors­=remount-
> ro 0 0
> /dev/block/vold/179:0 /mnt/secure/asec vfat
> rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allo­w_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors­=remount-
> ro 0 0
> tmpfs /mnt/sdcard/.android_secure tmpfs ro,size=0k,mode=000 0 0
>
> #mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
> #mount
> rootfs / rootfs ro 0 0
> tmpfs /dev tmpfs rw,mode=755 0 0
> devpts /dev/pts devpts rw,mode=600 0 0
> proc /proc proc rw 0 0
> sysfs /sys sysfs rw 0 0
> none /acct cgroup rw,cpuacct 0 0
> tmpfs /mnt/asec tmpfs rw,mode=755,gid=1000 0 0
> none /dev/cpuctl cgroup rw,cpu 0 0
> /dev/block/mtdblock0 /system yaffs2 rw 0
> 0<------------------------------------------------------now /system
> folder is read-write
> /dev/block/mtdblock1 /data yaffs2 rw,nosuid,nodev 0 0
> /dev/block/mtdblock2 /cache yaffs2 rw,nosuid,nodev 0 0
> /dev/block/vold/179:0 /mnt/sdcard vfat
> rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allo­w_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors­=remount-
> ro 0 0
> /dev/block/vold/179:0 /mnt/secure/asec vfat
> rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allo­w_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors­=remount-
> ro 0 0
> tmpfs /mnt/sdcard/.android_secure tmpfs ro,size=0k,mode=000 0 0
>
> On 26 Ott, 13:51, Hamilton Vera <[email protected]> wrote:
>
>
>
> > Probably /system is mounted as read only.
>
> > One quick workaround that you can use is to put your files into
> > /sdcard, ie /sdcard/iptables and export some parameters like:
>
> >     export PATH /sdcard/iptables/
> >     export LD_LIBRARY_PATH /sdcard/iptables/lib
>
> > Unfortunately, as far as I know, deal with emulator images is a crafty
> > job. But if you discover how to mount the images and edit the files
> > you can edit init.rc and change how android mounts /system;
>
> > []'s
>
> > Hamilton Vera
>
> > On Tue, Oct 26, 2010 at 7:40 AM, Antonio Conforti <[email protected]> wrote:
> > > Thanks Brad and Hamilton for your answers. I have lunched iptables.
> > > But I have other doubts:
> > > I have compiled my iptables source obtaining two folder(one called
> > > libs and the second obj), so I take libs/armeabi/iptables file and put
> > > it into data from ./adb tool. I tried to move iptables file from data
> > > to /system/bin in the emulator or put this file directly from ./adb
> > > push to /system/bin but it isn't possible!!!
> > > How can I do it?
> > > At this moment,If I want to launch iptables command I have to go into
> > > data folder and write command like this:"./iptables -v"
>
> > > On 19 Ott, 19:26, Brad Davis <[email protected]> wrote:
> > >> If you have the Android kernel tree from "git" you can use the "make
> > >> menuconfig" command to set the kernel compile-time parameters
> > >> (including netfilter and iptables).  Android uses a slightly modified
> > >> Unix file tree structure where /system is prepended to the standard
> > >> Unix tree structure.  Most of the userspace C/C++ programs are in /
> > >> system/{bin,lib,xbin}.  (While there is /system/usr, there is not a
> > >> system/usr/{bin,sbin}).
>
> > >> Your userspace executables should be built like the other userspace
> > >> executables (they can be dynamically linked against the libraries in
> > >> the build tree).
>
> > >> Your executables should probably go in /system/bin, libraries in /
> > >> system/lib.  These directories are protected from writing by normal
> > >> Android applications.
>
> > >> On Oct 18, 1:08 pm, cox85 <[email protected]> wrote:
>
> > >> > Thanks Brad. I am doing the thesis on Android kernel.
> > >> > I have already created a Netfilter module for Linux Kernel, but in
> > >> > Android is a little more complex.
> > >> > I have downloaded iptables source from android kernel source, but how
> > >> > can i compile it?
> > >> > I have to create only a Makefile?And I have to compile with static
> > >> > mode?
> > >> > Where I have to put my userspace program iptables?
>
> > >> > On Oct 16, 5:02 am, Brad Davis <[email protected]> wrote:
>
> > >> > > In the kernel you need to enable Netfilter and all the IP Tables 
> > >> > > stuff
> > >> > > under that (you should look at the configuration of a kernel that
> > >> > > supports iptables).  Then you need to port the userspace program
> > >> > > iptables (including the libraries that aren't part of Android).
>
> > >> > > If you don't know what you are doing, you should practice first on a
> > >> > > standard Linux distribution where you have the full support of the OS
> > >> > > to debug your hacks.  Android isn't made to learn kernel hacking on.
>
> > >> > > On Oct 15, 4:59 am, cox85 <[email protected]> wrote:
>
> > >> > > > Thanks for the answer. But my kernel still not support iptables. I
> > >> > > > have recompiled the kernel, with, command make menuconfig, adding
>
> > >> > > > general setup->"kernel-> user space relay support (formerly 
> > >> > > > relayfs) "
>
> > >> > > > What I have to modify to enable iptables?
>
> > >> > > > On 13 Ott, 18:49, Brad Davis <[email protected]> wrote:
>
> > >> > > > > Android is (simply) a Linux kernel, some (not all) modified BSD
> > >> > > > > userspace, and the Android Java system.  If you want Linux 
> > >> > > > > userspace
> > >> > > > > you will need to add Linux userspace programs to your build.
>
> > >> > > > > On Oct 12, 11:17 am, cox85 <[email protected]> wrote:
>
> > >> > > > > > I want to create a netfilter kernel module and I am new in 
> > >> > > > > > android
> > >> > > > > > world.
> > >> > > > > > I have downloaded android kernel and I have make my own 
> > >> > > > > > kernel, but I
> > >> > > > > > can't found in ADB shell iptables command.
> > >> > > > > > I use android goldfish because i have only the emulator
> > >> > > > > > What I have to do to enabling iptables command?
> > >> > > > > > Antonio Conforti- Hide quoted text -
>
> > >> > > - Show quoted text -
>
> > > --
> > > unsubscribe: [email protected]
> > > website:http://groups.google.com/group/android-kernel
>
> > --
> > Hamilton Vera
> > int Administrator (char Network[],char 
> > ComputationalSystems[])http://hvera.wordpress.com- Hide quoted text -
>
> - Show quoted text -

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-kernel

Reply via email to