Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout Exception Occur, How to run command continue in backgeound #8

Open
VikramSN opened this issue Sep 17, 2019 · 3 comments
Open

Comments

@VikramSN
Copy link

i am tring to get Hash Value, but it always return me status code 0 and message is nothing.
Please check code below.'

 val hashValue: StringBuilder = StringBuilder()
        val hashCommand = RootManager.getInstance().runCommand("md5sum $path")
        hashValue.append("MD5 : ${hashCommand.message}")
        Log.d("getHash","Hash Message : "+hashCommand.message)
        Log.d("getHash","Hash Status Code : "+hashCommand.statusCode)
        Log.d("getHash","Hash Result : "+hashCommand.result)
@Chrisplus
Copy link
Owner

Hi,

Thanks for reporting. May I know if you have granted SU permission before run this command?

@VikramSN
Copy link
Author

VikramSN commented Sep 19, 2019

Yes, I root the device and give superuser permission granted.
its working well with 8GB Pendrive within 4 minutes it gives a result.
but for a long time process such as 1TB HDD, it returns timeout exception.

@Chrisplus
Copy link
Owner

@VikramSN Hi, current the default command timeout is 5 min, please refer to

public static final int COMMAND_TIMEOUT = 1000 * 60 * 5;

Command commandImpl = new Command(command) {

You may fork this repo and change the default timeout setting.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants