mirror of
https://github.com/SinTan1729/ReVancedBuilder.git
synced 2024-12-26 20:58:37 -06:00
Fix naming issues
This commit is contained in:
parent
2a16180368
commit
043fc60f65
2 changed files with 14 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
||||||
# Revanced Build
|
# Revanced Build
|
||||||
This repo template will allow one to build [ReVanced](https://github.com/revanced/) apps automatically. It uses [telegram.sh](https://github.com/fabianonline/telegram.sh) and [telegram-upload](https://github.com/Nekmo/telegram-upload) to messages. Make sure that `Java 17` is installed and selected as default.
|
This repo template will allow one to build [ReVanced](https://github.com/revanced/) apps automatically and post it to a telegram channel to access and possibly share the builds with friends. It uses [telegram.sh](https://github.com/fabianonline/telegram.sh) and [telegram-upload](https://github.com/Nekmo/telegram-upload) to messages. Make sure that `Java 17` is installed and selected as default.
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
Just run `./build_revanced <working-directory> (force/clean/experimental)`. Might be a good idea to set it up to run periodically using cron. I currently use the following in a user crontab to run it everyday at 6 AM:
|
Just run `./build_revanced <working-directory> (force/clean/experimental)`. Might be a good idea to set it up to run periodically using cron. I currently use the following in a user crontab to run it everyday at 6 AM:
|
||||||
|
@ -10,6 +10,8 @@ Just run `./build_revanced <working-directory> (force/clean/experimental)`. Migh
|
||||||
## Notes
|
## Notes
|
||||||
- The script will download the **automatically selected compatible version** (using compatibility of patches as listed [here](https://github.com/revanced/revanced-patches#list-of-available-patches)) of Youtube on APKMirror, **NOT** latest official version on Google Play.
|
- The script will download the **automatically selected compatible version** (using compatibility of patches as listed [here](https://github.com/revanced/revanced-patches#list-of-available-patches)) of Youtube on APKMirror, **NOT** latest official version on Google Play.
|
||||||
- Under **NO CIRCUMSTANCES** any APKs will be uploaded to this repository to avoid DMCA.
|
- Under **NO CIRCUMSTANCES** any APKs will be uploaded to this repository to avoid DMCA.
|
||||||
|
- The script assumes that the working directory has the `telegram.sh` script along with a working config file, and `telegram-upload` installed and working. For their config, look at the links provided on top.
|
||||||
|
- In the current configuration, the script only builds YouTube ReVanced and YouTube Music ReVanced (both nonroot), but it's easy to add support for any other ReVanced app. The code for root builds is included but commented out.
|
||||||
|
|
||||||
## Customize your build
|
## Customize your build
|
||||||
If you wish to continue with the default settings, you may skip this step.
|
If you wish to continue with the default settings, you may skip this step.
|
||||||
|
|
|
@ -134,12 +134,12 @@ if [ -f "com.google.android.youtube.apk" ]; then
|
||||||
# java -jar revanced-cli.jar -m revanced-integrations.apk -b revanced-patches.jar --mount \
|
# java -jar revanced-cli.jar -m revanced-integrations.apk -b revanced-patches.jar --mount \
|
||||||
# -e microg-support ${patches[@]} \
|
# -e microg-support ${patches[@]} \
|
||||||
# $EXPERIMENTAL \
|
# $EXPERIMENTAL \
|
||||||
# -a com.google.android.youtube.apk -o build/revanced-root.apk
|
# -a com.google.android.youtube.apk -o build/revanced-yt-root.apk
|
||||||
echo "Building Non-root APK" | tee -a build.log
|
echo "Building Non-root APK" | tee -a build.log
|
||||||
java -jar revanced-cli.jar -m revanced-integrations.apk -b revanced-patches.jar \
|
java -jar revanced-cli.jar -m revanced-integrations.apk -b revanced-patches.jar \
|
||||||
${patches[@]} \
|
${patches[@]} \
|
||||||
$EXPERIMENTAL \
|
$EXPERIMENTAL \
|
||||||
-a com.google.android.youtube.apk -o revanced-yt.apk
|
-a com.google.android.youtube.apk -o revanced-yt-nonroot.apk
|
||||||
else
|
else
|
||||||
echo "Cannot find YouTube APK, skipping build" | tee -a build.log
|
echo "Cannot find YouTube APK, skipping build" | tee -a build.log
|
||||||
fi
|
fi
|
||||||
|
@ -152,25 +152,27 @@ if [ -f "com.google.android.apps.youtube.music.apk" ]; then
|
||||||
# java -jar revanced-cli.jar -b revanced-patches.jar --mount \
|
# java -jar revanced-cli.jar -b revanced-patches.jar --mount \
|
||||||
# -e microg-support ${patches[@]} \
|
# -e microg-support ${patches[@]} \
|
||||||
# $EXPERIMENTAL \
|
# $EXPERIMENTAL \
|
||||||
# -a com.google.android.apps.youtube.music.apk -o build/revanced-music-root.apk
|
# -a com.google.android.apps.youtube.music.apk -o build/revanced-ytm-root.apk
|
||||||
echo "Building Non-root APK" | tee -a build.log
|
echo "Building Non-root APK" | tee -a build.log
|
||||||
java -jar revanced-cli.jar -b revanced-patches.jar \
|
java -jar revanced-cli.jar -b revanced-patches.jar \
|
||||||
${patches[@]} \
|
${patches[@]} \
|
||||||
$EXPERIMENTAL \
|
$EXPERIMENTAL \
|
||||||
-a com.google.android.apps.youtube.music.apk -o revanced-ytm.apk
|
-a com.google.android.apps.youtube.music.apk -o revanced-ytm-nonroot.apk
|
||||||
else
|
else
|
||||||
echo "Cannot find YouTube Music APK, skipping build" | tee -a build.log
|
echo "Cannot find YouTube Music APK, skipping build" | tee -a build.log
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Rename files
|
# Rename files
|
||||||
mv revanced-yt.apk YouTube_ReVanced_nonroot_$timestamp.apk
|
mv revanced-yt-nonroot.apk YouTube_ReVanced_nonroot_$timestamp.apk
|
||||||
mv revanced-ytm.apk YouTube_Music_ReVanced_nonroot_$timestamp.apk
|
mv revanced-ytm-nonroot.apk YouTube_Music_ReVanced_nonroot_$timestamp.apk
|
||||||
|
# mv revanced-yt-root.apk YouTube_ReVanced_root_$timestamp.apk
|
||||||
|
# mv revanced-ytm-root.apk YouTube_Music_ReVanced_root_$timestamp.apk
|
||||||
|
|
||||||
# Send telegram message about the new build
|
# Send telegram message about the new build
|
||||||
echo "Sending messages to telegram" | tee -a build.log
|
echo "Sending messages to telegram" | tee -a build.log
|
||||||
|
|
||||||
# telegram-upload uses personal account, hence bypassing 50 MB max upload limit of bots
|
# telegram-upload uses personal account, hence bypassing 50 MB max upload limit of bots
|
||||||
/home/sintan/.local/bin/telegram-upload ReVanced-nonroot-$timestamp.apk ReVanced-Music-nonroot-$timestamp.apk --to "placeholder_for_channel_address" --caption ""
|
/home/sintan/.local/bin/telegram-upload YouTube_ReVanced_nonroot_$timestamp.apk YouTube_Music_ReVanced_nonroot_$timestamp.apk --to "placeholder_for_channel_address" --caption ""
|
||||||
|
|
||||||
# telegram.sh uses bot account, but it supports formatted messages
|
# telegram.sh uses bot account, but it supports formatted messages
|
||||||
msg=$(cat versions.json | tail -n+2 | head -n-1 | cut -c3- | sed "s/\"//g" | sed "s/,//g" | sed "s/com.google.android.apps.youtube.music/YouTube Music/" \
|
msg=$(cat versions.json | tail -n+2 | head -n-1 | cut -c3- | sed "s/\"//g" | sed "s/,//g" | sed "s/com.google.android.apps.youtube.music/YouTube Music/" \
|
||||||
|
@ -179,7 +181,8 @@ msg=$(cat versions.json | tail -n+2 | head -n-1 | cut -c3- | sed "s/\"//g" | sed
|
||||||
|
|
||||||
# Do some cleanup
|
# Do some cleanup
|
||||||
mkdir -p archive
|
mkdir -p archive
|
||||||
mv YouTube_*.apk archive/
|
mv YouTube_ReVanced_nonroot_$timestamp.apk archive/
|
||||||
|
mv YouTube_Music_ReVanced_nonroot_$timestamp.apk archive/
|
||||||
find ./archive -maxdepth 1 -type f -printf '%Ts\t%P\n' \
|
find ./archive -maxdepth 1 -type f -printf '%Ts\t%P\n' \
|
||||||
| sort -rn \
|
| sort -rn \
|
||||||
| tail -n +6 \
|
| tail -n +6 \
|
||||||
|
|
Loading…
Reference in a new issue