MCPcopy Index your code
hub / github.com/anggrayudi/android-hidden-api

github.com/anggrayudi/android-hidden-api @35.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 35.0 ↗ · + Follow
93 symbols 181 edges 9 files 56 documented · 60%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Android Hidden APIs

Android Hidden APIs are classes, methods and resources that Google hides from you because of stability reason. These features are hidden because they may be changed on next API version.

The internal APIs are located in package com.android.internal and available in the framework.jar, while the hidden APIs are located in the android.jar file with @hide javadoc attribute. Now you know the difference. But I will refer to both as hidden APIs.

This repo contains custom android.jar which you can use to develop your app. However, if you urgently need to create your own android.jar, I also share you the Krabby Patty secret recipe here: Create Your Own Android Hidden APIs.

Use Custom android.jar

  1. Download custom android.jar from Google Drive.
  2. Go to <SDK location>/platforms/.
  3. Copy, paste and replace the downloaded hidden API file into this directory, e.g. android-30/android.jar.
  4. Change compileSdkVersion and targetSdkVersion to 35 (for example).
  5. Finally, rebuild your project.

Note: Higher compileSdkVersion and targetSdkVersion will be better.

Resources Helper

Maven Central

If you plan to use only Android internal resources rather than internal classes or methods, do:

dependencies {
    implementation 'com.anggrayudi:android-hidden-api:X.Y'
}

Where X.Y is the library version: Maven Central

All versions can be found here. To use SNAPSHOT version, you need to add this URL to the root Gradle:

allprojects {
    repositories {
        google()
        mavenCentral()
        // add this line
        maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
    }
}

Here's some example of accessing internal resources:

String accept = InternalAccessor.getString("accept");
float sbar_height = InternalAccessor.getDimension("status_bar_height");
int notif_color = InternalAccessor.getColor("config_defaultNotificationColor");

Contributing

If you have your own custom android.jar and want to add it to Google Drive, please create an issue. I will upload it.

License

Copyright 2015-2025 Anggrayudi Hardiannico A.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Core symbols most depended-on inside this repo

getResourceId
called by 20
resources-helper/src/main/java/com/anggrayudi/hiddenapi/InternalAccessor.java
isCompatibleCast
called by 18
resources-helper/src/main/java/com/anggrayudi/hiddenapi/ResourcesHolder.java
put
called by 15
resources-helper/src/main/java/com/anggrayudi/hiddenapi/ResourcesHolder.java
getDrawable
called by 3
resources-helper/src/main/java/com/anggrayudi/hiddenapi/InternalAccessor.java
getColor
called by 2
resources-helper/src/main/java/com/anggrayudi/hiddenapi/InternalAccessor.java
getDimension
called by 2
resources-helper/src/main/java/com/anggrayudi/hiddenapi/InternalAccessor.java
getLayout
called by 2
resources-helper/src/main/java/com/anggrayudi/hiddenapi/InternalAccessor.java
getString
called by 2
resources-helper/src/main/java/com/anggrayudi/hiddenapi/InternalAccessor.java

Shape

Method 82
Class 11

Languages

Java81%
Kotlin19%

Modules by API surface

resources-helper/src/main/java/com/anggrayudi/hiddenapi/InternalAccessor.java38 symbols
resources-helper/src/main/java/com/anggrayudi/hiddenapi/ResourcesHolder.java37 symbols
sample/src/main/java/com/anggrayudi/hiddenapi/sample/Adapter.kt6 symbols
sample/src/main/java/com/anggrayudi/hiddenapi/sample/MainActivity.kt3 symbols
sample/src/test/java/com/anggrayudi/hiddenapi/sample/ExampleUnitTest.kt2 symbols
sample/src/main/java/com/anggrayudi/hiddenapi/sample/Receiver.kt2 symbols
sample/src/main/java/com/anggrayudi/hiddenapi/sample/App.kt2 symbols
resources-helper/src/test/java/com/anggrayudi/hiddenapi/ExampleUnitTest.kt2 symbols
sample/src/main/java/com/anggrayudi/hiddenapi/sample/Model.kt1 symbols

For agents

$ claude mcp add android-hidden-api \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact