{"id":17993348,"url":"https://github.com/vendicated/xclasspath","last_synced_at":"2025-03-26T01:32:02.403Z","repository":{"id":103181640,"uuid":"499578550","full_name":"Vendicated/XClassPath","owner":"Vendicated","description":"A library that gives you direct access to the classes of the apps you're hooking into with Xposed","archived":false,"fork":false,"pushed_at":"2023-01-21T00:14:42.000Z","size":78,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-21T01:24:03.374Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vendicated.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Vendicated"}},"created_at":"2022-06-03T16:27:52.000Z","updated_at":"2023-01-27T13:26:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"16a289e4-578f-4ea6-b62c-be8ebab54fe3","html_url":"https://github.com/Vendicated/XClassPath","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vendicated%2FXClassPath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vendicated%2FXClassPath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vendicated%2FXClassPath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vendicated%2FXClassPath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vendicated","download_url":"https://codeload.github.com/Vendicated/XClassPath/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245571926,"owners_count":20637419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T20:11:06.519Z","updated_at":"2025-03-26T01:32:02.381Z","avatar_url":"https://github.com/Vendicated.png","language":"Java","funding_links":["https://github.com/sponsors/Vendicated"],"categories":[],"sub_categories":[],"readme":"# XClassPath\n\nA library that gives you direct access to the classes of the apps you're hooking into with Xposed.\n\nThis allows you to write (or [autogenerate](#automatically-generating-stubs)!) stubs for your target apps so you no longer have to use Reflection for everything.\n\n## Getting started\n\nAs this library uses hidden api, a hidden api bypass may be required. But any modern Xposed implementation should already include this.\n\n```gradle\nrepositories {\n    maven(\"https://maven.aliucord.com/snapshots\")\n}\n\ndependencies {\n    // or change main-SNAPSHOT to short commit hash to target a specific commit\n    implementation \"dev.vendicated.xclasspath:XClassPath:main-SNAPSHOT\"\n}\n```\n\n## Usage\n\nThe way it works is that you have two classes implementing IXposedHookLoadPackage.\nThe first should be in xposed_init and contain only the following code (and the class BoilerPlate of course)\n```java\n@Override\npublic void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable {\n    if (lpparam.packageName.equals(YOUR_TARGET_PACKAGE_NAME)){\n        XClassPath.init(lpparam, \"com.yourname.TheSecondImplementation\");\n    }\n}\n```\nThe first one MUST NOT use classes of the target app.\n\nThe second one will be called by this library and can freely use classes of the target app.\n\nSee the examples directory for a very simple example targeting the Spotify App.\n\n## Automatically generating stubs\n\nYou can use [our fork](https://github.com/Aliucord/dex2jar) of the awesome dex2jar project to convert the apk to a .jar file with all classes\n\nJust grab the [latest release](https://github.com/Aliucord/dex2jar/releases/latest/download/dex2jar.jar) and run\n```shell\njava -jar dex2jar.jar --no-code --debug-info YOURAPK.apk --output stubs.jar\n```\nNow add that jar as compileOnly dependency and you're good to go!\n\nPlease note that while this jar does not contain any code, only implementation-less interfaces, pushing it to your repo\nmay be Copyright infringement, so you should probably gitignore it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvendicated%2Fxclasspath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvendicated%2Fxclasspath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvendicated%2Fxclasspath/lists"}