Porting iw tools to Android

0.Introduce

This posts is a guide for porting iw to Android ICS.

iw is a new utility for wireless devices on Linux. It developed by linuxwireless.org.

You can see more detail about how to use it in here.

1.Build requirements: libnl

Frist, you need Grab the tree for libnl:

Be sure to make ANDROID_PATH point to your android build environment.

Download the android.sh, and apply it.

Apply this libnl.patch to your ./lib/Makefile and build it.

It will have error happen during the compile process, but if you’re lucky enough, you will find 4 file in ./lib folder (libnl.a libnl-genl.a libnl-nf.a libnl-route.a) . That is exactly what we want. We will static build iw, and wrap those files in iw.

2.Build iw

Make $LIBNL point to your libnl folder.
Download the iw.patch, and apply it to iw/Makefile

Finally, we get iw binary file in current folder, if you want know more detail, please read the 2 patch file and android.sh. All compile progress was run in Ubuntu 10.10. Hope you lucky.

* The iw’s Makefile is very unfriendly for cross compile.

* You can add V=1 option when build Android. This option will let build process output full command, I collected all output compiler options and put them in Android.sh.

* Also you can just download this binary file on iw.tar, which is I compiled for my android ics. Hope you lucky enough.

19 thoughts on “Porting iw tools to Android

  1. DK

    an error occur when excute “configure” in step1

    configure: error: unrecognized option: `-I/home/dangku/samsung/lenovo/basewin/A2105/bionic/libc/arch-arm/include\’

    Reply
    1. Kevin Post author

      You can try to run the options of the android.sh file in command line. Don’t source the android.sh

      Reply
  2. Flow3d

    Hey,
    trying to compile using your instructions…
    you have some excessive \’s in your script and you don’t really use the $ANDROID_PATH, you might want to fix that..
    but never mind that, I’m now at the stage where it tells me the test binaries can’t be run and that I should use –host to set the target… what did you put there? it seems a bit backwards to my intuition (build should be android and host should be i686, isn’t it?)

    Reply
    1. Flow3d

      I’ve guessed –host=arm

      applied the patch manually :)
      got only 2 out of 4 =\
      missing libnl-nf.a libnl-route.a..

      Reply
    2. Kevin Post author

      Thank you remind me about the $ANDROID_PATH things, I will fix it. I upload the iw’s binary file on this page, It should be ok on android ICS. You can try it.

      Reply
  3. Pingback: how to install and build “iw” for android 4.1? | BlogoSfera

  4. Pingback: compile and build “iw” for android 4.1 device? | BlogoSfera

  5. Pingback: porting wireless package to android need new ROM? - How-To Video

  6. Pingback: how to install and build “iw” for android 4.1? [closed] | Question and Answer

  7. Wei Si

    Hi,
    Could you show me how to add iw support into android source code “external” directory? I need iw as a part of android system not as an external binary. Thanks in advance!

    Reply
  8. Pingback: Homepage

  9. Pingback: więcej

  10. Pingback: more information

  11. Pingback: SignUp Today

  12. amit

    Hi,
    the pre-built binaries looks to be broken as the tar package is bad.

    Is there any other android arm package to try?

    Thanks,
    Amit

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">