RookieEnough/Morphe-AutoBuilds
关于
基于配置的 CI 流水线,每天自动构建 Android 应用。仅供学习使用。
学习与教育可以做什么
- Fully Automated: GitHub Actions workflow executes daily at 06:00 UTC, requiring zero manual intervention.
- Architecture Optimization: Builds specific arm64-v8a, armeabi-v7a, and universal APKs to reduce file size and improve performance on target devices.
- Multi-Source Strategy: Intelligent fetching from APKMirror, APKPure, and Uptodown ensures high success rates even if one source is down. Uptodown downloads resolve through its mobile API, which is not behind the Turnstile challenge that now guards the website download flow.
- Granular Build Control: Simple text-based configuration allows for precise inclusion or exclusion of specific build options.
实测星标增长
- 24小时
- 0
- 7天
- +6
- 15天
- +13
- 1个月
- +20
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文🔧 Automated Android Build Pipeline
Config-driven CI builds for Android
Multi-source • Multi-architecture • GitHub Actions Powered
A sophisticated, automated pipeline that assembles installable Android applications for non-rooted devices. The system fetches build tooling, downloads base APKs from multiple sources, applies community build configurations, and produces architecture-specific outputs.
⚡ At a Glance
Note: This repository hosts no downloadable files. Builds are produced automatically every day at 06:00 UTC for personal use. See the Disclaimer below.
📱 Supported Apps & Architectures
The full list of supported apps lives in patch-config.json (100 apps and growing). Each app can target arm64-v8a, armeabi-v7a, and/or universal builds, configured in arch-config.json.
( Legend: ✅ = Available / ❌ = Not configured )
✨ Key Features
This repository utilizes a robust Python-based pipeline to ensure high reliability and optimization.
- Fully Automated: GitHub Actions workflow executes daily at 06:00 UTC, requiring zero manual intervention.
- Architecture Optimization: Builds specific
arm64-v8a,armeabi-v7a, anduniversalAPKs to reduce file size and improve performance on target devices. - Multi-Source Strategy: Intelligent fetching from APKMirror, APKPure, and Uptodown ensures high success rates even if one source is down. Uptodown downloads resolve through its mobile API, which is not behind the Turnstile challenge that now guards the website download flow.
- Granular Build Control: Simple text-based configuration allows for precise inclusion or exclusion of specific build options.
- Smart Failover: The system automatically switches download sources if a fetch attempt fails.
- Auto-Signing: All APKs are signed with a consistent public keystore, making them ready to install immediately.
- Clean Release Cycle: Previous releases are replaced rather than archived, preventing clutter and making it easy for external managers (like Orion) to track updates.
🛠️ Repository Structure
Morphe-AutoBuilds/
├── .github/workflows/ # GitHub Actions automation
│ ├── patch.yml # Daily automated builds (06:00 UTC)
│ └── manual-patch.yml # Manual trigger workflow
├── apps/ # APK source configurations
│ ├── apkmirror/ # APKMirror definitions
│ ├── apkpure/ # APKPure definitions
│ └── uptodown/ # UptoDown definitions
├── patches/ # Build option rules
├── sources/ # Morphe tool source definitions
├── src/ # Core Python build logic
├── arch-config.json # Architecture build matrix
├── patch-config.json # App build configuration
└── requirements.txt # Project dependencies
⚙️ Configuration Guide
This builder is highly configurable. You can adjust the following files to customize the build output.
1. App Selection (patch-config.json)
Define which applications the pipeline should attempt to build.
{
"patch_list": [
{ "app_name": "youtube", "source": "morphe" },
{ "app_name": "youtube-music", "source": "morphe" },
{ "app_name": "X", "source": "crimera" }
]
}
2. Architecture Matrix (arch-config.json)
Specify which CPU architectures to target for each application.
[
{
"app_name": "youtube",
"source": "morphe",
"arches": ["arm64-v8a", "armeabi-v7a", "universal"]
},
{
"app_name": "youtube-music",
"source": "morphe",
"arches": ["arm64-v8a", "armeabi-v7a"]
}
]
3. Source Definitions
Located in the apps/ directory. Example for apps/apkmirror/youtube.json:
{
"org": "google-inc",
"name": "youtube",
"type": "APK",
"arch": "universal",
"dpi": "nodpi",
"package": "com.google.android.youtube",
"version": ""
}
Update detection
scripts/check_app_updates.py rebuilds an app when any of these is true:
- The patch source published something new — the source signature combines the release tag/date/assets (and, for GitHub, the default-branch commit SHA), so new releases, re-uploaded assets and plain commits all trigger a rebuild.
- The patches declare support for a newer app version — when a patch source publishes a machine-readable patches list, its highest non-experimental target is compared with the version that was actually built.
- The patches are version-agnostic and the app itself was updated — the
builder records
version_agnostic: truein the build records when it used the store's newest version (because the CLI declared no specific versions). Only those entries are compared against the store's latest version, so apps whose patches target specific versions never rebuild on every store bump.
Apps with a pinned version in their app config are never rebuilt by store
changes. The version-agnostic flag is written by the first build after this
change and carried forward in manifest.json from then on.
GitLab release updates
scripts/gitlab_publish_release.py updates
the GitLab latest release incrementally:
- the
latesttag is never moved or deleted during a publish — in GitLab that deletes the release and every asset link on it; - only the rebuilt APKs' links are added or replaced; other apps stay untouched;
- links lost by an earlier failed run are repaired from the package registry;
- superseded versions of the same app/architecture/patch build are pruned, and duplicate package-registry entries are collapsed;
- the post-publish check fails if any registry APK has no release link or if the manifest references an APK that no longer exists.
Uptodown downloads (mobile API)
Uptodown moved its website download flow behind Cloudflare Turnstile in
mid/late 2026. Direct curl/wget requests, and therefore shared
GitHub-hosted runner IPs, are treated as high risk and cannot pass that
challenge. The pipeline therefore resolves Uptodown downloads through the same
anonymous API the official Android app uses, as
Obtainium does:
POST https://www.uptodown.app/eapi/auth/tokenwith a signed anonymous identifier (HMAC-SHA256over a unix timestamp) returns a short-lived bearer token.GET /eapi/apps/<app code>/file/<file id>/downloadUrlresolves a catalog file id to a signeddw.uptodown.comURL that serves the APK/XAPK directly.
The catalog HTML is still used to discover the app code, versions, and file
ids; the HTML download-button flow and FlareSolverr remain only as fallbacks.
Implementation: src/uptodown_api.py, wired into
src/uptodown.py.
The anonymous client credentials can rotate, so they are overridable without a
code change (set them as repository variables or step env):
| Variable | Purpose | Default |
|---|---|---|
UPTODOWN_API_CLIENT_VERSION |
Android client version sent as Identificador-Version |
739 |
UPTODOWN_API_HMAC_KEY |
Anonymous client signing key | built-in |
UPTODOWN_API_USER_AGENT |
Android Dalvik user agent |
built-in |
UPTODOWN_API_HOST |
API host | https://www.uptodown.app |
Offline regression: python tests/test_uptodown_api.py.
Play Store update protection
TikTok, Twitter and X builds set android:versionCode to 2147483647 before
alignment and signing, matching Morphe's Disable Play Store updates patch.
Package IDs, versionName, patch selection and the existing signing key stay
unchanged. This prevents ordinary higher-version Play Store update offers; it
is not a root-level detach and does not erase Play Store's cached listings.
Future protected builds can replace protected installs at the same version code.
Returning to a stock/lower-version-code build requires uninstalling first (with
potential data loss). Orion's current update detection compares versionName,
so the fixed code does not hide newer Orion versions. When first deploying this
change, force a full rebuild so the incremental release does not carry over old
APKs.
Requires Android SDK zipalign with 16 KB page-alignment support alongside
apksigner. Run the offline regression check with
python tests/test_play_updates.py.
4. Build Options
Located in patches/. Example for patches/youtube-morphe.txt. Use + to force include and - to exclude.
# Essential options
+ microg-support
+ premium-heading
+ hide-infocard-suggestions
# Exclusions
- custom-branding
- amoled
ABI selection policy
Every app is built along one preference order:
universal -> arm64-v8a -> armeabi-v7a
- A universal APK installs on every device, so it is attempted first.
- If no source can produce it (for example when the only download for a version
is a 32-bit split), the build is retried as arm64-v8a, and only if that
also fails as armeabi-v7a. The pipeline never silently ships a lower-ABI
build under the
universalname. - Explicit entries in
arch-config.jsonare still honoured: an app listed forarm64-v8aandarmeabi-v7aproduces both, and each target falls back down the same order if it cannot be built. - When a mirror publishes several builds for the same ABI, the newest Android baseline wins (Facebook, for example, ships separate Android 9+ and Android 11+ arm64 bundles, and its patches only work on the newer one).
- If the patch CLI declares
versionCodes:for the app, the mirror upload with that exact versionCode is preferred over other uploads of the same version string (mirrors often publish several builds for one version).
The order lives in src/downloader.py (ARCH_PRIORITY,
fallback_arches) and is applied by the build loop in
src/__main__.py. Offline regression:
python tests/test_arch_fallback.py.
If a patch bundle reports no compatible versions for an app, the build now stops immediately with an explicit error instead of downloading the store's latest APK and refusing to sign an unpatched result — that usually means the app's patch source dropped support (or was never updated) for that package.
🚀 Local Build Instructions
If you prefer to build the APKs on your own machine, follow these steps.
Prerequisites
- Python 3.11 or higher
- Java Runtime Environment (JRE)
ziputilityapksigner(part of Android SDK Build-Tools)
Installation & Execution
- Clone the repository:
git clone https://github.com/RookieEnough/morphe-AutoBuilds.git
cd Morphe-AutoBuilds
- Install dependencies:
pip install -r requirements.txt
pip install requests beautifulsoup4
- Run the build: You can build for a specific app and source.
export APP_NAME="youtube"
export SOURCE="morphe"
python -m src
- Target specific architecture (Optional):
export APP_NAME="youtube"
export SOURCE="morphe"
export ARCH="arm64-v8a" # Options: arm64-v8a, armeabi-v7a, universal
python -m src
🔄 GitHub Actions Workflows
Daily Automated Build (patch.yml)
- Schedule: Runs daily at 06:00 UTC.
- Function: Iterates through all configured apps and architectures.
- Output: Refreshed build outputs for the configured apps.
Manual Build (manual-patch.yml)
- Trigger: Manually via the GitHub Actions "Run workflow" button.
- Capabilities:
- Target specific apps.
- Target specific architectures.
- Force specific APK versions.
- Option to update the public release or just build artifacts.
🤝 Contributing
Contributions to improve the toolchain or add support for new apps are welcome.
- Fork the repository.
- Create a feature branch (
git checkout -b feature/new-app). - Test your changes locally using the Python scripts.
- Commit your changes (
git commit -m "Add support for new-app"). - Push to the branch (
git push origin feature/new-app). - Open a Pull Request.
⚠️ Disclaimer & Legal
Important: This repository is a build-automation toolkit. It contains no APK files, no binaries, and no copyrighted media of any kind. Nothing here is a downloadable app.
- No binaries hosted: All build outputs are produced locally or in CI and are never committed to this repository.
- Educational purpose: The workflows and scripts are provided for educational and research purposes, to demonstrate automated Android build pipelines.
- Affiliation: This project is not affiliated with the Morphe Team or with any app publisher whose software it can process.
- Your responsibility: You are responsible for complying with the licenses and terms of service of the apps and build sources you choose to use. Do not redistribute builds in ways that violate those terms.
- Use at your own risk: Builds are generated automatically from third-party sources and may contain experimental features.
- GmsCore: Morphe's MicroG-RE is required for these non-root apps to function correctly.
If you found this project helpful, please consider giving it a ⭐ Star.
Made with 💜 by RookieZ
探索相关项目
加载中…
