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

Checking for Root apps on Android 11+ is ineffectual due to package-visibility changes #167

Open
BanHammerYKT opened this issue May 6, 2021 · 5 comments
Labels

Comments

@BanHammerYKT
Copy link

BanHammerYKT commented May 6, 2021

https://developer.android.com/about/versions/11/privacy/package-visibility

Does rootbeer support these changes?
Or everything works fine on android 11?

@scottyab
Copy link
Owner

Thanks for raising this @BanHammerYKT

The good news is we don't crash (we would have caught that earlier). Partly due to the way Android handles the getPackageInfo request and that we have a try/catch around the statement.

But the bad news is that from my testing from Android 11 these checks for any root apps will be ineffective 😢 . Here's a test I ran with Sample Rootbeer looking for com.google.android.gm Gmail as a additional Root Management, Dangerous and Root Cloaking app.

Android 8.1 Android 11
android8 1-rooted android11-not-rooted

@scottyab scottyab changed the title What about package visibility in Android 11 Checking for Root apps on Android 11+ is ineffectual due to package-visibility changes May 10, 2021
@scottyab scottyab added bug and removed question labels May 10, 2021
@materkey
Copy link

materkey commented May 25, 2021

Will adding apps list from this file

<queries>
 <package android:name="first_root_app"/>
  ...
 <package android:name="last_root_app"/>
</queries>

in manifest resolve this issue?

@scottyab
Copy link
Owner

scottyab commented May 25, 2021

Potentially, but I saw in one of these Google I/O 2021 talks What’s new in Android privacy or The state of Android security that Google are changing the Play policy to make access to package queries only available to apps that genuinely need it. I'm not sure they would agree that root checking qualifies given SafetyNet is offered?.

Therefore I'm reluctant to add this feature as I could see apps getting pulled if we implemented this check. Although it does feel like we need to do something here to flag these checks are not running on Android 11+ maybe deprecating them and moving them out of the default checks 🤔

@BanHammerYKT
Copy link
Author

What if add an optional lib with manifest, something like

implementation 'com.scottyab:rootbeer-packages:0.0.9'

@scottyab
Copy link
Owner

Yep, that could work @BanHammerYKT. Would welcome a PR

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

No branches or pull requests

3 participants