ClashMetaForAndroid/README.md

80 lines
3.0 KiB
Markdown
Raw Permalink Normal View History

2022-06-16 11:02:06 +03:00
## Clash Meta for Android
2021-05-14 19:51:08 +03:00
2022-06-16 11:02:06 +03:00
A Graphical user interface of [Clash.Meta](https://github.com/MetaCubeX/Clash.Meta) for Android
### Feature
Feature of [Clash.Meta](https://github.com/MetaCubeX/Clash.Meta)
2022-07-13 16:41:48 +03:00
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
alt="Get it on F-Droid"
height="80">](https://f-droid.org/packages/com.github.metacubex.clash.meta/)
2022-06-16 11:02:06 +03:00
### Requirement
- Android 5.0+ (minimum)
- Android 7.0+ (recommend)
- `armeabi-v7a` , `arm64-v8a`, `x86` or `x86_64` Architecture
### Build
1. Update submodules
```bash
git submodule update --init --recursive
```
2. Install **OpenJDK 11**, **Android SDK**, **CMake** and **Golang**
3. Create `local.properties` in project root with
```properties
sdk.dir=/path/to/android-sdk
```
4. Create `signing.properties` in project root with
```properties
keystore.path=/path/to/keystore/file
keystore.password=<key store password>
key.alias=<key alias>
key.password=<key password>
```
5. Build
```bash
./gradlew app:assembleMeta-AlphaRelease
```
2023-10-23 13:22:35 +03:00
### 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>`
2024-04-30 10:25:32 +03:00
### Contribution and Project Maintenance
2023-11-02 20:53:59 +03:00
#### Meta Kernel
2023-10-23 13:22:35 +03:00
- 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.
2024-04-30 10:25:32 +03:00
#### Maintenance
2023-10-23 13:22:35 +03:00
- 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.
2023-11-02 20:53:59 +03:00
- 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.