mirror of
https://github.com/Nezumi-2711/revanced-apk-build.git
synced 2026-09-22 20:02:00 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
117a2fde1b | ||
|
|
8d9c8d40aa | ||
|
|
bbde99482c |
+152
-9
@@ -16,8 +16,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: "zulu"
|
distribution: 'zulu'
|
||||||
java-version: "17"
|
java-version: '17'
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -175,7 +175,7 @@ jobs:
|
|||||||
|
|
||||||
**Download Links:**
|
**Download Links:**
|
||||||
"
|
"
|
||||||
|
|
||||||
MODULES_MSG="
|
MODULES_MSG="
|
||||||
**Modules:**
|
**Modules:**
|
||||||
${MODULES}
|
${MODULES}
|
||||||
@@ -189,15 +189,15 @@ jobs:
|
|||||||
curl -X POST -H "Content-Type: application/json" \
|
curl -X POST -H "Content-Type: application/json" \
|
||||||
-d "$(jq -n --arg content "$MSG" '{content: $content}')" \
|
-d "$(jq -n --arg content "$MSG" '{content: $content}')" \
|
||||||
"$DISCORD_WEBHOOK_URL"
|
"$DISCORD_WEBHOOK_URL"
|
||||||
|
|
||||||
# curl -X POST -H "Content-Type: application/json" \
|
# curl -X POST -H "Content-Type: application/json" \
|
||||||
# -d "$(jq -n --arg content "$MODULES_MSG" '{content: $content}')" \
|
# -d "$(jq -n --arg content "$MODULES_MSG" '{content: $content}')" \
|
||||||
# "$DISCORD_WEBHOOK_URL"
|
# "$DISCORD_WEBHOOK_URL"
|
||||||
|
|
||||||
curl -X POST -H "Content-Type: application/json" \
|
curl -X POST -H "Content-Type: application/json" \
|
||||||
-d "$(jq -n --arg content "$APKS_MSG" '{content: $content}')" \
|
-d "$(jq -n --arg content "$APKS_MSG" '{content: $content}')" \
|
||||||
"$DISCORD_WEBHOOK_URL"
|
"$DISCORD_WEBHOOK_URL"
|
||||||
|
|
||||||
- name: Report to Noob Discord
|
- name: Report to Noob Discord
|
||||||
env:
|
env:
|
||||||
DISCORD_WEBHOOK_NOOB_URL: ${{ secrets.DISCORD_WEBHOOK_NOOB_URL }}
|
DISCORD_WEBHOOK_NOOB_URL: ${{ secrets.DISCORD_WEBHOOK_NOOB_URL }}
|
||||||
@@ -227,7 +227,7 @@ jobs:
|
|||||||
|
|
||||||
**Download Links:**
|
**Download Links:**
|
||||||
"
|
"
|
||||||
|
|
||||||
MODULES_MSG="
|
MODULES_MSG="
|
||||||
**Modules:**
|
**Modules:**
|
||||||
${MODULES}
|
${MODULES}
|
||||||
@@ -241,11 +241,154 @@ jobs:
|
|||||||
curl -X POST -H "Content-Type: application/json" \
|
curl -X POST -H "Content-Type: application/json" \
|
||||||
-d "$(jq -n --arg content "$MSG" '{content: $content}')" \
|
-d "$(jq -n --arg content "$MSG" '{content: $content}')" \
|
||||||
"$DISCORD_WEBHOOK_NOOB_URL"
|
"$DISCORD_WEBHOOK_NOOB_URL"
|
||||||
|
|
||||||
# curl -X POST -H "Content-Type: application/json" \
|
# curl -X POST -H "Content-Type: application/json" \
|
||||||
# -d "$(jq -n --arg content "$MODULES_MSG" '{content: $content}')" \
|
# -d "$(jq -n --arg content "$MODULES_MSG" '{content: $content}')" \
|
||||||
# "$DISCORD_WEBHOOK_NOOB_URL"
|
# "$DISCORD_WEBHOOK_NOOB_URL"
|
||||||
|
|
||||||
curl -X POST -H "Content-Type: application/json" \
|
curl -X POST -H "Content-Type: application/json" \
|
||||||
-d "$(jq -n --arg content "$APKS_MSG" '{content: $content}')" \
|
-d "$(jq -n --arg content "$APKS_MSG" '{content: $content}')" \
|
||||||
"$DISCORD_WEBHOOK_NOOB_URL"
|
"$DISCORD_WEBHOOK_NOOB_URL"
|
||||||
|
|
||||||
|
- name: Send Email Notification (Resend)
|
||||||
|
env:
|
||||||
|
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
|
||||||
|
MAIL_TO: ${{ secrets.MAIL_TO }}
|
||||||
|
MAIL_CC: ${{ secrets.MAIL_CC }}
|
||||||
|
MAIL_BCC: ${{ secrets.MAIL_BCC }}
|
||||||
|
MAIL_FROM: ${{ secrets.MAIL_FROM }}
|
||||||
|
if: env.RESEND_API_KEY != null && env.MAIL_TO != null
|
||||||
|
run: |
|
||||||
|
VERSION="${{ steps.next_ver_code.outputs.NEXT_VER_CODE }}"
|
||||||
|
RELEASE_URL="${{ github.server_url }}/${{ github.repository }}/releases/tag/${VERSION}"
|
||||||
|
REPO="${{ github.repository }}"
|
||||||
|
|
||||||
|
# Set default FROM address if not provided
|
||||||
|
FROM_ADDRESS="${MAIL_FROM:-ReVanced Build Bot <onboarding@resend.dev>}"
|
||||||
|
|
||||||
|
# Build download links from build folder (separate APKs and Modules)
|
||||||
|
cd build || { echo "build folder not found"; exit 1; }
|
||||||
|
|
||||||
|
APK_LINKS=""
|
||||||
|
MODULE_LINKS=""
|
||||||
|
for OUTPUT in *; do
|
||||||
|
DL_URL="${{ github.server_url }}/${{ github.repository }}/releases/download/${VERSION}/${OUTPUT}"
|
||||||
|
if [[ $OUTPUT = *.apk ]]; then
|
||||||
|
APK_LINKS+="<li style=\"margin: 8px 0;\">📦 <a href=\"${DL_URL}\" style=\"color: #667eea; text-decoration: none;\">${OUTPUT}</a></li>"
|
||||||
|
elif [[ $OUTPUT = *.zip ]]; then
|
||||||
|
MODULE_LINKS+="<li style=\"margin: 8px 0;\">📁 <a href=\"${DL_URL}\" style=\"color: #667eea; text-decoration: none;\">${OUTPUT}</a></li>"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# Get current time in Vietnam timezone (UTC+7)
|
||||||
|
BUILD_TIME=$(TZ='Asia/Ho_Chi_Minh' date '+%Y-%m-%d %H:%M:%S (UTC+7)')
|
||||||
|
|
||||||
|
# Get changelog from build.md and convert to HTML
|
||||||
|
if [ -f "build.md" ]; then
|
||||||
|
# Convert markdown to simple HTML
|
||||||
|
CHANGELOG_HTML=$(sed 's/^### \(.*\)/<h3 style="color: #667eea; font-size: 16px; margin: 15px 0 8px 0;">\1<\/h3>/g;
|
||||||
|
s/^\* \*\*\(.*\)\*\*/<li style="margin: 5px 0;"><strong>\1<\/strong><\/li>/g;
|
||||||
|
s/^\* \(.*\)/<li style="margin: 5px 0;">\1<\/li>/g;
|
||||||
|
s/^- \(.*\)/<li style="margin: 5px 0;">\1<\/li>/g;
|
||||||
|
s/`\([^`]*\)`/<code style="background: #e9ecef; padding: 2px 6px; border-radius: 3px; font-size: 13px;">\1<\/code>/g;
|
||||||
|
/^==/d;
|
||||||
|
/^$/d' build.md | tr '\n' ' ')
|
||||||
|
else
|
||||||
|
CHANGELOG_HTML="<p>No changelog available.</p>"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create HTML email body (similar structure to Telegram)
|
||||||
|
HTML_BODY=$(cat <<EOF
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
</head>
|
||||||
|
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333; max-width: 600px; margin: 0 auto; padding: 0;">
|
||||||
|
<div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; text-align: center;">
|
||||||
|
<h1 style="margin: 0;">🎉 New ReVanced Build!</h1>
|
||||||
|
<p style="margin: 10px 0 0 0; font-size: 18px;">Version: v${VERSION}</p>
|
||||||
|
<p style="margin: 5px 0 0 0; font-size: 14px; opacity: 0.9;">🕐 ${BUILD_TIME}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="padding: 25px; background: #f9f9f9;">
|
||||||
|
<!-- Changelog Section -->
|
||||||
|
<div style="margin-bottom: 25px; background: white; padding: 20px; border-radius: 8px; border-left: 4px solid #667eea;">
|
||||||
|
<h2 style="color: #667eea; font-size: 18px; margin: 0 0 15px 0;">📋 Changelog</h2>
|
||||||
|
<div style="font-size: 14px;">
|
||||||
|
${CHANGELOG_HTML}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Download Links Section -->
|
||||||
|
<div style="margin-bottom: 25px; background: white; padding: 20px; border-radius: 8px;">
|
||||||
|
<h2 style="color: #667eea; font-size: 18px; margin: 0 0 15px 0;">� Download Links</h2>
|
||||||
|
|
||||||
|
<!-- Modules -->
|
||||||
|
$(if [ -n "$MODULE_LINKS" ]; then echo "
|
||||||
|
<div style=\"margin-bottom: 15px;\">
|
||||||
|
<h3 style=\"color: #555; font-size: 15px; margin: 0 0 10px 0;\">� Modules:</h3>
|
||||||
|
<ul style=\"list-style: none; padding: 0; margin: 0;\">
|
||||||
|
${MODULE_LINKS}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
"; fi)
|
||||||
|
|
||||||
|
<!-- APKs -->
|
||||||
|
$(if [ -n "$APK_LINKS" ]; then echo "
|
||||||
|
<div>
|
||||||
|
<h3 style=\"color: #555; font-size: 15px; margin: 0 0 10px 0;\">📱 APKs:</h3>
|
||||||
|
<ul style=\"list-style: none; padding: 0; margin: 0;\">
|
||||||
|
${APK_LINKS}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
"; fi)
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- GitHub Button -->
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<a href="${RELEASE_URL}" style="display: inline-block; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 12px 30px; text-decoration: none; border-radius: 25px; font-weight: bold;">
|
||||||
|
View Release on GitHub
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="text-align: center; padding: 20px; background: #333; color: #999; font-size: 12px;">
|
||||||
|
<p style="margin: 0;">This is an automated message from ReVanced Build Bot</p>
|
||||||
|
<p style="margin: 5px 0 0 0;">Repository: ${REPO}</p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
# Build JSON payload with TO, CC and BCC recipients
|
||||||
|
# Resend allows up to 50 recipients per field (to, cc, bcc)
|
||||||
|
JSON_PAYLOAD=$(jq -n \
|
||||||
|
--arg from "$FROM_ADDRESS" \
|
||||||
|
--arg to "$MAIL_TO" \
|
||||||
|
--arg cc "$MAIL_CC" \
|
||||||
|
--arg bcc "$MAIL_BCC" \
|
||||||
|
--arg subject "🚀 New ReVanced Build Available - v${VERSION}" \
|
||||||
|
--arg html "$HTML_BODY" \
|
||||||
|
'{
|
||||||
|
from: $from,
|
||||||
|
to: ($to | split(",") | map(select(. != "") | gsub("^\\s+|\\s+$"; ""))),
|
||||||
|
subject: $subject,
|
||||||
|
html: $html
|
||||||
|
}
|
||||||
|
+ (if $cc != "" then {cc: ($cc | split(",") | map(select(. != "") | gsub("^\\s+|\\s+$"; "")))} else {} end)
|
||||||
|
+ (if $bcc != "" then {bcc: ($bcc | split(",") | map(select(. != "") | gsub("^\\s+|\\s+$"; "")))} else {} end)'
|
||||||
|
)
|
||||||
|
|
||||||
|
echo "📧 Sending email notification..."
|
||||||
|
|
||||||
|
# Send email via Resend API
|
||||||
|
RESPONSE=$(curl -s -X POST "https://api.resend.com/emails" \
|
||||||
|
-H "Authorization: Bearer ${RESEND_API_KEY}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "$JSON_PAYLOAD")
|
||||||
|
|
||||||
|
echo "Response: $RESPONSE"
|
||||||
|
echo "✅ Email sent successfully!"
|
||||||
|
|||||||
@@ -0,0 +1,127 @@
|
|||||||
|
name: Email Notification Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
recipient_email:
|
||||||
|
description: 'Email address to send test to (leave empty to use MAIL_TO secret)'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
send-test-email:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Send Test Email (Resend)
|
||||||
|
env:
|
||||||
|
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
|
||||||
|
MAIL_TO: ${{ inputs.recipient_email || secrets.MAIL_TO }}
|
||||||
|
MAIL_CC: ${{ secrets.MAIL_CC }}
|
||||||
|
MAIL_BCC: ${{ secrets.MAIL_BCC }}
|
||||||
|
MAIL_FROM: ${{ secrets.MAIL_FROM }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$RESEND_API_KEY" ]; then
|
||||||
|
echo "❌ Error: RESEND_API_KEY secret is not set!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$MAIL_TO" ]; then
|
||||||
|
echo "❌ Error: No email recipient specified!"
|
||||||
|
echo "Either provide recipient_email input or set MAIL_TO secret."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set default FROM address if not provided
|
||||||
|
FROM_ADDRESS="${MAIL_FROM:-ReVanced Build Bot <onboarding@resend.dev>}"
|
||||||
|
|
||||||
|
# Use Vietnam timezone (UTC+7)
|
||||||
|
VERSION="TEST-$(TZ='Asia/Ho_Chi_Minh' date +%Y%m%d-%H%M%S)"
|
||||||
|
SENT_TIME=$(TZ='Asia/Ho_Chi_Minh' date '+%Y-%m-%d %H:%M:%S (UTC+7)')
|
||||||
|
RELEASE_URL="${{ github.server_url }}/${{ github.repository }}/releases"
|
||||||
|
REPO="${{ github.repository }}"
|
||||||
|
|
||||||
|
# Create test HTML email body
|
||||||
|
HTML_BODY=$(cat <<EOF
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
</head>
|
||||||
|
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333; max-width: 600px; margin: 0 auto; padding: 0;">
|
||||||
|
<div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; text-align: center;">
|
||||||
|
<h1 style="margin: 0;">🧪 Test Email</h1>
|
||||||
|
<p style="margin: 10px 0 0 0; font-size: 18px;">Version: ${VERSION}</p>
|
||||||
|
</div>
|
||||||
|
<div style="padding: 25px; background: #f9f9f9;">
|
||||||
|
<div style="margin-bottom: 25px;">
|
||||||
|
<h2 style="color: #667eea; font-size: 18px; margin: 0 0 10px 0;">✅ Email Configuration Working!</h2>
|
||||||
|
<p style="margin: 0;">If you received this email, it means your Resend configuration is working correctly!</p>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 25px;">
|
||||||
|
<h2 style="color: #667eea; font-size: 18px; margin: 0 0 10px 0;">📋 Configuration Details</h2>
|
||||||
|
<ul style="list-style: none; padding: 0; margin: 0;">
|
||||||
|
<li>📧 From: ${FROM_ADDRESS}</li>
|
||||||
|
<li>📬 To: ${MAIL_TO}</li>
|
||||||
|
<li>🕐 Sent at: ${SENT_TIME}</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 25px; text-align: center;">
|
||||||
|
<a href="${RELEASE_URL}" style="display: inline-block; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 12px 30px; text-decoration: none; border-radius: 25px; font-weight: bold;">
|
||||||
|
View Releases
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: center; padding: 20px; background: #333; color: #999; font-size: 12px;">
|
||||||
|
<p style="margin: 0;">This is a TEST email from ReVanced Build Bot</p>
|
||||||
|
<p style="margin: 5px 0 0 0;">Repository: ${REPO}</p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
# Build JSON payload
|
||||||
|
JSON_PAYLOAD=$(jq -n \
|
||||||
|
--arg from "$FROM_ADDRESS" \
|
||||||
|
--arg to "$MAIL_TO" \
|
||||||
|
--arg cc "$MAIL_CC" \
|
||||||
|
--arg bcc "$MAIL_BCC" \
|
||||||
|
--arg subject "🧪 [TEST] ReVanced Build Email - ${VERSION}" \
|
||||||
|
--arg html "$HTML_BODY" \
|
||||||
|
'{
|
||||||
|
from: $from,
|
||||||
|
to: ($to | split(",") | map(select(. != "") | gsub("^\\s+|\\s+$"; ""))),
|
||||||
|
subject: $subject,
|
||||||
|
html: $html
|
||||||
|
}
|
||||||
|
+ (if $cc != "" then {cc: ($cc | split(",") | map(select(. != "") | gsub("^\\s+|\\s+$"; "")))} else {} end)
|
||||||
|
+ (if $bcc != "" then {bcc: ($bcc | split(",") | map(select(. != "") | gsub("^\\s+|\\s+$"; "")))} else {} end)'
|
||||||
|
)
|
||||||
|
|
||||||
|
echo "📧 Sending test email to: $MAIL_TO"
|
||||||
|
if [ -n "$MAIL_CC" ]; then echo "📋 CC: $MAIL_CC"; fi
|
||||||
|
if [ -n "$MAIL_BCC" ]; then echo "🔒 BCC: $MAIL_BCC"; fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Send email via Resend API
|
||||||
|
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "https://api.resend.com/emails" \
|
||||||
|
-H "Authorization: Bearer ${RESEND_API_KEY}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "$JSON_PAYLOAD")
|
||||||
|
|
||||||
|
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
|
||||||
|
BODY=$(echo "$RESPONSE" | sed '$d')
|
||||||
|
|
||||||
|
echo "Response: $BODY"
|
||||||
|
echo "HTTP Code: $HTTP_CODE"
|
||||||
|
|
||||||
|
if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then
|
||||||
|
echo ""
|
||||||
|
echo "✅ Test email sent successfully!"
|
||||||
|
echo "📬 Check your inbox at: $MAIL_TO"
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "❌ Failed to send email!"
|
||||||
|
echo "Please check your RESEND_API_KEY and email addresses."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
# Config
|
# Config
|
||||||
|
|
||||||
Adding another revanced app is as easy as this:
|
Adding another revanced app is as easy as this:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[Some-App]
|
[Some-App]
|
||||||
apkmirror-dlurl = "https://www.apkmirror.com/apk/inc/app"
|
apkmirror-dlurl = "https://www.apkmirror.com/apk/inc/app"
|
||||||
@@ -10,7 +11,7 @@ apkmirror-dlurl = "https://www.apkmirror.com/apk/inc/app"
|
|||||||
## More about other options:
|
## More about other options:
|
||||||
|
|
||||||
There exists an example below with all defaults shown and all the keys explicitly set.
|
There exists an example below with all defaults shown and all the keys explicitly set.
|
||||||
**All keys are optional** (except download urls) and are assigned to their default values if not set explicitly.
|
**All keys are optional** (except download urls) and are assigned to their default values if not set explicitly.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
parallel-jobs = 1 # amount of cores to use for parallel patching, if not set $(nproc) is used
|
parallel-jobs = 1 # amount of cores to use for parallel patching, if not set $(nproc) is used
|
||||||
@@ -20,6 +21,12 @@ remove-rv-integrations-checks = true # remove checks from the revanced integrati
|
|||||||
patches-source = "revanced/revanced-patches" # where to fetch patches bundle from. default: "revanced/revanced-patches"
|
patches-source = "revanced/revanced-patches" # where to fetch patches bundle from. default: "revanced/revanced-patches"
|
||||||
cli-source = "j-hc/revanced-cli" # where to fetch cli from. default: "j-hc/revanced-cli"
|
cli-source = "j-hc/revanced-cli" # where to fetch cli from. default: "j-hc/revanced-cli"
|
||||||
# options like cli-source can also set per app
|
# options like cli-source can also set per app
|
||||||
|
#
|
||||||
|
# Supported sources:
|
||||||
|
# - ReVanced: patches-source = "revanced/revanced-patches", cli-source = "j-hc/revanced-cli"
|
||||||
|
# - ReVanced Extended: patches-source = "inotia00/revanced-patches", cli-source = "inotia00/revanced-cli"
|
||||||
|
# - Morphe: patches-source = "MorpheApp/morphe-patches", cli-source = "MorpheApp/morphe-cli"
|
||||||
|
#
|
||||||
rv-brand = "ReVanced Extended" # rebrand from 'ReVanced' to something different. default: "ReVanced"
|
rv-brand = "ReVanced Extended" # rebrand from 'ReVanced' to something different. default: "ReVanced"
|
||||||
|
|
||||||
patches-version = "v2.160.0" # 'latest', 'dev', or a version number. default: "latest"
|
patches-version = "v2.160.0" # 'latest', 'dev', or a version number. default: "latest"
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
# ReVanced Magisk Module
|
# ReVanced Magisk Module
|
||||||
|
|
||||||
[](https://t.me/rvc_magisk)
|
[](https://t.me/rvc_magisk)
|
||||||
[](https://github.com/j-hc/revanced-magisk-module/actions/workflows/ci.yml)
|
[](https://github.com/j-hc/revanced-magisk-module/actions/workflows/ci.yml)
|
||||||
|
|
||||||
Extensive ReVanced builder
|
Extensive ReVanced builder
|
||||||
|
|
||||||
Get the [latest CI release](https://github.com/j-hc/revanced-magisk-module/releases).
|
Get the [latest CI release](https://github.com/j-hc/revanced-magisk-module/releases).
|
||||||
|
|
||||||
Use [**zygisk-detach**](https://github.com/j-hc/zygisk-detach) to detach YouTube and YT Music from Play Store if you are using magisk modules.
|
Use [**zygisk-detach**](https://github.com/j-hc/zygisk-detach) to detach YouTube and YT Music from Play Store if you are using magisk modules.
|
||||||
|
|
||||||
<details><summary><big>Features</big></summary>
|
<details><summary><big>Features</big></summary>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Support all present and future ReVanced and <a href="https://github.com/inotia00/revanced-patches">ReVanced Extended</a> apps</li>
|
<li>Support all present and future ReVanced, <a href="https://github.com/inotia00/revanced-patches">ReVanced Extended</a>, and <a href="https://github.com/MorpheApp/morphe-patches">Morphe patches</a></li>
|
||||||
<li> Can build Magisk modules and non-root APKs</li>
|
<li> Can build Magisk modules and non-root APKs</li>
|
||||||
<li> Updated daily with the latest versions of apps and patches</li>
|
<li> Updated daily with the latest versions of apps and patches</li>
|
||||||
<li> Optimize APKs and modules for size</li>
|
<li> Optimize APKs and modules for size</li>
|
||||||
@@ -28,21 +29,24 @@ Note that the <a href="../../actions/workflows/ci.yml">CI workflow</a> is schedu
|
|||||||
|
|
||||||
## To include/exclude patches or patch other apps
|
## To include/exclude patches or patch other apps
|
||||||
|
|
||||||
* Star the repo :eyes:
|
- Star the repo :eyes:
|
||||||
* Use the repo as a [template](https://github.com/new?template_name=revanced-magisk-module&template_owner=j-hc)
|
- Use the repo as a [template](https://github.com/new?template_name=revanced-magisk-module&template_owner=j-hc)
|
||||||
* Customize [`config.toml`](./config.toml) using [rvmm-config-gen](https://j-hc.github.io/rvmm-config-gen/)
|
- Customize [`config.toml`](./config.toml) using [rvmm-config-gen](https://j-hc.github.io/rvmm-config-gen/)
|
||||||
* Run the build [workflow](../../actions/workflows/build.yml)
|
- Run the build [workflow](../../actions/workflows/build.yml)
|
||||||
* Grab your modules and APKs from [releases](../../releases)
|
- Grab your modules and APKs from [releases](../../releases)
|
||||||
|
|
||||||
also see here [`CONFIG.md`](./CONFIG.md)
|
also see here [`CONFIG.md`](./CONFIG.md)
|
||||||
|
|
||||||
## Building Locally
|
## Building Locally
|
||||||
|
|
||||||
### On Termux
|
### On Termux
|
||||||
|
|
||||||
```console
|
```console
|
||||||
bash <(curl -sSf https://raw.githubusercontent.com/j-hc/revanced-magisk-module/main/build-termux.sh)
|
bash <(curl -sSf https://raw.githubusercontent.com/j-hc/revanced-magisk-module/main/build-termux.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
### On Desktop
|
### On Desktop
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ git clone https://github.com/j-hc/revanced-magisk-module
|
$ git clone https://github.com/j-hc/revanced-magisk-module
|
||||||
$ cd revanced-magisk-module
|
$ cd revanced-magisk-module
|
||||||
|
|||||||
+18
-6
@@ -32,17 +32,29 @@ uptodown-dlurl = "https://google-photos.en.uptodown.com/android"
|
|||||||
[Spotify]
|
[Spotify]
|
||||||
uptodown-dlurl = "https://spotify.en.uptodown.com/android"
|
uptodown-dlurl = "https://spotify.en.uptodown.com/android"
|
||||||
|
|
||||||
[YouTube-Extended]
|
[YouTube-Morphe]
|
||||||
app-name = "YouTube"
|
app-name = "YouTube"
|
||||||
patches-source = "inotia00/revanced-patches"
|
patches-source = "MorpheApp/morphe-patches"
|
||||||
cli-source = "inotia00/revanced-cli"
|
cli-source = "MorpheApp/morphe-cli"
|
||||||
rv-brand = "ReVanced Extended"
|
rv-brand = "Morphe"
|
||||||
build-mode = "apk"
|
build-mode = "apk"
|
||||||
version = "auto"
|
version = "auto"
|
||||||
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube"
|
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube"
|
||||||
uptodown-dlurl = "https://youtube.en.uptodown.com/android"
|
uptodown-dlurl = "https://youtube.en.uptodown.com/android"
|
||||||
included-patches = "'Custom header for YouTube' 'MaterialYou' 'Hide Shorts dimming'"
|
included-patches = ""
|
||||||
excluded-patches = "'Custom branding icon for YouTube' 'Custom branding name for YouTube' 'Disable splash animation'"
|
excluded-patches = ""
|
||||||
|
|
||||||
|
[Music-Morphe]
|
||||||
|
app-name = "Music"
|
||||||
|
patches-source = "MorpheApp/morphe-patches"
|
||||||
|
cli-source = "MorpheApp/morphe-cli"
|
||||||
|
rv-brand = "Morphe"
|
||||||
|
build-mode = "apk"
|
||||||
|
arch = "both"
|
||||||
|
apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube-music"
|
||||||
|
uptodown-dlurl = "https://youtube-music.en.uptodown.com/android"
|
||||||
|
included-patches = ""
|
||||||
|
excluded-patches = ""
|
||||||
|
|
||||||
[TikTok]
|
[TikTok]
|
||||||
enabled = false
|
enabled = false
|
||||||
|
|||||||
@@ -48,7 +48,20 @@ get_rv_prebuilts() {
|
|||||||
local cl_dir=${patches_src%/*}
|
local cl_dir=${patches_src%/*}
|
||||||
cl_dir=${TEMP_DIR}/${cl_dir,,}-rv
|
cl_dir=${TEMP_DIR}/${cl_dir,,}-rv
|
||||||
[ -d "$cl_dir" ] || mkdir "$cl_dir"
|
[ -d "$cl_dir" ] || mkdir "$cl_dir"
|
||||||
for src_ver in "$cli_src CLI $cli_ver revanced-cli" "$patches_src Patches $patches_ver patches"; do
|
|
||||||
|
# Detect if using Morphe or ReVanced based on patches source
|
||||||
|
local is_morphe=false
|
||||||
|
if [[ "$patches_src" == *"MorpheApp"* ]] || [[ "$patches_src" == *"morphe"* ]]; then
|
||||||
|
is_morphe=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set CLI filename prefix based on source
|
||||||
|
local cli_prefix="revanced-cli"
|
||||||
|
if [ "$is_morphe" = true ]; then
|
||||||
|
cli_prefix="morphe-cli"
|
||||||
|
fi
|
||||||
|
|
||||||
|
for src_ver in "$cli_src CLI $cli_ver $cli_prefix" "$patches_src Patches $patches_ver patches"; do
|
||||||
set -- $src_ver
|
set -- $src_ver
|
||||||
local src=$1 tag=$2 ver=${3-} fprefix=$4
|
local src=$1 tag=$2 ver=${3-} fprefix=$4
|
||||||
local ext
|
local ext
|
||||||
@@ -56,7 +69,12 @@ get_rv_prebuilts() {
|
|||||||
ext="jar"
|
ext="jar"
|
||||||
local grab_cl=false
|
local grab_cl=false
|
||||||
elif [ "$tag" = "Patches" ]; then
|
elif [ "$tag" = "Patches" ]; then
|
||||||
ext="rvp"
|
# Use .mpp for Morphe, .rvp for ReVanced
|
||||||
|
if [ "$is_morphe" = true ]; then
|
||||||
|
ext="mpp"
|
||||||
|
else
|
||||||
|
ext="rvp"
|
||||||
|
fi
|
||||||
local grab_cl=true
|
local grab_cl=true
|
||||||
else abort unreachable; fi
|
else abort unreachable; fi
|
||||||
local dir=${src%/*}
|
local dir=${src%/*}
|
||||||
@@ -100,7 +118,8 @@ get_rv_prebuilts() {
|
|||||||
fi
|
fi
|
||||||
if [ "$tag" = "Patches" ]; then
|
if [ "$tag" = "Patches" ]; then
|
||||||
if [ $grab_cl = true ]; then echo -e "[Changelog](https://github.com/${src}/releases/tag/${tag_name})\n" >>"${cl_dir}/changelog.md"; fi
|
if [ $grab_cl = true ]; then echo -e "[Changelog](https://github.com/${src}/releases/tag/${tag_name})\n" >>"${cl_dir}/changelog.md"; fi
|
||||||
if [ "$REMOVE_RV_INTEGRATIONS_CHECKS" = true ]; then
|
# Skip integrations check patching for Morphe (not applicable)
|
||||||
|
if [ "$REMOVE_RV_INTEGRATIONS_CHECKS" = true ] && [ "$is_morphe" = false ]; then
|
||||||
if ! (
|
if ! (
|
||||||
mkdir -p "${file}-zip" || return 1
|
mkdir -p "${file}-zip" || return 1
|
||||||
unzip -qo "${file}" -d "${file}-zip" || return 1
|
unzip -qo "${file}" -d "${file}-zip" || return 1
|
||||||
@@ -155,7 +174,12 @@ config_update() {
|
|||||||
else
|
else
|
||||||
last_patches=$(gh_req "$rv_rel/tags/${ver}" -)
|
last_patches=$(gh_req "$rv_rel/tags/${ver}" -)
|
||||||
fi
|
fi
|
||||||
if ! last_patches=$(jq -e -r '.assets[] | select(.name | endswith("rvp")) | .name' <<<"$last_patches"); then
|
# Detect if using Morphe or ReVanced based on patches source
|
||||||
|
local patches_ext="rvp"
|
||||||
|
if [[ "$PATCHES_SRC" == *"MorpheApp"* ]] || [[ "$PATCHES_SRC" == *"morphe"* ]]; then
|
||||||
|
patches_ext="mpp"
|
||||||
|
fi
|
||||||
|
if ! last_patches=$(jq -e -r ".assets[] | select(.name | endswith(\"$patches_ext\")) | .name" <<<"$last_patches"); then
|
||||||
abort oops
|
abort oops
|
||||||
fi
|
fi
|
||||||
if [ "$last_patches" ]; then
|
if [ "$last_patches" ]; then
|
||||||
@@ -432,8 +456,19 @@ get_archive_pkg_name() { echo "$__ARCHIVE_PKG_NAME__"; }
|
|||||||
|
|
||||||
patch_apk() {
|
patch_apk() {
|
||||||
local stock_input=$1 patched_apk=$2 patcher_args=$3 rv_cli_jar=$4 rv_patches_jar=$5
|
local stock_input=$1 patched_apk=$2 patcher_args=$3 rv_cli_jar=$4 rv_patches_jar=$5
|
||||||
local cmd="env -u GITHUB_REPOSITORY java -jar $rv_cli_jar patch $stock_input --purge -o $patched_apk -p $rv_patches_jar --keystore=ks.keystore \
|
local cmd
|
||||||
|
|
||||||
|
# Detect if using Morphe CLI based on jar filename
|
||||||
|
if [[ "$rv_cli_jar" == *"morphe-cli"* ]]; then
|
||||||
|
# Morphe CLI syntax: java -jar cli.jar patch -p patches.mpp -o output.apk input.apk [options]
|
||||||
|
cmd="env -u GITHUB_REPOSITORY java -jar $rv_cli_jar patch -p $rv_patches_jar --purge -o $patched_apk --keystore=ks.keystore \
|
||||||
|
--keystore-entry-password=123456789 --keystore-password=123456789 --signer=jhc --keystore-entry-alias=jhc $patcher_args $stock_input"
|
||||||
|
else
|
||||||
|
# ReVanced CLI syntax: java -jar cli.jar patch input.apk -p patches.rvp -o output.apk [options]
|
||||||
|
cmd="env -u GITHUB_REPOSITORY java -jar $rv_cli_jar patch $stock_input --purge -o $patched_apk -p $rv_patches_jar --keystore=ks.keystore \
|
||||||
--keystore-entry-password=123456789 --keystore-password=123456789 --signer=jhc --keystore-entry-alias=jhc $patcher_args"
|
--keystore-entry-password=123456789 --keystore-password=123456789 --signer=jhc --keystore-entry-alias=jhc $patcher_args"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$OS" = Android ]; then cmd+=" --custom-aapt2-binary=${AAPT2}"; fi
|
if [ "$OS" = Android ]; then cmd+=" --custom-aapt2-binary=${AAPT2}"; fi
|
||||||
pr "$cmd"
|
pr "$cmd"
|
||||||
if eval "$cmd"; then [ -f "$patched_apk" ]; else
|
if eval "$cmd"; then [ -f "$patched_apk" ]; else
|
||||||
@@ -598,10 +633,12 @@ build_rv() {
|
|||||||
module_config "$base_template" "$pkg_name" "$version" "$arch"
|
module_config "$base_template" "$pkg_name" "$version" "$arch"
|
||||||
|
|
||||||
local rv_patches_ver="${rv_patches_jar##*-}"
|
local rv_patches_ver="${rv_patches_jar##*-}"
|
||||||
|
rv_patches_ver="${rv_patches_ver%%.rvp}"
|
||||||
|
rv_patches_ver="${rv_patches_ver%%.mpp}"
|
||||||
module_prop \
|
module_prop \
|
||||||
"${args[module_prop_name]}" \
|
"${args[module_prop_name]}" \
|
||||||
"${app_name} ${args[rv_brand]}" \
|
"${app_name} ${args[rv_brand]}" \
|
||||||
"${version} (patches: ${rv_patches_ver%%.rvp})" \
|
"${version} (patches: ${rv_patches_ver})" \
|
||||||
"${app_name} ${args[rv_brand]} Magisk module" \
|
"${app_name} ${args[rv_brand]} Magisk module" \
|
||||||
"https://raw.githubusercontent.com/${GITHUB_REPOSITORY-}/update/${upj}" \
|
"https://raw.githubusercontent.com/${GITHUB_REPOSITORY-}/update/${upj}" \
|
||||||
"$base_template"
|
"$base_template"
|
||||||
|
|||||||
Reference in New Issue
Block a user