Skip to content

Latest commit

 

History

History
89 lines (54 loc) · 5.57 KB

CONTRIBUTING.md

File metadata and controls

89 lines (54 loc) · 5.57 KB

Contributing to cccodroid

English | 中文

cccodroid is maintained by one person. Android devices vary wildly, and one person can't test them all or write everything, so help is very welcome. The ways to help are listed roughly from easiest to most involved; pick whatever suits you.

Feel free to say hello first in GitHub Discussions (English or Chinese), on Discord, or in the QQ group 1062538743 (mostly Chinese).


Without writing code

Report your device

This is what we need most. Open an issue with the "Device report" template and tell us your phone or tablet, your Android version, and what works and what doesn't. "Everything works" is worth reporting too: knowing which devices are fine is as useful as knowing which aren't.

Report a bug

In the app, tap Settings → Report on GitHub. Your device, Android version and self-test results are filled in; you only describe what happened and how to reproduce it. No logs or conversations are attached.

Report a security problem

Privately, please: see SECURITY.md. Don’t post it in a public issue or the group.

Fix translations

The UI ships in seven other languages, mostly translated by the author with AI help, so some strings will read awkwardly or be wrong. See i18n/README.md; it's a single text file per language.

Docs and guides

The in-app help lives in gateway/web/help/, other docs in docs/. Mistakes, unclear passages and pitfalls the docs don't mention are all fair game.

Answer questions

Every answered question is one less person who gives up.


Recipes: optional components

Optional components (Python, Blender, language runtimes…) live in the separate cccodroid-components repository. Each component is a recipe; CI builds, tests and signs it, so you don't need to fight with your own phone. It's the easiest place to start writing code.


Changing the app

Map

Where What
android/java/ Android shell (Java): setup, updates, notifications, Shizuku, WebView
android/assets/bin/, android/assets/scripts/ Sources of the terminal helpers and scripts (pkg, the Claude Code installer…)
android/native/ A few small native programs (pseudo-terminal, seccomp fallback)
gateway/server.mjs, gateway/gw/ The gateway, Node.js built-in modules only. server.mjs dispatches requests and starts up; each feature (sessions, files, git, components…) lives in its own module under gw/ — the header of server.mjs lists them. It runs claude and serves sessions, files, settings and every other API
gateway/web/ The UI: plain JS and CSS, no build step
i18n/ Translations
devkit/ Build script for the toolchain (assembled from the official Termux repositories)
scripts/ Build, release, toolchain pinning

android/assets/app/ is build output, wiped and regenerated by every build.sh run. Don't edit it.

Testing

You don't need a build environment. Push a branch to your fork and open a pull request; GitHub Actions builds an APK, which you download from that run's Artifacts.

Pull-request builds are signed with a throwaway test key, not the release key. You have to uninstall the released app before installing one, and uninstalling wipes the app's data (the toolchain has to be downloaded again and sessions are gone), so a spare device is best. To build on your own machine, see Build in the README.

Conventions

  • Talk before big changes. For anything sizeable, open an issue or a discussion first so nobody's work goes to waste.
  • No new dependencies, no build steps. The gateway uses only Node built-ins and the UI uses no framework or bundler. That's deliberate: everything can be edited and debugged on the phone itself.
  • Every UI string is translatable. Write the Chinese source text in t("…"), then add the translations as described in i18n/README.md.
  • Anything touching downloads: read docs/download-sources.md first. The rule is trust first, download second; nothing fetched from a mirror may become the thing it is checked against.
  • AI-assisted contributions are welcome; this project was built that way. Test on a real device before submitting, and say in the PR how and on which device you tested.
  • Comments explain why, not what.
  • No binaries, minified or obfuscated code. Third-party code (gateway/web/vendor/ and the like) must match the upstream release byte for byte; state its source, version and checksum in the PR. Every PR gets an automatic safety pre-check (scripts/pr-guard.mjs) that flags the places easiest to tamper with: CI and release scripts, dependencies, third-party code, invisible characters, long encoded strings. A "high" flag doesn't mean something is wrong, only that the maintainer will read those lines closely before merging.

Compliance

The project can only last if it follows Anthropic's terms (see Terms and compliance in the README). These changes won't be accepted:

  • modifying the Claude Code binary or reading its credentials file;
  • sharing, relaying or reselling Claude accounts or usage;
  • unattended or scheduled runs of Claude;
  • using Claude or Anthropic trademarks in names or icons.

License

The project is licensed under Apache-2.0. By opening a pull request you agree that your contribution is released under the same license.