Home

Better Android Support!

One of the harder things about GNU Radio on a new system is building the dependencies. That was a large part of my task when getting GNU Radio for Android working. All of the required dependencies needed to build rebuilt using the Android toolchain, which meant that for each dependency, I had to figure out how to set up and call the NDK properly. That was hard, and good thing that there were quite a few hints on the Internet for various programs like Boost and LibUSB. For a while now, I've had information on how to build all of the dependencies for Android on our Android support page. This includes a page dedicated to building the basic libraries and dependencies as well as a page discussing how to build VOLK, GNU Radio, GRAnd, and gr-osomosdr.

It seemed like very few people could follow this through and successfully rebuild all of these packages themselves. And that's fair because I had only ever done this on my machines which are both running the same version of Ubuntu Linux (15.10) and everything else. It's hard to say how any deviations from these versions might affect things. So to help with this issue, I just published two new tools to help people get started.

Tarball of Dependencies

The first tool, which should be the go-to for anyone wanting to get up and running immediately, is a tarball of all of the pre-built dependencies as well as all of the GNU Radio support packages. You just download this, untar/uncompress it (into /opt/grandroid, generally, since that's where I tell everyone to look for this stuff), and now you're ready to start building Android apps and linking to GNU Radio. Bam. Done. The GNU Radio team also has a GPG key for signing, so you can get the public key, download the signature for the tarball and verify your download.

The tarball contains a MANIFEST.txt file that describes what's been built and packaged into this tarball. As of writing this, it looks like:

Boost: 1.58.0
FFTW: 3.3.4
OpenSSL: 1.0.2
Thrift: 0.9.3
ZeroMQ: 3.2.4
LibUSB: v1.0.19-and5
RTL-SDR: b829664e85ae67a35c06f09ffbc16207f4001324
UHD: 4e64eb4888ecbe159af290482615b518ca835682
VOLK: 9b3c79afe34ea6a9dbf20e5c25afa7b5038119bd
gr-omsosdr: 8c01b772ef20bb718902a4e613554bd705010131
GNU Radio: b7870d6cc1b984e44044fa60240e4ad77c8ccd45

For versioned packages, that version is given. For the other packages, these are generally projects that we had to hack to get to work under Android, so these are the git refs for my android branches of these projects.

Do-It-Yourself Script

Some people are (justifiably) paranoid about taking pre-built binaries, even if they are signed. To help them, I've also published the script that I used to build the tarball of binaries. This basically takes the instructions that I made on the wiki pages and puts it into a much better package and slightly more robust way of building things yourself.

Speaking of paranoia, the script will ask you to enter your admin password because it will run sudo to create the directory ($PREFIX). If you look at the script, you see these three lines:

sudo mkdir -p ${PREFIX}
sudo chown $USER:$USER -R ${PREFIX}
sudo -K # invalidates credentials for anyone paranoid

It creates the directory $PREFIX, assigns it over to the user that called this script, and then uses the -K to invalidate the sudo credentials so it won't be able to do anything else as the superuser after this.

The script is only tested on Ubuntu 15.10 (64-bit).

Available GNU Radio Components

When we build GNU Radio, we turn off a lot of extraneous components that aren't necessary or even useful on Android, like GRC or the QT and WX widgets. What is built includes:

  • gnuradio-runtime
  • gr-blocks
  • gr-fft
  • gr-filter
  • gr-analog
  • gr-digital
  • gr-channels
  • gr-zeromq
  • gr-uhd
  • gr-ctrlport (with Thrift support)
  • Static libraries for each component

And also VOLK and gr-osmosdr separately. The GRAnd package provides audio sources and sinks for use under Android.

The one final GNU Radio component that I feel should be added here is gr-fec. However, right now, that requires GSL, which we have not yet built for Android.