title: legal linux command that can call them from Android app?
body: <p>I need to make a linux command from native method in <code>C++</code>, which is <b>iwconfig</b>,also using <code>popen</code> to get the output of this command.</p>
  
  <p>This is my code</p>
  
  <pre><code>std::string exec(const char* cmd) {
  FILE* pipe = popen(cmd, "r");
  if (!pipe) return "ERROR";
  char buffer[128];
  std::string result = "";
  while(!feof(pipe)) {
    if(fgets(buffer, 128, pipe) != NULL)
    result += buffer;
    }
    pclose(pipe);
    return result;
   }
  </code></pre>
  
  <p>i wondered if it is possible to call it!!!</p>
  
  <p>so i have this code in this <a href="https://stackoverflow.com/questions/15191171/no-jni-onload-and-no-return-value-from-native-function#comment21403673_15191171">link</a></p>