title: Need to run shell command android
body: <p>I am trying to run these shell commands via java but no success.Code executes perfectly but .so file do not exectue. while i use these commands in adb everything work perfeclty.</p>
  
  <pre> <code> 
  
      private void submit() {
         System.out.println("doooooooooo");
            try {
                 String[] commands = {"cd /data/data/com.dailydeals.usethisnow/lib", 
                                      "./libdeals.so" };
                 Process p = Runtime.getRuntime().exec("/system/bin/sh -");
                 DataOutputStream os = new DataOutputStream(p.getOutputStream());            
                    for (String tmpCmd : commands) {
                            os.writeBytes(tmpCmd+"\n");
                    }
                } catch (IOException e) {
                e.printStackTrace();    
                }
                System.out.println("doneooooooooo");
          } 
  
  </code> </pre>