Stericson / RootShell

233 stars 101 forks source link

seems no implement of `RootShell.getCustomShell` #24

Closed yurenchen000 closed 5 years ago

yurenchen000 commented 6 years ago

https://github.com/Stericson/RootShell/search?utf8=✓&q=getCustomShell&type=

only this Recursive Call:

public static Shell getCustomShell(String shellPath, int timeout) throws IOException, TimeoutException, RootDeniedException
{
    return RootShell.getCustomShell(shellPath, timeout);
}
consp1racy commented 5 years ago

I'm sure you figured it out by now, but for completeness, it's supposed to be

return Shell.startCustomShell(shellPath, timeout);

instead of

return RootShell.getCustomShell(shellPath, timeout);
yurenchen000 commented 5 years ago

I'm sure you figured it out by now, but for completeness, it's supposed to be

return Shell.startCustomShell(shellPath, timeout);

instead of

return RootShell.getCustomShell(shellPath, timeout);

?? seems Shell also has no method named startCustomShell .

Stericson commented 5 years ago

https://github.com/Stericson/RootShell/blob/48b5078e9ee2a3600f88663eda27495b2876afb8/src/main/java/com/stericson/RootShell/execution/Shell.java#L908

You might be using and older version?

yurenchen000 commented 5 years ago

RootShell/src/main/java/com/stericson/RootShell/execution/Shell.java Line 908 in 48b5078 public static Shell startCustomShell(String shellPath) throws IOException, TimeoutException, RootDeniedException { You might be using and older version?

oh, you are right, sorry, I was mix up startCustomShell & getCustomShell.

consp1racy commented 5 years ago

Well don't close the issue, the error remains the same. RootShell.getCustomShell is not supposed to be recursive.

Stericson commented 5 years ago

Ah, I see it. I've fixed it in Master:

https://github.com/Stericson/RootShell/blob/master/src/main/java/com/stericson/RootShell/RootShell.java#L300