local: Fix up build with device listing

This makes Linux and Android builds work. Needs to be tested and tweaked
for OS X.