mirror of
https://github.com/JDM170/ReVanced_Builder
synced 2025-11-29 14:41:46 +07:00
Compare commits
6 Commits
2025.01.01
...
2025.11.01
| Author | SHA1 | Date | |
|---|---|---|---|
|
4c356736b0
|
|||
|
ca508c0e24
|
|||
|
b879ad95f3
|
|||
|
3edfdcc627
|
|||
| d2ab1f83d7 | |||
| 689cf90f6a |
4
.github/workflows/Build.yml
vendored
4
.github/workflows/Build.yml
vendored
@@ -1,6 +1,8 @@
|
|||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "30 3 1 * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -73,7 +75,7 @@ jobs:
|
|||||||
echo "RELEASE_NAME=$ReleaseName" >> $env:GITHUB_ENV
|
echo "RELEASE_NAME=$ReleaseName" >> $env:GITHUB_ENV
|
||||||
|
|
||||||
- name: Upload to Releases
|
- name: Upload to Releases
|
||||||
uses: softprops/action-gh-release@master
|
uses: softprops/action-gh-release@v2.2.1
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.RELEASE_NAME }}
|
tag_name: ${{ env.RELEASE_NAME }}
|
||||||
body_path: ${{ steps.read_release.outputs.ReleaseBody }}
|
body_path: ${{ steps.read_release.outputs.ReleaseBody }}
|
||||||
|
|||||||
56
Build.ps1
56
Build.ps1
@@ -28,10 +28,10 @@ if ($Host.Version.Major -eq 5)
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Download all files to "Script location folder\ReVanced"
|
# Download all files to "Script location folder\ReVanced"
|
||||||
$WorkingFolder = Split-Path $MyInvocation.MyCommand.Path -Parent
|
$CurrentFolder = Split-Path $MyInvocation.MyCommand.Path -Parent
|
||||||
if (-not (Test-Path -Path "$WorkingFolder\ReVanced"))
|
if (-not (Test-Path -Path "$CurrentFolder\ReVanced"))
|
||||||
{
|
{
|
||||||
New-Item -Path "$WorkingFolder\ReVanced" -ItemType Directory -Force
|
New-Item -Path "$CurrentFolder\ReVanced" -ItemType Directory -Force
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get the latest supported YouTube version to patch
|
# Get the latest supported YouTube version to patch
|
||||||
@@ -44,6 +44,7 @@ $JSON = (Invoke-Webrequest @Parameters).Content | ConvertFrom-Json
|
|||||||
$versions = ($JSON | Where-Object -FilterScript {$_.name -eq "Video ads"})
|
$versions = ($JSON | Where-Object -FilterScript {$_.name -eq "Video ads"})
|
||||||
$LatestSupported = $versions.compatiblePackages.'com.google.android.youtube' | Sort-Object -Descending -Unique | Select-Object -First 1
|
$LatestSupported = $versions.compatiblePackages.'com.google.android.youtube' | Sort-Object -Descending -Unique | Select-Object -First 1
|
||||||
|
|
||||||
|
Write-Verbose -Message "" -Verbose
|
||||||
Write-Verbose -Message "Downloading the latest supported YouTube apk" -Verbose
|
Write-Verbose -Message "Downloading the latest supported YouTube apk" -Verbose
|
||||||
|
|
||||||
# We need a NON-bundle version
|
# We need a NON-bundle version
|
||||||
@@ -58,7 +59,7 @@ $URL = (Invoke-Webrequest @Parameters).Links.href | Where-Object -FilterScript {
|
|||||||
|
|
||||||
$Parameters = @{
|
$Parameters = @{
|
||||||
Uri = $URL
|
Uri = $URL
|
||||||
OutFile = "$WorkingFolder\ReVanced\youtube.apk"
|
OutFile = "$CurrentFolder\ReVanced\youtube.apk"
|
||||||
UseBasicParsing = $true
|
UseBasicParsing = $true
|
||||||
Verbose = $true
|
Verbose = $true
|
||||||
}
|
}
|
||||||
@@ -106,7 +107,7 @@ $URL_Part = $URL_Part.Replace("&", "&")
|
|||||||
# Finally, get the real link
|
# Finally, get the real link
|
||||||
$Parameters = @{
|
$Parameters = @{
|
||||||
Uri = "https://www.apkmirror.com$URL_Part"
|
Uri = "https://www.apkmirror.com$URL_Part"
|
||||||
OutFile = "$WorkingFolder\ReVanced\youtube.apk"
|
OutFile = "$CurrentFolder\ReVanced\youtube.apk"
|
||||||
UseBasicParsing = $true
|
UseBasicParsing = $true
|
||||||
Verbose = $true
|
Verbose = $true
|
||||||
}
|
}
|
||||||
@@ -123,7 +124,7 @@ $Parameters = @{
|
|||||||
$URL = ((Invoke-RestMethod @Parameters).assets | Where-Object -FilterScript {$_.content_type -eq "application/java-archive"}).browser_download_url
|
$URL = ((Invoke-RestMethod @Parameters).assets | Where-Object -FilterScript {$_.content_type -eq "application/java-archive"}).browser_download_url
|
||||||
$Parameters = @{
|
$Parameters = @{
|
||||||
Uri = $URL
|
Uri = $URL
|
||||||
Outfile = "$WorkingFolder\ReVanced\revanced-cli.jar"
|
Outfile = "$CurrentFolder\ReVanced\revanced-cli.jar"
|
||||||
UseBasicParsing = $true
|
UseBasicParsing = $true
|
||||||
Verbose = $true
|
Verbose = $true
|
||||||
}
|
}
|
||||||
@@ -140,7 +141,7 @@ $Parameters = @{
|
|||||||
$URL = ((Invoke-RestMethod @Parameters).assets | Where-Object -FilterScript {$_.content_type -eq "text/plain"}).browser_download_url
|
$URL = ((Invoke-RestMethod @Parameters).assets | Where-Object -FilterScript {$_.content_type -eq "text/plain"}).browser_download_url
|
||||||
$Parameters = @{
|
$Parameters = @{
|
||||||
Uri = $URL
|
Uri = $URL
|
||||||
Outfile = "$WorkingFolder\ReVanced\revanced-patches.rvp"
|
Outfile = "$CurrentFolder\ReVanced\revanced-patches.rvp"
|
||||||
UseBasicParsing = $true
|
UseBasicParsing = $true
|
||||||
Verbose = $true
|
Verbose = $true
|
||||||
}
|
}
|
||||||
@@ -163,7 +164,7 @@ foreach($url in $URL) {
|
|||||||
}
|
}
|
||||||
$Parameters = @{
|
$Parameters = @{
|
||||||
Uri = $url.browser_download_url
|
Uri = $url.browser_download_url
|
||||||
Outfile = "$WorkingFolder\ReVanced\$($url.name)"
|
Outfile = "$CurrentFolder\ReVanced\$($url.name)"
|
||||||
UseBasicParsing = $true
|
UseBasicParsing = $true
|
||||||
Verbose = $true
|
Verbose = $true
|
||||||
}
|
}
|
||||||
@@ -171,9 +172,9 @@ foreach($url in $URL) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Sometimes older version of zulu-jdk causes conflict, so remove older version before proceeding.
|
# Sometimes older version of zulu-jdk causes conflict, so remove older version before proceeding.
|
||||||
if (Test-Path -Path "$WorkingFolder\ReVanced\jdk")
|
if (Test-Path -Path "$CurrentFolder\ReVanced\jdk")
|
||||||
{
|
{
|
||||||
Remove-Item -Path "$WorkingFolder\ReVanced\jdk" -Recurse -Force
|
Remove-Item -Path "$CurrentFolder\ReVanced\jdk" -Recurse -Force
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Verbose -Message "" -Verbose
|
Write-Verbose -Message "" -Verbose
|
||||||
@@ -187,7 +188,7 @@ $Parameters = @{
|
|||||||
$URL = (Invoke-RestMethod @Parameters).architecture."64bit".url
|
$URL = (Invoke-RestMethod @Parameters).architecture."64bit".url
|
||||||
$Parameters = @{
|
$Parameters = @{
|
||||||
Uri = $URL
|
Uri = $URL
|
||||||
Outfile = "$WorkingFolder\ReVanced\jdk_windows-x64_bin.zip"
|
Outfile = "$CurrentFolder\ReVanced\jdk_windows-x64_bin.zip"
|
||||||
UseBasicParsing = $true
|
UseBasicParsing = $true
|
||||||
Verbose = $true
|
Verbose = $true
|
||||||
}
|
}
|
||||||
@@ -195,32 +196,41 @@ Invoke-RestMethod @Parameters
|
|||||||
|
|
||||||
# Expand jdk_windows-x64_bin archive
|
# Expand jdk_windows-x64_bin archive
|
||||||
$Parameters = @{
|
$Parameters = @{
|
||||||
Path = "$WorkingFolder\ReVanced\jdk_windows-x64_bin.zip"
|
Path = "$CurrentFolder\ReVanced\jdk_windows-x64_bin.zip"
|
||||||
DestinationPath = "$WorkingFolder\ReVanced\jdk"
|
DestinationPath = "$CurrentFolder\ReVanced\jdk"
|
||||||
Force = $true
|
Force = $true
|
||||||
Verbose = $true
|
Verbose = $true
|
||||||
}
|
}
|
||||||
Expand-Archive @Parameters
|
Expand-Archive @Parameters
|
||||||
|
|
||||||
Remove-Item -Path "$WorkingFolder\ReVanced\jdk_windows-x64_bin.zip" -Force
|
Remove-Item -Path "$CurrentFolder\ReVanced\jdk_windows-x64_bin.zip" -Force
|
||||||
|
|
||||||
# Let's create patched APK
|
# Let's create patched APK
|
||||||
& "$WorkingFolder\ReVanced\jdk\zulu*win_x64\bin\java.exe" `
|
& "$CurrentFolder\ReVanced\jdk\zulu*win_x64\bin\java.exe" `
|
||||||
-jar "$WorkingFolder\ReVanced\revanced-cli.jar" patch `
|
-jar "$CurrentFolder\ReVanced\revanced-cli.jar" patch `
|
||||||
--patches "$WorkingFolder\ReVanced\revanced-patches.rvp" `
|
--patches "$CurrentFolder\ReVanced\revanced-patches.rvp" `
|
||||||
--disable "Always repeat" `
|
--disable "Always repeat" `
|
||||||
--disable "Disable auto captions" `
|
--disable "Disable auto captions" `
|
||||||
--disable "Hide timestamp" `
|
--disable "Hide timestamp" `
|
||||||
--disable "Hide seekbar" `
|
--disable "Hide seekbar" `
|
||||||
--purge `
|
--purge `
|
||||||
--temporary-files-path "$WorkingFolder\ReVanced\Temp" `
|
--temporary-files-path "$CurrentFolder\ReVanced\Temp" `
|
||||||
--out "$WorkingFolder\ReVanced\revanced.apk" `
|
--out "$CurrentFolder\ReVanced\revanced.apk" `
|
||||||
"$WorkingFolder\ReVanced\youtube.apk"
|
"$CurrentFolder\ReVanced\youtube.apk"
|
||||||
|
|
||||||
# Open working directory with builded files
|
# Open working directory with builded files
|
||||||
# Invoke-Item -Path "$WorkingFolder\ReVanced"
|
# Invoke-Item -Path "$CurrentFolder\ReVanced"
|
||||||
|
|
||||||
# Remove temp directory, because cli failed to clean up directory
|
# Remove temp directory, because cli failed to clean up directory
|
||||||
# Remove-Item -Path "$WorkingFolder\ReVanced\Temp" -Recurse -Force -Confirm:$false
|
# Remove-Item -Path "$CurrentFolder\ReVanced\Temp" -Recurse -Force -Confirm:$false
|
||||||
|
|
||||||
Write-Warning -Message "Latest available revanced.apk & microg.apk are ready in `"$WorkingFolder\ReVanced`""
|
$Files = @(
|
||||||
|
"$CurrentFolder\ReVanced\Temp",
|
||||||
|
"$CurrentFolder\ReVanced\jdk",
|
||||||
|
"$CurrentFolder\ReVanced\revanced-cli.jar",
|
||||||
|
"$CurrentFolder\ReVanced\revanced-patches.rvp",
|
||||||
|
"$CurrentFolder\ReVanced\youtube.apk"
|
||||||
|
)
|
||||||
|
Remove-Item -Path $Files -Recurse -Force
|
||||||
|
|
||||||
|
Write-Warning -Message "Latest available revanced.apk & microg.apk are ready in `"$CurrentFolder\ReVanced`""
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Build ReVanced package (.apk) easily than ever using latest ReVanced patches and
|
|||||||
* hide-captions-button
|
* hide-captions-button
|
||||||
* hide-timestamp
|
* hide-timestamp
|
||||||
* hide-seekbar
|
* hide-seekbar
|
||||||
* The script downloads latest available YouTube package (having parsed [ReVanced API](https://api.revanced.app/v2/patches/latest)) supported by ReVanced Team from [APKMirror](https://apkmirror.com) and all dependencies and build package using [Zulu JDK](https://www.azul.com/downloads/?package=jdk);
|
* The script downloads latest available YouTube package (having parsed [ReVanced API](https://api.revanced.app/v4/patches/list)) supported by ReVanced Team from [APKMirror](https://apkmirror.com) and all dependencies and build package using [Zulu JDK](https://www.azul.com/downloads/?package=jdk);
|
||||||
* Script installs no apps — everything will be held in your `Script location folder\ReVanced`;
|
* Script installs no apps — everything will be held in your `Script location folder\ReVanced`;
|
||||||
* After compiling you get `revanced.apk` & `microg.apk` ready to be installed;
|
* After compiling you get `revanced.apk` & `microg.apk` ready to be installed;
|
||||||
* Release notes are generated dynamically using the [ReleaseNotesTemplate.md](https://github.com/JDM170/ReVanced_Builder/blob/main/ReleaseNotesTemplate.md) template.
|
* Release notes are generated dynamically using the [ReleaseNotesTemplate.md](https://github.com/JDM170/ReVanced_Builder/blob/main/ReleaseNotesTemplate.md) template.
|
||||||
@@ -30,7 +30,8 @@ Trigger the [`Build`](https://github.com/JDM170/ReVanced_Builder/actions/workflo
|
|||||||
## Requirements if you compile locally
|
## Requirements if you compile locally
|
||||||
|
|
||||||
* Windows 10 x64 or Windows 11
|
* Windows 10 x64 or Windows 11
|
||||||
* Windows PowerShell 5.1/7
|
* Windows PowerShell 5.1
|
||||||
|
* if you want to use PowerShell 7, you will have to install a 3rd party HTML parser ([AngleSharp](https://github.com/AngleSharp/AngleSharp))
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
@@ -38,7 +39,6 @@ Trigger the [`Build`](https://github.com/JDM170/ReVanced_Builder/actions/workflo
|
|||||||
* [APKMirror](https://apkmirror.com)
|
* [APKMirror](https://apkmirror.com)
|
||||||
* [ReVanced CLI](https://github.com/revanced/revanced-cli)
|
* [ReVanced CLI](https://github.com/revanced/revanced-cli)
|
||||||
* [ReVanced Patches](https://github.com/revanced/revanced-patches)
|
* [ReVanced Patches](https://github.com/revanced/revanced-patches)
|
||||||
* [ReVanced Integrations](https://github.com/revanced/revanced-integrations)
|
|
||||||
* [ReVanced MicroG](https://github.com/ReVanced/GmsCore)
|
* [ReVanced MicroG](https://github.com/ReVanced/GmsCore)
|
||||||
* [AngleSharp](https://github.com/AngleSharp/AngleSharp)
|
* [AngleSharp](https://github.com/AngleSharp/AngleSharp)
|
||||||
* [Zulu JDK](https://github.com/ScoopInstaller/Java)
|
* [Zulu JDK](https://github.com/ScoopInstaller/Java)
|
||||||
|
|||||||
Reference in New Issue
Block a user