Coder Social home page Coder Social logo

flutter_root_jailbreak's Introduction

flutter_root_jailbreak

This plugin is very easy to get a status to detect whether the Android device is rooted and whether the iOS device is jailbroken

install:

dependencies:
  flutter_root_jailbreak: ^2.0.2

use:

//The way to check the root status of an Android device is:
FlutterRootJailbreak.isRooted

// The way to check the jailbreak status for iOS devices is:
FlutterRootJailbreak.isJailBroken

flutter_root_jailbreak's People

Contributors

abutest avatar abu0306 avatar

Stargazers

 avatar ibukunoluwa Akintobi avatar Enes Karaosman avatar Danford Kija avatar

Watchers

James Cloos avatar  avatar

flutter_root_jailbreak's Issues

Huawei (HMS) Device

Currently I'm testing on my Huawei Mate 30 device which is using the HMS (No GMS). The library detected device as rooted device.

No podspec found for `flutter_root_jailbreak`

I have an error while building for IOS the error is as follows:
[!] No podspec found forflutter_root_jailbreakin.symlinks/plugins/flutter_root_jailbreak/ios

full console output:
abdelrahmanbonna@AbdelraansMBPM1 ios % pod install --repo-update Updating local specs repositories $ /usr/bin/git -C /Users/abdelrahmanbonna/.cocoapods/repos/cocoapods fetch origin --progress remote: Enumerating objects: 148, done. remote: Counting objects: 100% (148/148), done. remote: Compressing objects: 100% (140/140), done. remote: Total 148 (delta 56), reused 19 (delta 6), pack-reused 0 Receiving objects: 100% (148/148), 59.83 KiB | 11.96 MiB/s, done. Resolving deltas: 100% (56/56), completed with 4 local objects. From https://github.com/CocoaPods/Specs 33e9be5416af..47266276c642 master -> origin/master $ /usr/bin/git -C /Users/abdelrahmanbonna/.cocoapods/repos/cocoapods rev-parse --abbrev-ref HEAD master $ /usr/bin/git -C /Users/abdelrahmanbonna/.cocoapods/repos/cocoapods reset --hard origin/master HEAD is now at 47266276c642 [Add] THEOplayer-Connector-Nielsen 5.4.2 Analyzing dependencies firebase_analytics: Using Firebase SDK version '10.6.0' defined in 'firebase_core' firebase_core: Using Firebase SDK version '10.6.0' defined in 'firebase_core' Warning: firebase_app_id_file.json file does not exist. This may cause issues in upload-symbols. If this error is unexpected, try running flutterfire configure again. firebase_crashlytics: Using Firebase SDK version '10.6.0' defined in 'firebase_core' firebase_in_app_messaging: Using Firebase SDK version '10.6.0' defined in 'firebase_core' firebase_messaging: Using Firebase SDK version '10.6.0' defined in 'firebase_core' firebase_performance: Using Firebase SDK version '10.6.0' defined in 'firebase_core' firebase_remote_config: Using Firebase SDK version '10.6.0' defined in 'firebase_core' [!] No podspec found forflutter_root_jailbreakin.symlinks/plugins/flutter_root_jailbreak/ios`

`

My Flutter info:
`
abdelrahmanbonna@AbdelraansMBPM1 etisalat_cash % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.5, on macOS 13.2.1 22D68 darwin-arm64, locale en-EG)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.79.2)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!
`

Emulator is not detected as rooted device

As far as I know an Android emulator is a rooted Android device. I'm getting result false for both calls:

final jailbroken = await FlutterJailbreakDetection.jailbroken
final developerMode = await FlutterJailbreakDetection.developerMode

Please close the issue if I'm wrong and emulator is not a rooted device. I know that on emulator one has access to key value pairs stored inside SharedPreferences.

Gradle plugin errors

I am getting error while adding this latest version package.

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':flutter_root_jailbreak' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

App level build gradle

buildscript {
    repositories {
        // ...
        //maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal
        mavenCentral()
        google()
    }
    dependencies {
        // ...
        // OneSignal-Gradle-Plugin
        // classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.10, 0.99.99]'
        // classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.14.0, 0.99.99]'
        classpath 'com.android.tools.build:gradle:7.4.2'
    }
}

// apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'


def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
// apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

android {
    namespace "com.app.pacakgeName"
    compileSdkVersion 33
    ndkVersion "25.1.8937393"

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.app.packageName"
        minSdkVersion 21
        targetSdkVersion 33
        multiDexEnabled true
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        manifestPlaceholders = [
                onesignal_app_id: '*********',
                onesignal_google_project_number: 'REMOTE'
        ]
        ndkVersion "25.1.8937393"
        ndk {
            debugSymbolLevel 'FULL'
        }
    }

    signingConfigs {
        release {
            storeFile file("keystore/filepath.jks")
            storePassword "********"
            keyAlias "********"
            keyPassword "********"
        }
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            // signingConfig signingConfigs.debug
            signingConfig signingConfigs.release
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

        }
    }
    buildFeatures {
        aidl true
        buildConfig true
    }
}

flutter {
    source '../..'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    // implementation 'com.android.support:multidex:1.0.3'
    implementation "androidx.multidex:multidex:2.0.0"
    implementation 'androidx.work:work-runtime-ktx:2.7.0'
    implementation 'androidx.appcompat:appcompat:1.0.2'
}

apply plugin: 'com.google.gms.google-services'
android.buildTypes.release.ndk.debugSymbolLevel = 'FULL'`


Build.gradle

buildscript {
    ext.kotlin_version = '1.6.21'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.4.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.15'
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://maven.google.com' }
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
    project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
    delete rootProject.buildDir
}

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.