You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am developing an app that requires root for some of its features. Users sometimes set up periodic tasks to run. It seems to wok fine on rooted devices, but if device is not rooted I sometimes get OutOfMemoryError.
Before running command via threaded shell instance obtained by Shell.Pool.get(), I check root availability via Shell.SU.available().
I can't tell for sure that your library is the root cause of the problem though, but almost all crashes happen during creation of HandlerThread for Shell instance. In addition, I tried to execute Shell.SU.available() in a loop (once every 10 seconds) and watch thread count in profiler. Each execution spawns a new thread and it is never terminated.
I am going to cache the result of Shell.SU.available() somewhere, but I think it is still something that is worth looking into.
The text was updated successfully, but these errors were encountered:
After further investigation, I invoke Shell.SU.available() through RxJava on Shcedulers.io() and it seems that this method never returns.
I see the following lines in logcat:
I am developing an app that requires root for some of its features. Users sometimes set up periodic tasks to run. It seems to wok fine on rooted devices, but if device is not rooted I sometimes get OutOfMemoryError.
Before running command via threaded shell instance obtained by
Shell.Pool.get()
, I check root availability viaShell.SU.available()
.I can't tell for sure that your library is the root cause of the problem though, but almost all crashes happen during creation of HandlerThread for Shell instance. In addition, I tried to execute
Shell.SU.available()
in a loop (once every 10 seconds) and watch thread count in profiler. Each execution spawns a new thread and it is never terminated.I am going to cache the result of Shell.SU.available() somewhere, but I think it is still something that is worth looking into.
The text was updated successfully, but these errors were encountered: