Git Product home page Git Product logo

Comments (4)

Fusion avatar Fusion commented on July 29, 2024

What does your code do, other than checking for root? The snippet you attached is not very informative.

from roottools.

Loda avatar Loda commented on July 29, 2024

@Fusion

The purpose of that snippet is to check for Root without freezing the UI (from a secondary thread) on Activity.OnResume.
If the device got Root, I finish() the current activity.

The problem is that every check RootTools.isXxxx() create a few Zombie (process that are not terminate until a device reboot)
Thoses Zombie use all the RAM memory of the device until the point when the device completly stop being responsive.

regards,

from roottools.

tomblenz avatar tomblenz commented on July 29, 2024

This issue has also been raised before on stackoverflow: http://stackoverflow.com/a/15485210/692167

Every time "su" is executed, it spawns a zombie process that survives the application and grows in memory allocation. Ouch!

from roottools.

M1cha avatar M1cha commented on July 29, 2024

the solution is simple yet powerful: start your own custom su daemon :)
this way you only need to show the root confirmation dialog once every reboot and you can keep a list of pid's in memory which you can retrieve even when your app process got killed by a task manager:

https://github.com/efidroid/android_system_extras_su/commits/master

from roottools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.