Fix CI and build script

Former-commit-id: 8cf062b06617c5cf28d58ff1200618ad5b232337
This commit is contained in:
j-hc 2022-06-25 19:33:01 +03:00
parent 0d5ec73e4b
commit cb7f3ec238
5 changed files with 14 additions and 14 deletions

View File

@ -1,7 +1,7 @@
# Building the Magisk Module
This repo includes the base.apk of the stock YouTube app (v17.24.34) and a simple script that
download all necessary prebuilt revanced tools and creates a magisk module
download all the latest version of necessary prebuilt revanced tools and creates a magisk module
# Usage

View File

@ -26,13 +26,13 @@ RV_INTEGRATIONS_APK=$(echo $RV_INTEGRATIONS_URL | awk -F/ '{ print $NF }')
RV_PATCHES_URL=$(wget -nv -O - https://api.github.com/repos/revanced/revanced-patches/releases/latest | sed -n 's/.*"browser_download_url": "\(.*jar\)".*/\1/p')
RV_PATCHES_JAR=$(echo $RV_PATCHES_URL | awk -F/ '{ print $NF }')
if [[ ! -f RV_CLI_JAR ]]; then
if [[ ! -f "$RV_CLI_JAR" ]]; then
dl $RV_CLI_URL
fi
if [[ ! -f RV_INTEGRATIONS_APK ]]; then
if [[ ! -f "$RV_INTEGRATIONS_APK" ]]; then
dl $RV_INTEGRATIONS_URL
fi
if [[ ! -f RV_PATCHES_JAR ]]; then
if [[ ! -f "$RV_PATCHES_JAR" ]]; then
dl $RV_PATCHES_URL
fi
@ -42,9 +42,11 @@ java -jar $RV_CLI_JAR -a $YTBASE -c -o revanced-base.apk -b $RV_PATCHES_JAR -e m
exit 1
}
mv revanced-base.apk ./revanced-magisk/revanced-base.apk
mv -f revanced-base.apk ./revanced-magisk/revanced-base.apk
echo "Creating the magisk module..."
zip -r $OUTPUT ./revanced-magisk
cd revanced-magisk
zip -r ../$OUTPUT .
echo "Created the magisk module '$OUTPUT'"

View File

@ -1,19 +1,17 @@
while [ "$(getprop sys.boot_completed)" != 1 ];
do sleep 1;
done;
while [ "$(getprop sys.boot_completed)" != 1 ]; do
sleep 1
done
# >A11
YTPATH=$(readlink -f /data/app/*/com.google.android.youtube*/oat | sed 's/\/oat//g')
if [ ! -z "$YTPATH" ]
then
if [ ! -z "$YTPATH" ]; then
su -c mount $MODDIR/revanced-base.apk $YTPATH/base.apk
else
# <A11
YTPATH=$(readlink -f /data/app/com.google.android.youtube*/oat | sed 's/\/oat//g')
if [ ! -z "$YTPATH" ]
then
if [ ! -z "$YTPATH" ]; then
su -c mount $MODDIR/revanced-base.apk $YTPATH/base.apk
fi
fi