Skip to content

Fixed the issue where root detection not working for android 14+ Emulators#242

Open
yeshwanthsai1010 wants to merge 3 commits into
scottyab:masterfrom
yeshwanthsai1010:master
Open

Fixed the issue where root detection not working for android 14+ Emulators#242
yeshwanthsai1010 wants to merge 3 commits into
scottyab:masterfrom
yeshwanthsai1010:master

Conversation

@yeshwanthsai1010

Copy link
Copy Markdown

Issue Summary

Starting with Android 14, emulators no longer provide access to the ro.debuggable and ro.secure properties, as noted in this issue. These properties were critical for our root detection logic, and their unavailability has caused our root detection to fail on Android 14+ emulators.

As our team primarily relies on rooted emulators for testing, this issue has disrupted our workflows and impacted testing capabilities.

Investigation

To address this, I explored alternative properties that could reliably indicate rooted devices. During this process, I came across this discussion on XDA, which suggested using the ro.adb.secure property. This property appears to be a reliable substitute for detecting rooted devices in Android 14+ environments.

Proposed Solution

This pull request modifies our root detection logic to include the ro.adb.secure property as an alternative check when ro.debuggable and ro.secure are unavailable. This ensures that our root detection continues to function properly on Android 14+ emulators.

Benefits

  • Restores root detection functionality on Android 14+ emulators.
  • Allows the team to continue using rooted emulators for testing purposes.
  • Maintains compatibility with older Android versions without impacting existing behavior.

Request for Review

I kindly request you to review and approve this pull request so that we can resolve the issue and resume testing on rooted emulators seamlessly.

Developer checklist

  • Run the app and tested the new/edited functionality to conform to the expected behaviour
  • Run the following ./gradlew test and confirmed all tests pass.

@yeshwanthsai1010 yeshwanthsai1010 changed the title Fixed the issue where root detection not working for android 14+ Emul… Fixed the issue where root detection not working for android 14+ Emulators Jan 17, 2025
Comment thread rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java Outdated

@Unixityyy Unixityyy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea this is good

@Shady-Selim

Copy link
Copy Markdown

@yeshwanthsai1010 could you please check my comment and if you can merge now?

Co-authored-by: Shady Yehia Selim <shady.selim@hotmail.com>
@yeshwanthsai1010

Copy link
Copy Markdown
Author

I Have updated according to comment, But I don't see any option to merge someone help me to merge.

@Shady-Selim

Copy link
Copy Markdown

I Have updated according to comment, But I don't see any option to merge someone help me to merge.

cc: @scottyab FYA

@rohitsharmartsh

rohitsharmartsh commented Apr 20, 2026

Copy link
Copy Markdown

Hi,
I have tested this on an Android 14 & 15 emulator (Google API's); however, root detection is not functioning as expected on this version. The same root detection mechanism works correctly on Android 7.1.1 (Nougat).

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 this pull request may close these issues.

4 participants