I have dnsmasq available on my Android (stock ROM 4.4.2 Note2) and would like to know how I can tell if it's running and what settings its currently using?
2 Answers
If you're rooted, go to /system/bin/
and find dnsmasq
if it's in there. Alternatively, you can also check /xbin
(but, that's unlikely to be there).
If you managed to find one in either path - you now use a terminal emulator and type su
first and enter, then type dnsmasq -d
to see if the process will be invoked properly. It should also run with its default settings depending on how it was compiled.

- 15,988
- 10
- 74
- 123

- 11
- 1
I can't tell you exactly for the settings, but here's an approach that basically should work for any app:
What you will need
Either a terminal app, or an adb connection to the device. Be able to work with the command-line.
Alternatively, for parts of the tasks there are apps available to monitor system resources.
What to do
At the shell prompt, you can check for active processes using the ps
command. You can filter the output using grep
. Assuming you know the package name (you can find it in the app's Playstore URL, right after the id=
), and let's say it's com.foobar
:
ps | grep "com.foobar"
would either show all processes of the com.foobar
app – or nothing (if it's not running).
As for the settings, that's not that easy to determine. Depending on the app, these are either stored in a database, in the apps "shared preferences", or in both – all those stored below /data/data/com.foobar
in our example case, which only root or the app itself has access to.
So if the device is rooted, you could try to directly access the corresponding files in /data/data/com.foobar/database/*
and /data/data/com.foobar/shared_prefs/*
, and investigate the files – using SQLite3 (or one of its GUIs) for the database files, and some XML viewer for the shared preferences.

- 91,166
- 73
- 343
- 943
ps
. – Izzy Dec 23 '14 at 21:22ps > ps.txt
), and investigate that for what might be the one. I'm not sure whether the-f
and-F
parameters are available (full/extra full output) for additional details, but you might try. – Izzy Dec 24 '14 at 09:50ps dns
(if you've meant that literally), 'dns' would have been understood as options to ps – not a "parameter to look for". See my previous comment: either redirect the output ofps
to a file (which you then can investigate), or pipe it to grep (e.g.ps | grep dns
). – Izzy Dec 26 '14 at 20:04ps
on my Linux machine. Sorry for the confusion! – Izzy Dec 26 '14 at 20:58