Pavel Korban Pavel Korban - 1 year ago 183
Android Question

How to start daemon on android by adb

Can you help me please, my head is swollen...

I am trying to run daemon on android emu/device by command:

adb -s <device_name> shell su -c /dir/daemon <port_number>

but nothink happens, and no errors!

If I do:

adb -s <device> shell

and then form shell cmdline:

su -c /dir/daemon <port_number>

than its work fine. I try use shell-script and run:

adb -s <device_name> shell sh su -c /dir/ <port_number>

and I even try to generate script from Qt code with port number and use:

adb -s <device_name> shell sh su -c /dir/

but its not helped... problem that if I enter to adb shell previous to run daemon - its work. Another problem is on different device/emu/iso_image different command format could not work. For example:

adb -s <device_name> shell su -c /dir/daemon <port_number> // work at emu, but not at iso

and vice:

adb -s <device_name> shell su -c "/dir/daemon <port_number>" // work at iso


Everybody can answer what's the matter?

Sorry for my english

Answer Source
adb shell su -c "/dir > /dev/null 2> /dev/null < /dev/null &"


shell su -c /data/local/tmp/

/data/local/tmp/daemon <portn_number> & 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download