Forum Discussion

prasad_kumar_s's avatar
prasad_kumar_s
Contributor
12 years ago

Shell execute returns error device not found

I need to get the cpu usage and memory usage by the device. 



i tried to execute adb shell command. 



mobile.Device.ShellExecute("adb shell dumpsys meminfo")



but the result returned is :




The shell command 'adb shell dumpsys meminfo' was executed. The result of this command is '* daemon not running. starting it now on port 5038 *

* daemon started successfully *

error: device not found

'.





The same command executes fine trhough the command prompt, and the details are returned.



Can anyone please help why i am recieving device not found error?



Regards

Prasad

 

1 Reply

  • it was my mistake. code should have been like



    mobile.Device.ShellExecute("dumpsys meminfo")