Giter VIP home page Giter VIP logo

nativescript-root-detection's People

Contributors

brenzim avatar mpanje-fanuel avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nativescript-root-detection's Issues

Check write permissions to protected folders

iOS Root detections

  • iOS

@brenzim, if none of the apps that are currently being checked are not installed or have been moved to different locations, then the results would be that the device is not rooted.

I am proposing that in addition to checking those folders, we check whether there is write access to some of the folders we know are protected. Such as the /private or the /Applications folders.

Here a snippet of the code I think will work:

private static canWriteToSystemDirectories(): boolean {
        let stringToWrite = "Jailbreak Test";
        let privateDir = "/private/";
        let applicationDir = "/Applications";
        if (Folder.exists(privateDir)) {
            let path = "/private/jailbreak.txt";
            let systemDir = File.fromPath(path);

            systemDir.writeText(stringToWrite).then(result => {
                return true;
            }).catch(err => {
            });
        }
        if (Folder.exists(applicationDir)) {
            let path = "/Applications/jailbreak.txt";
            let dir = File.fromPath(path);

            dir.writeText(stringToWrite).then(result => {
                return true;
            }).catch(err => {
            });
        }
        return false;
    }

[TypeError: com.scottyab.rootbeer.RootBeer is not a constructor]

I tried to use this plugin like in the example. I got this error.
[TypeError: com.scottyab.rootbeer.RootBeer is not a constructor]

import {RootDetection} from 'nativescript-root-detection';

let rooted = RootDetection.isDeviceRooted(); 

I use nativescript with vue/typescript.
does anyone have an idea how to solve the problem?

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.