Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NoName-exe authored Jun 26, 2023
2 parents fa9ab34 + e6b1617 commit 1983a89
Show file tree
Hide file tree
Showing 14 changed files with 279 additions and 295 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ jobs:
GITHUB_REPOSITORY: $GITHUB_REPOSITORY
NEXT_VER_CODE: ${{ steps.next_ver_code.outputs.NEXT_VER_CODE }}

- name : Repack YouTube to HuskyDG's magisk module template
run : curl -sSLO https://raw.githubusercontent.com/NoName-exe/revanced-misc-stuff/master/scripts/repack.sh && chmod +x repack.sh && ./repack.sh

- name: Get output
id: get_output
run: |
Expand Down Expand Up @@ -84,13 +81,11 @@ jobs:
}"
}
cd build || echo "build folder not found"
for OUTPUT in *revanced*.zip; do
[ "$OUTPUT" = "*revanced*.zip" ] && continue
cd build || { echo "build folder not found"; exit 1; }
for OUTPUT in *magisk*.zip; do
[ "$OUTPUT" = "*magisk*.zip" ] && continue
ZIP_S=$(unzip -p "$OUTPUT" module.prop)
if ! UPDATE_JSON=$(echo "$ZIP_S" | grep updateJson); then
continue
fi
if ! UPDATE_JSON=$(echo "$ZIP_S" | grep updateJson); then continue; fi
UPDATE_JSON="${UPDATE_JSON##*/}"
VER=$(echo "$ZIP_S" | grep version=)
VER="${VER##*=}"
Expand All @@ -113,13 +108,13 @@ jobs:
TG_TOKEN: ${{ secrets.TG_TOKEN }}
if: env.TG_TOKEN != null
run: |
cd build || echo "build folder not found"
cd build || { echo "build folder not found"; exit 1; }
TG_CHAT="@rvc_magisk"
NL=$'\n'
APKS=""
MODULES=""
for OUTPUT in *revanced*; do
for OUTPUT in *; do
DL_URL="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/download/${{ steps.next_ver_code.outputs.NEXT_VER_CODE }}/${OUTPUT}"
if [[ $OUTPUT = *.apk ]]; then
APKS+="${NL}📦[${OUTPUT}](${DL_URL})"
Expand All @@ -130,7 +125,7 @@ jobs:
MODULES=${MODULES#"$NL"}
APKS=${APKS#"$NL"}
BODY="$(sed 's/^\* \*\*/↪ \*\*/g; s/^\* `/↪ \*\*/g; s/`/\*/g; s/^\* /\↪/g; s/\*\*/\*/g; s/###//g;' ../build.md)"
BODY="$(sed 's/^\* \*\*/↪ \*\*/g; s/^\* `/↪ \*\*/g; s/`/\*/g; s/^\* /\↪/g; s/\*\*/\*/g; s/###//g; s/^- /↪ /g; /^==/d;' ../build.md)"
MSG="*New build!*
${BODY}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ jobs:
PATCHES_SRC=$(toml_get "$(toml_get_table "")" patches-source) || PATCHES_SRC="revanced/revanced-patches"
last_patches_url=$(gh_req https://api.github.com/repos/${PATCHES_SRC}/releases/latest - | json_get 'browser_download_url' | grep 'jar')
last_patches=${last_patches_url##*/}
cur_patches=$(sed -n 's/.*Patches: \(.*\)/\1/p' build.md | xargs)
cur_patches=$(sed -n "s/.*Patches: .*${PATCHES_SRC%%/*}\/\(.*\)/\1/p" build.md | xargs)
echo "current patches version: $cur_patches"
echo "latest patches version: $last_patches"
if [ -z "$cur_patches" ] || [ -z "$last_patches" ]; then return 1; fi
[ "$cur_patches" != "$last_patches" ] # test success=>build, fail=>dont build
}
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
/revanced-cache
/temp
/build
/test
test*
/logs
build.md
cmpr
test.toml
options.toml
39 changes: 15 additions & 24 deletions CONFIG.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
# Config

Three APK download websites are supported and adding a new app is as easy as this:
Adding another revanced app is as easy as this:
```toml
[Some-App]
apkmirror-dlurl = "https://www.apkmirror.com/apk/inc/app"
```
or:
```toml
[Some-App]
uptodown-dlurl = "https://app.en.uptodown.com/android"
```
or:
```toml
[Some-App]
apkmonk-dlurl = "https://www.apkmonk.com/app/com.app.app/"
# or uptodown-dlurl = "https://app.en.uptodown.com/android"
# or apkmonk-dlurl = "https://www.apkmonk.com/app/com.app.app/"
```

## If you'd like to get to know more about other options:
## More about other options:

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.

```toml
parallel-jobs = 1 # amount of cores to use for parallel patching, if not set nproc is used
patches-source = "revanced/revanced-patches" # where to fetch patches bundle from. default: "revanced/revanced-patches"
integrations-source = "revanced/revanced-integrations" # where to fetch integrations from. default: "revanced/revanced-integrations"
rv-brand = "ReVanced Extended" # rebrand from 'ReVanced' to something different. default: "ReVanced"
Expand All @@ -35,20 +28,18 @@ enabled = true # whether to build the app. default: true
version = "auto" # 'auto', 'latest', 'beta' or a custom one e.g. '17.40.41'. default: auto
# 'auto' option gets the latest possible version supported by all the included patches
# 'latest' gets the latest stable without checking patches support. 'beta' gets the latest beta/alpha
build-mode = "both" # 'both', 'apk' or 'module'. default: apk
excluded-patches = "some-patch some-other-path" # whitespace seperated list of patches to exclude. default: "" (empty)
include-stock = true # includes stock apk in the module. default: true
build-mode = "apk" # 'both', 'apk' or 'module'. default: apk
excluded-patches = "some-patch some-other-patch" # whitespace seperated list of patches to exclude. default: "" (empty)
included-patches = "patch-name" # whitespace seperated list of patches to include, all default patches are included by default. default: "" (empty)
exclusive-patches = false # exclude all patches by default. default: false
apkmirror-dlurl = "https://www.apkmirror.com/apk/inc/app" # download url. if not set, uptodown dl url is used.
uptodown-dlurl = "https://spotify.en.uptodown.com/android" # uptodown url. if not set, apkmirror dl url is used. apkmirror is prioritized
apkmonk-dlurl = "https://www.apkmonk.com/app/com.app.app/" # apkmonk url.
module-prop-name = "some-app-magisk" # magisk module prop name. not required.
merge-integrations = false # set false to never merge even when needed default: true
apkmirror-dlurl = "https://www.apkmirror.com/apk/inc/app"
uptodown-dlurl = "https://spotify.en.uptodown.com/android"
apkmonk-dlurl = "https://www.apkmonk.com/app/com.app.app/"
module-prop-name = "some-app-magisk" # magisk module prop name.
merge-integrations = false # set false to never merge even when needed. default: true
dpi = "360-480dpi" # used to select apk variant from apkmirror. default: nodpi
arch = "arm64-v8a" # 'arm64-v8a', 'arm-v7a' or 'all'. default: all
# arch option is sometimes needed to be able to download the apks from apkmirror.
arch = "arm64-v8a" # 'arm64-v8a', 'arm-v7a', 'universal', 'both'. default: universal
# arch option is only for downloading from apkmirror. both downloads both arm64-v8a and arm-v7a.
# and does not affect anything else
```

# Building ReVanced Extended
Use [`config-rv-ex.toml`](./config-rv-ex.toml) as the config. Or you can run build.sh as: `./build.sh config-rv-ex.toml`
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#### ⚠️ Do not download modules from 3rd party sources like random websites you found on Google. Only use this repository. I am not responsible for anything they may contain.
#### ⚠️ Do not download modules from 3rd party sources like random websites you found on Google. There are many that uses my modules and impersonates ReVanced.

# ReVanced eXtended
[![Build Modules](https://github.com/NoName-exe/revanced-extended/actions/workflows/build.yml/badge.svg)](https://github.com/NoName-exe/revanced-extended/actions/workflows/build.yml)
Expand All @@ -15,6 +15,7 @@ Get the [latest CI release](https://github.com/NoName-exe/revanced-extended/rele
* Receive updates from Magisk app.
* Should not break safetynet or trigger root detections used by certain apps.
* Handle installation of the correct version of the stock app and all that.
* Support Magisk and KernelSU.

## Notes
* YouTube Magisk Module is installed as a system app and requires a reboot to install/update.
Expand Down
17 changes: 6 additions & 11 deletions build-termux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ ask() {
return 1
}

CFG=config.toml

if [ ! -f ~/.rvmm_"$(date '+%Y%m')" ]; then
pr "Setting up environment..."
yes "" | pkg update -y && pkg install -y openssl git wget jq openjdk-17 zip
Expand All @@ -34,29 +32,26 @@ if [ -d revanced-magisk-module ]; then
if git -C revanced-magisk-module status | grep -q 'is behind'; then
pr "revanced-magisk-module already is not synced with upstream."
pr "Cloning revanced-magisk-module. config.toml will be preserved."
cp -f revanced-magisk-module/config*toml .
cp -f revanced-magisk-module/config.toml .
rm -rf revanced-magisk-module
git clone https://github.com/j-hc/revanced-magisk-module --recurse --depth 1
mv -f config*toml revanced-magisk-module/
mv -f config.toml revanced-magisk-module/config.toml
fi
else
pr "Cloning revanced-magisk-module."
git clone https://github.com/j-hc/revanced-magisk-module --recurse --depth 1
sed -i '/^enabled.*/d; /^\[.*\]/a enabled = false' revanced-magisk-module/config*toml
sed -i '/^enabled.*/d; /^\[.*\]/a enabled = false' revanced-magisk-module/config.toml
fi
cd revanced-magisk-module
chmod +x build.sh build-termux.sh

if ! ask "Select config (y=revanced n=revanced extended)"; then
CFG=config-rv-ex.toml
fi
if ask "Do you want to open the config for customizations? [y/n]"; then
nano $CFG
if ask "Do you want to open the config.toml for customizations? [y/n]"; then
nano config.toml
fi
if ! ask "Setup is done. Do you want to start building? [y/n]"; then
exit 0
fi
./build.sh $CFG
./build.sh

cd build
pr "Ask for storage permission"
Expand Down
Loading

0 comments on commit 1983a89

Please sign in to comment.