Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android False Positives #12

Closed
gustavjf opened this issue Jun 19, 2017 · 9 comments · Fixed by #13
Closed

Android False Positives #12

gustavjf opened this issue Jun 19, 2017 · 9 comments · Fixed by #13

Comments

@gustavjf
Copy link
Contributor

I've just installed and linked the library and called JailMonkey.isJailBroken() in componentDidMount() of my top-level component. I got three false positives on separate physical devices:

  • Android 6.0.1 (rooted once, now no longer rooted)
  • Android 7.0 (never rooted)
  • Android O (never rooted)

Does this library not yet support 6.X and above?

@GantMan
Copy link
Owner

GantMan commented Jun 19, 2017

I'm happy to update the code. I'm currently unaware of what the prescribed detection methods are for those versions, but if you would be so kind as to link me to any docs/stackoverflows for each version, I'll implement the code.

Additionally this is a difficult thing to test (# of devices and all) so help appreciated there as well.

I'd like this library to remain active. Let's get those updates in place!

@gustavjf
Copy link
Contributor Author

Thanks for the quick response.

I'm also completely unaware of the current methods, but FWIW, https://github.com/beast/react-native-isDeviceRooted worked for the devices I mentioned above. Still struggling with iOS compilation so I can't comment on that, but Android seems to be working as expected.

This seems to be the relevant file: https://github.com/beast/react-native-isDeviceRooted/blob/master/android/app/src/main/java/my/fin/RNIsDeviceRootedModule.java

@gustavjf
Copy link
Contributor Author

Happy to test again on these devices if you need some help with that.

@GantMan
Copy link
Owner

GantMan commented Jun 19, 2017

Thanks @gustavjf - I will review isDeviceRooted and report back!

@gustavjf
Copy link
Contributor Author

Awesome, thank you!

@gustavjf
Copy link
Contributor Author

If there's anything else I can do to help other than test on physical devices, let me know. I'd look into preparing a PR but my Java chops are non-existent.

@GantMan
Copy link
Owner

GantMan commented Jun 20, 2017

@gustavjf - can you test this branch please?

https://github.com/GantMan/jail-monkey/tree/fix_android

@gustavjf
Copy link
Contributor Author

Just tested this after adding a missing import for BufferedReader class and all three non-rooted devices I listed above return false as expected. Emulators also return true as expected.

As is, it won't compile because of that missing import though.

Thank you for digging into this!

@GantMan GantMan mentioned this issue Jun 21, 2017
@GantMan
Copy link
Owner

GantMan commented Jun 21, 2017

Sorry for the wait, it's been a busy week.
New version published to npm 0.0.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants