mirror of
https://github.com/j-hc/revanced-magisk-module.git
synced 2025-04-29 22:24:34 +02:00
update patcher args
This commit is contained in:
parent
1a6339042b
commit
3cb2af2a3b
18
README.md
18
README.md
@ -1,16 +1,22 @@
|
||||
# YouTube ReVanced Magisk Module
|
||||
|
||||
<sub>(unaffiliated what-so-ever)<sub>
|
||||
<sub>(unaffiliated whatsoever)<sub>
|
||||
|
||||
This repo includes a simple script that
|
||||
downloads all the latest version of necessary prebuilt revanced tools and the stock YouTube APK from APKMirror and creates a magisk module
|
||||
This repo includes a simple script that downloads all the latest version of necessary prebuilt revanced tools and the stock APKs of YouTube and YouTube Music from APKMirror, applies the patches and creates magisk modules
|
||||
|
||||
You will need to install the stock YouTube app matching with the module version on your phone using [SAI](https://play.google.com/store/apps/details?id=com.aefyr.sai&hl=tr&gl=US) with the split APKs
|
||||
You can go grab the split APKs from APKMirror (the bundle, not the apk or it will crash)
|
||||
You will need to install the stock YouTube app matching with the module's version on your phone using an installer like [SAI](https://play.google.com/store/apps/details?id=com.aefyr.sai&hl=tr&gl=US) **with the split APKs**.
|
||||
You can go grab the split APKs from APKMirror (the bundle, not the apk or it will crash). The link is also provided in release notes.
|
||||
|
||||
You can get the [latest CI release](https://github.com/j-hc/revanced-magisk-module/releases) from here.
|
||||
|
||||
You can get the [latest CI release](https://github.com/j-hc/revanced-magisk-module/releases) if you do not wish to build yourself.
|
||||
## Updating
|
||||
Reflashing in Magisk sometimes breaks modules for some reason. In that case just remove the module, reboot and flash again.
|
||||
|
||||
### Note
|
||||
I exclude some patches to my liking. If you want to change them:
|
||||
* Fork the repo
|
||||
* Edit the patcher args in [`build.sh`](./build.sh)
|
||||
* Start the workflow to build
|
||||
|
||||
# Building the Magisk Module
|
||||
|
||||
|
20
build.sh
20
build.sh
@ -4,11 +4,15 @@ set -e
|
||||
|
||||
source utils.sh
|
||||
|
||||
YT_PATCHER_ARGS="-e microg-support -e premium-heading -e fenster-swipe-controls -e hdr-max-brightness"
|
||||
MUSIC_PATCHER_ARGS="-e microg-support"
|
||||
|
||||
BUILD_YT=false
|
||||
BUILD_MUSIC=false
|
||||
UPDATE_PREBUILTS=true
|
||||
|
||||
print_usage() {
|
||||
echo -e "Usage:\n${0} youtube|music|all|clean"
|
||||
echo -e "Usage:\n${0} youtube|music|all|clean|reset-template"
|
||||
}
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
@ -18,6 +22,9 @@ elif [ "$1" == "clean" ]; then
|
||||
rm -rf ./temp ./revanced-cache ./*.jar ./*.apk ./*.zip ./*.keystore build.log
|
||||
reset_template
|
||||
exit 0
|
||||
elif [ "$1" == "reset-template" ]; then
|
||||
reset_template
|
||||
exit 0
|
||||
elif [ "$1" == "all" ]; then
|
||||
BUILD_YT=true
|
||||
BUILD_MUSIC=true
|
||||
@ -25,6 +32,8 @@ elif [ "$1" == "youtube" ]; then
|
||||
BUILD_YT=true
|
||||
elif [ "$1" == "music" ]; then
|
||||
BUILD_MUSIC=true
|
||||
elif [ "$2" == "--no-update" ]; then
|
||||
UPDATE_PREBUILTS=false
|
||||
else
|
||||
print_usage
|
||||
exit 1
|
||||
@ -32,14 +41,17 @@ fi
|
||||
|
||||
>build.log
|
||||
log "$(date +'%Y-%m-%d')\n"
|
||||
get_prebuilts
|
||||
|
||||
if $UPDATE_PREBUILTS; then
|
||||
get_prebuilts
|
||||
fi
|
||||
|
||||
if $BUILD_YT; then
|
||||
build_yt
|
||||
build_yt "$YT_PATCHER_ARGS"
|
||||
fi
|
||||
|
||||
if $BUILD_MUSIC; then
|
||||
build_music
|
||||
build_music "$MUSIC_PATCHER_ARGS"
|
||||
fi
|
||||
|
||||
echo "Done"
|
||||
|
6
utils.sh
6
utils.sh
@ -1,7 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
YT_PATCHER_ARGS="-e microg-support -e premium-heading"
|
||||
MUSIC_PATCHER_ARGS="-e microg-support"
|
||||
MODULE_TEMPLATE_DIR="revanced-magisk"
|
||||
TEMP_DIR="temp"
|
||||
|
||||
@ -88,7 +86,7 @@ build_yt() {
|
||||
fi
|
||||
|
||||
yt_patched_apk="${TEMP_DIR}/yt-revanced-base.apk"
|
||||
java -jar $RV_CLI_JAR -a $yt_base_apk -c -o $yt_patched_apk -b $RV_PATCHES_JAR -m $RV_INTEGRATIONS_APK $YT_PATCHER_ARGS
|
||||
java -jar $RV_CLI_JAR -a $yt_base_apk -c -o $yt_patched_apk -b $RV_PATCHES_JAR -m $RV_INTEGRATIONS_APK $1
|
||||
mv -f "$yt_patched_apk" "${MODULE_TEMPLATE_DIR}/base.apk"
|
||||
|
||||
echo "Creating the magisk module for YouTube..."
|
||||
@ -122,7 +120,7 @@ build_music() {
|
||||
unzip -p "$music_apk" "lib/arm64-v8a/libjsc.so" >"${MODULE_TEMPLATE_DIR}/libjsc.so"
|
||||
|
||||
music_patched_apk="${TEMP_DIR}/music-revanced-base.apk"
|
||||
java -jar $RV_CLI_JAR -a $music_apk -c -o $music_patched_apk -b $RV_PATCHES_JAR -m $RV_INTEGRATIONS_APK $MUSIC_PATCHER_ARGS
|
||||
java -jar $RV_CLI_JAR -a $music_apk -c -o $music_patched_apk -b $RV_PATCHES_JAR -m $RV_INTEGRATIONS_APK $1
|
||||
mv -f "$music_patched_apk" "${MODULE_TEMPLATE_DIR}/base.apk"
|
||||
|
||||
echo "Creating the magisk module for YouTube Music"
|
||||
|
Loading…
x
Reference in New Issue
Block a user