No description
  • Kotlin 87.5%
  • Go 7.4%
  • C 4.6%
  • CMake 0.5%
Find a file
2026-05-16 15:16:18 +00:00
.github disable futex_time64 again 2026-05-09 00:07:33 +08:00
.idea/codeStyles feat: show subscription 2022-12-10 10:17:58 +08:00
app Fix clash:// deep link not opening app due to premature Activity finish (#718) 2026-05-12 21:02:04 +08:00
common Update app (#428) 2025-01-21 21:35:45 +08:00
core Update Dependencies (#738) 2026-05-16 23:06:38 +08:00
design Derive states from MainActivity alias enabled (#703) 2026-04-10 16:41:17 +08:00
fastlane/metadata/android fastlane: fix a typo 2022-07-06 19:39:07 +08:00
gradle feat: Implement QR Coder scanner (#639) 2025-11-30 00:28:24 +08:00
hideapi Update app (#428) 2025-01-21 21:35:45 +08:00
service Fix parse profile-update-interval http header (#732) 2026-05-12 09:17:26 +08:00
.gitattributes Chore: add .gitattributes (#1191) 2021-09-13 18:34:34 +08:00
.gitignore Squashed commit of the following: 2023-10-29 21:38:36 +08:00
.gitmodules 更换核心地址 2024-01-17 05:59:44 +00:00
build.gradle.kts Bump version to 2.11.28 (211028) 2026-05-16 15:16:18 +00:00
CONTRIBUTING.md Chore: update CONTRIBUTING.md 2021-05-15 02:01:38 +08:00
gradle.properties Remove UseZGC flag from jvmargs (#662) 2026-02-09 20:25:02 +08:00
gradlew update dependency (#180) 2024-02-14 18:56:48 +08:00
gradlew.bat update dependency (#180) 2024-02-14 18:56:48 +08:00
LICENSE Initial: initial commit 2021-05-15 00:51:08 +08:00
NOTICE Initial: initial commit 2021-05-15 00:51:08 +08:00
PRIVACY_POLICY.md Initial: initial commit 2021-05-15 00:51:08 +08:00
README.md supports user-defined application_id/package_name (#628) 2025-11-09 10:32:59 +08:00
release.keystore Add files via upload 2022-06-18 07:22:07 +07:00
renovate.json Update dependency (#174) 2024-01-18 09:54:42 +00:00
settings.gradle.kts Update app (#428) 2025-01-21 21:35:45 +08:00

Clash Meta for Android

A Graphical user interface of Clash.Meta for Android

Feature

Feature of Clash.Meta

Get it on F-Droid

Requirement

  • Android 5.0+ (minimum)
  • Android 7.0+ (recommend)
  • armeabi-v7a , arm64-v8a, x86 or x86_64 Architecture

Build

  1. Update submodules

    git submodule update --init --recursive
    
  2. Install OpenJDK 11, Android SDK, CMake and Golang

  3. Create local.properties in project root with

    sdk.dir=/path/to/android-sdk
    
  4. (Optional) Custom app package name. Add the following configuration to local.properties.

    # config your ownn applicationId, or it will be 'com.github.metacubex.clash'
    custom.application.id=com.my.compile.clash
    # remove application id suffix, or the applicaion id will be 'com.github.metacubex.clash.alpha'
    remove.suffix=true
    
    
  5. Create signing.properties in project root with

    keystore.path=/path/to/keystore/file
    keystore.password=<key store password>
    key.alias=<key alias>
    key.password=<key password>
    
  6. Build

    ./gradlew app:assembleAlphaRelease
    

Automation

APP package name is com.github.metacubex.clash.meta

  • Toggle Clash.Meta service status
    • Send intent to activity com.github.kr328.clash.ExternalControlActivity with action com.github.metacubex.clash.meta.action.TOGGLE_CLASH
  • Start Clash.Meta service
    • Send intent to activity com.github.kr328.clash.ExternalControlActivity with action com.github.metacubex.clash.meta.action.START_CLASH
  • Stop Clash.Meta service
    • Send intent to activity com.github.kr328.clash.ExternalControlActivity with action com.github.metacubex.clash.meta.action.STOP_CLASH
  • Import a profile
    • URL Scheme clash://install-config?url=<encoded URI> or clashmeta://install-config?url=<encoded URI>

Contribution and Project Maintenance

Meta Kernel

  • CMFA uses the kernel from android-real branch under MetaCubeX/Clash.Meta, which is a merge of the main Alpha branch and android-open.
    • If you want to contribute to the kernel, make PRs to Alpha branch of the Meta kernel repository.
    • If you want to contribute Android-specific patches to the kernel, make PRs to android-open branch of the Meta kernel repository.

Maintenance

  • When MetaCubeX/Clash.Meta kernel is updated to a new version, the Update Dependencies actions in this repo will be triggered automatically.
    • It will pull the new version of the meta kernel, update all the golang dependencies, and create a PR without manual intervention.
    • If there is any compile error in PR, you need to fix it before merging. Alternatively, you may merge the PR directly.
  • Manually triggering Build Pre-Release actions will compile and publish a PreRelease version.
  • Manually triggering Build Release actions will compile, tag and publish a Release version.
    • You must fill the blank Release Tag with the tag you want to release in the format of v1.2.3.
    • versionName and versionCode in build.gradle.kts will be automatically bumped to the tag you filled above.