github.com/LSPosed/AndroidHiddenApiBypass

LSPass: Bypass restrictions on non-SDK interfaces

Open this visualization on its own page →

Contributors

2

Lines of Code

285

From

2021-04-07

To

2022-03-12

About LSPosed/AndroidHiddenApiBypass

AndroidHiddenApiBypass is a Java library that enables Android developers to access non-SDK interfaces that are normally restricted by the Android framework. Android restricts access to hidden APIs through reflection checks, and this library provides a way to bypass those restrictions for legitimate use cases where developers need to call internal platform methods.

The project offers two distinct approaches to bypassing hidden API restrictions. The primary HiddenApiBypass method uses the Unsafe class and does not depend on specific ART runtime behaviors, making it stable across Android 10 and newer versions. The alternative LSPass variant is faster during initialization and avoids using Unsafe, instead relying on Property.of() mechanisms, though it may be more susceptible to future blocking by the framework. Both implementations expose the same API, allowing developers to invoke restricted methods and constructors, access hidden fields and methods from classes, and manage exemption lists for classes that need unrestricted access.

The library is designed for developers building apps that legitimately require access to Android's internal APIs, though the README notes that Google Play will reject apps that use hidden APIs, requiring developers to disable dependency reporting in their build configuration. The project is actively maintained to remain compatible with new Android releases.

Share this video