aircrack-ng (plus other tools) and jamvm



  • Dear all,

    I had the first onion released and was able to install wireless tools such as airmon-ng etc. using the following commands:

    opkg update
    opkg install wireless-tools
    opkg install tcpdump
    opkg install aircrack-ng
    

    However, I just tried to do this on the new Onion Omega Plus 2, and only wireless-tools works.

    I've also read that a stripped down version of Java is available named jamvm.

    However, opkg install doesn't work with tcpdump, aircrack-ng or jamvm.

    Can anyone help out here? I have the latest up-to-date firmware:

    Codename	Ando
    Model	Onion Omega2+
    Revision	R1
    Firmware	0.1.7 (b139)
    Latest Firmware	0.1.7 (b139)
    

    ... and have ran opkg update, so would appreciate some pointers in the right direction. For what it's worth I originally for the information from this page on how to install the air tools: https://community.onion.io/topic/248/iwconfig-and-tcpdump-for-omega/2

    Thanks in advance.



  • @Richard-Zendog Enable the LEDE-repositories in /etc/opkg/distfeeds.conf , the Onion-repos have a very small selection of stuff in them. You will find jamvm, tcpdump and aircrack-ng in the LEDE-repos.



  • Thanks @WereCatf,

    I have now successfully installed all the air* tools and tcpdump etc.

    JamVM worked too; I have have it present in /usr/bin/jamvm. However, when I tried running a simple hello world class against it, it failed, stating:

    jamvm HelloWorld
    Exception occurred while VM initialising.
    java/lang/NoClassDefFoundError: java/lang/Class
    

    So I did a bit of reading and found that I needed classes.zip specified on the bootclasspath - so I tried:

    jamvm -Xbootclasspath:/usr/share/jamvm/classes.zip:. HelloWorld 
    Exception occurred while VM initialising.
    java/lang/NoClassDefFoundError: java/lang/Class
    

    Also tried using -classpath option specifying classes.zip, again no success. I've read of other people having jamvm work on an Onion, so again perhaps I am missing some configuration?



  • One thing to note - jamvm -version reports:

      jamvm -version
      java version "1.5.0"
      JamVM version 2.0.0
      Copyright (C) 2003-2014 Robert Lougher <rob@jamvm.org.uk>
    
      This program is free software; you can redistribute it and/or
      modify it under the terms of the GNU General Public License
      as published by the Free Software Foundation; either version 2,
      or (at your option) any later version.
    
      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU General Public License for more details.
    
      Build information:
    
      Execution Engine: direct-threaded interpreter with stack-caching
      Compiled with: gcc 5.4.0
    
      Boot Library Path: /usr/lib/classpath
      Boot Class Path: /usr/share/jamvm/classes.zip:/usr/share/classpath/glibj.zip
    

    However, there is no /usr/lib/classpath or /usr/share/classpath/glibj.zip. classes.zip does exist however.

    Also I noted that when it was installed, opkg reported:

      opkg --force-depends install jamvm
      Installing jamvm (2.0.0-1) to root...
      Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/packages/jamvm_2.0.0-1_mipsel_24kc.ipk.
      Configuring jamvm.
      Collected errors:
       * satisfy_dependencies_for: Cannot satisfy the following dependencies for jamvm:
       * 	classpath * 
    

    So I guess there's an issue. If any body knows how to fix this I'd be really grateful.



  • One last thing - it turns out some of my package signatures are failing:

    opkg update
    ...
    Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/onion/Packages.gz.
    Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/onion/Packages.sig.
    Signature check failed.
    ...
    Collected errors:
     * opkg_download: Failed to download http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/onion/Packages.gz, wget returned 8.
     * opkg_download: Failed to download http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/onion/Packages.sig, wget returned 8.
    

    Perhaps this is failing to obtain the GNU classpath project?



  • @Zendog This surprises me. I have successfully installed and used jamvm on the Omega1 - maybe classpath package is not available (yet) for the Omega2 - will be checking all this out myself some time in the future



  • @Kit-Bishop thanks - I've seen your posts on here and it was on my mind to post to one of your other threads, so thanks for letting me know.

    Is there any chance you could tell me the approximate size of the glibj.zip and /usr/lib/classpath folder, please? I am wondering if it's because there's not enough disk space on the Omega Plus 2? I have 16Mb left. Having said that, I cannot seem to find the classpath project in the repositories.

    If it's a size issue I am thinking of adding USB next (the SD card does not apparently work on the Omega Plus 2 yet).

    Getting Java to work on this amazing little bit of kit would be a real bonus since it would save us having to re-write our code in Python (which would be OK, I'd just rather not have to do it!)



  • @Zendog Possibly?

    I know that on the Omega1, there was not enough disk space to install jamvm and classpath.
    On my Omega1, I extended my disk space with a USB drive by using the pivot-overlay method as described in the instructions in https://wiki.onion.io/Tutorials/Using-USB-Storage-as-Rootfs
    This worked well on the Omega1

    However, I understand from other recent posts that this doesn't seem to work with the Omega2
    I have only very recently received my Omega2+ but sadly due to work pressures, I haven't had much time to play with it yet.

    I suspect that the best advice would be from the Onion Omega devs. I have always found @Lazar-Demin very helpful in these things and notice that he has resurfaced recently on these forums. Though is still pretty swamped with release issues etc.

    Hopefully, some advice and/or documentation will be forthcoming soon from them on the best way to increase disk space on a USB for Omega2



  • Thanks @Kit-Bishop,

    well it seems that I am in an impasse here, because:

    • the SD card storage does not work;

    • From what you say, the /overlay USB solution does not work; and

    • classpath will not install

    So from the above first two points, I have no storage to work with to test if the classpath issue is a storage problem. I suspect it's not from the error message about not finding classpath, and I've had no success searching through the repo links. Perhaps there's a missing repo in the equation?

    I too am a bit busy for the next few weeks, but will try and contact the Onion contact you mentioned. I'll post back here if I find anything out. I read somewhere the classpath project took up about 9Mb in which case it should be workable. Perhaps other Onioneers will post with their success or failure regarding this matter too.

    Just to note that I've commented out all repos in the distfeeds.conf, so it 'should' work. Time will tell.



  • All, apologies, regarding the last paragraph of my post should read "uncommented", not "commented out", for clarification.



  • @Zendog As far as I aware from recent posts, SD card storage should now be working with recent release - see https://community.onion.io/topic/1282/omega2-reboot-and-sd-card-fixed

    However, I don't think this is sufficient. While one could use the SD card for storing files, what is needed is for the Omega OS to actually use this for system storage space - which is what pivot-overlay does - but as above, we still need authoritative information on how to do this or the Omega2



  • Thanks for the link @Kit-Bishop, That's odd; I read the post about the new firmware, revision 143; when I do a firmware update on my Onion, it states there's no update (and I'm on 0.1.7, b139).

    I'll wait until later and try again.



  • @Zendog You can install manually (but make sure you choose the correct version from the repo) . I see that the SD card is recognised, but I don't know how to use it as I can't find any guidance.



  • @Steve-Smythe thanks for that, I'll give it a try.

    If you card is recognised and it's ext4, I am hoping it's as easy as "mount /dev/[sd_x] /mnt/sdcard", providing you've created your /mnt/sdcard directory and that [sd_x] represents the device it's located at. Hoping to try this myself soon!



  • @Kit-Bishop I haven't received my Onion2s yet, but I do have experience with JamVM and Classpath on OpenWRT (from which the LEDE packages surely come from). I use jamvm + classpath on a Carambola2; but I shrink glibj.zip by unpacking it and re-packing it with only the classes my application needs, as part of my custom image.

    Here's a bit of advice: the 'normal' compression of glibj.zip causes glibj.zip to get bigger when included in a squashfs image. You get a smaller squashfs image if you use compression level 0 when building glibj.zip. I also measure slower class loading time with normal compression - which makes sense, more data has to be read from the squashfs image flash and uncompressed, then it has to be uncompressed again.



  • @Dana-Myers Thanks - that's interesting/useful information - will follow it up :-)

    @Zendog In relation to my earlier comment:

    However, I don't think this is sufficient. While one could use the SD card for storing files, what is needed is for the Omega OS to actually use this for system storage space - which is what pivot-overlay does - but as above, we still need authoritative information on how to do this or the Omega2

    You might want to keep an eye on what I have just posted here: https://community.onion.io/topic/1083/omega2-plus-sdcard-not-working/47



  • In relation to using pivot-overlay (and/or pivot-root) on the Omega2 to get more system disk space using a USB drive (or SD card?), see my recent post https://community.onion.io/topic/1295/more-system-disk-space-using-pivot-overlay-and-pivot-root-on-the-omega2



  • @Zendog said in aircrack-ng (plus other tools) and jamvm:

    All, apologies, regarding the last paragraph of my post should read "uncommented", not "commented out", for clarification.

    You can edit your own written posts ! see:
    reply quote /\ 0 \/ (click on 3 dots)



  • Thanks for all the help and advice, folks.

    OK, so I finally got round to attempts to run airmon-ng and associated tools - failed at the first hurdle. This worked as intended with the Omega 1.

    Here's what I ran - standard sequence in monitoring:

    First, check all interfaces (including non-wireless) to get some basic information - after running ifconfig, here's what iwconfig produces (I removed the H/W address and other fields and replaced it with the text [omitted]:

    iwconfig 
    eth0.1    no wireless extensions.
    
    lo        no wireless extensions.
    
    ra0       RTWIFI SoftAP  ESSID:"OMEGA-091B"  
              Mode:Managed  Channel=11  Access Point: [omitted]   
              Bit Rate=72 Mb/s   
              
    eth0      no wireless extensions.
    
    br-wlan   no wireless extensions.
    
    apcli0    RTWIFI SoftAP  ESSID:"[omitted]"  
              Mode:Managed  Channel=11  Access Point: [omitted]
              Bit Rate=72 Mb/s  
    

    Looks good. I don't need the AP, so let's switch that into monitor mode - running check kill first:

    airmon-ng check kill
    ps: unrecognized option: A
    BusyBox v1.25.1 () multi-call binary.
    
    Usage: ps 
    
    Show list of processes
    
    	w	Wide output
    ps: unrecognized option: a
    BusyBox v1.25.1 () multi-call binary.
    
    Usage: ps 
    
    Show list of processes
    
    	w	Wide output
    ps: unrecognized option: a
    BusyBox v1.25.1 () multi-call binary.
    
    Usage: ps 
    
    Show list of processes
    
    	w	Wide output
    ps: unrecognized option: A
    BusyBox v1.25.1 () multi-call binary.
    
    Usage: ps 
    
    Show list of processes
    
    	w	Wide output
    

    This doesn't look good. Well, it was never required to run check kill on the Omega 1; so just try to start airmon-ng up:

    root@Omega-091B:~# airmon-ng start ra0
    ps: unrecognized option: A
    BusyBox v1.25.1 () multi-call binary.
    
    Usage: ps 
    
    Show list of processes
    
    	w	Wide output
    ps: unrecognized option: a
    BusyBox v1.25.1 () multi-call binary.
    
    Usage: ps 
    
    Show list of processes
    
    	w	Wide output
    ps: unrecognized option: a
    BusyBox v1.25.1 () multi-call binary.
    
    Usage: ps 
    
    Show list of processes
    
    	w	Wide output
    
    
    Interface	Chipset		Driver
    
    ra0		Unknown		Unknown (MONITOR MODE NOT SUPPORTED)
    apcli0		Unknown		Unknown (MONITOR MODE NOT SUPPORTED)
    
    
    

    One last (in)sanity check:

    iw dev
    nl80211 not found.
    

    So it appears that the chipset is unknown and the driver does not support monitor mode. These are completely different results to running this on the Omega 1; what's changed with the Omega Plus 2?

    Based on this link: http://superuser.com/questions/958889/nl80211-not-foundhow-resolve-this-error-in-openwrt I decided to try to install some packages that might be missing:

    opkg install libnl
    Installing libnl (3.2.29-1) to root...
    Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/base/libnl_3.2.29-1_mipsel_24kc.ipk.
    Installing libnl-route (3.2.29-1) to root...
    Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/base/libnl-route_3.2.29-1_mipsel_24kc.ipk.
    Installing libnl-nf (3.2.29-1) to root...
    Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/base/libnl-nf_3.2.29-1_mipsel_24kc.ipk.
    Configuring libnl-route.
    Configuring libnl-nf.
    Configuring libnl.
    root@Omega-091B:~# iw dev
    nl80211 not found.
    root@Omega-091B:~# opkg install libnl-tiny
    Package libnl-tiny (0.1-5) installed in root is up to date.
    root@Omega-091B:~# opkg install kmod-cfg80211 
    Upgrading kmod-cfg80211 on root from 4.4.39+2016-10-08-1 to 4.4.42+2016-10-08-1...
    Downloading http://downloads.lede-project.org/snapshots/targets/ramips/mt7688/packages/kmod-cfg80211_4.4.42+2016-10-08-1_mipsel_24kc.ipk.
    Collected errors:
     * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-cfg80211:
     * 	kernel (= 4.4.42-1-557efab86194dc97ae77e77091717813) * 
     * opkg_install_cmd: Cannot install package kmod-cfg80211.
    
    

    New to all this so a bit left shooting in the dark. I've installed a fair bit recently so might do a factory reset, try and get the 143 firmware update and see what happens.

    All help and hints greatly appreciated.



  • OK, I've updated the firmware from 0.1.7 (b139) to 0.1.8 (b147) using the download file omega2p-v0.1.8-b147.bin

    Still no successes; jamvm will still not install due to missing classpath, and airmon-ng still reports that the chipset and drivers are unknown for the wireless interfaces.

    I'll keep checking and update here unless any of you folks have advice on the matter.


Log in to reply
 

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.