Guest User

Untitled

a guest
Dec 27th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. String libFile = "android.resource://com.example.suraj.myapplication/raw";
  2. String url = "abc.com";
  3. String user = "user";
  4. String password = "pass";
  5. Boolean isNeon = false;
  6.  
  7. try {
  8. String str = libFile;
  9. str = new StringBuilder(String.valueOf(isNeon ? new StringBuilder(String.valueOf(str)).append("/libcpuminerNEON.so ").toString() : new StringBuilder(String.valueOf(str)).append("/libcpuminer.so ").toString())).append("--algo=scrypt -o ").append(url).append(" -u ").append(user).append(" -p ").append(password).append(" -t ").append(thread).toString();
  10. Process process = Runtime.getRuntime().exec(str, new String[]{"LD_LIBRARY_PATH=" + libFile + ":$LD_LIBRARY_PATH"}, new File(libFile));
  11. Log.e("errorE", str);
  12. Log.e("errorE", process.getClass().getName());
  13.  
  14. } catch (Exception e) {
  15. e.printStackTrace();
  16. Log.e("errorE", "error");
  17. }
  18. }
Add Comment
Please, Sign In to add comment