RootManager icon indicating copy to clipboard operation
RootManager copied to clipboard

Timeout Exception Occur, How to run command continue in backgeound

Open VikramSN opened this issue 6 years ago • 3 comments

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)

VikramSN avatar Sep 17 '19 08:09 VikramSN

Hi,

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

Chrisplus avatar Sep 18 '19 05:09 Chrisplus

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.

VikramSN avatar Sep 19 '19 05:09 VikramSN

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

https://github.com/Chrisplus/RootManager/blob/f9298e296a443b664e26c156664e6fb54a07f84c/library/src/main/java/com/chrisplus/rootmanager/Constants.java#L72

https://github.com/Chrisplus/RootManager/blob/f9298e296a443b664e26c156664e6fb54a07f84c/library/src/main/java/com/chrisplus/rootmanager/RootManager.java#L420

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

Thanks.

Chrisplus avatar Sep 19 '19 05:09 Chrisplus