How to run android shell commands in appium test cases?
<p>I am new to Android and Appium. I have a java test case that uses Appium. 
It performs actions like scroll, tap etc using Appium driver commands. 
In this test I need to report the value of the CPU Util of tha Application. I found this peice of code online. </p>

<p>RandomAccessFile reader = new RandomAccessFile("/proc/stat", "r");
            String load = reader.readLine();</p>

<pre><code>        String[] toks = load.split(" +"); // Split on one or more spaces

         idle1 = Long.parseLong(toks[4]);
         cpu1 = Long.parseLong(toks[2]) + Long.parseLong(toks[3]) + Long.parseLong(toks[5])
                + Long.parseLong(toks[6]) + Long.parseLong(toks[7]) + Long.parseLong(toks[8]);
</code></pre>

<p>However how do I run this code inside the Appium java project on eclipse since I do not have an android project?</p>

<p>Thanks a lot for the help in advance</p>