diff --git a/build.sh b/build.sh index 3f5dc8a..5a58e83 100755 --- a/build.sh +++ b/build.sh @@ -137,6 +137,10 @@ for table_name in $(toml_get_table_names); do app_args[apkmirror_dlurl]=${app_args[apkmirror_dlurl]%/} app_args[dl_from]=apkmirror } || app_args[apkmirror_dlurl]="" + app_args[archive_dlurl]=$(toml_get "$t" archive-dlurl) && { + app_args[archive_dlurl]=${app_args[archive_dlurl]%/} + app_args[dl_from]=archive + } || app_args[archive_dlurl]="" if [ -z "${app_args[dl_from]:-}" ]; then abort "ERROR: no 'apkmirror_dlurl', 'uptodown_dlurl' or 'apkmonk_dlurl' option was set for '$table_name'."; fi app_args[arch]=$(toml_get "$t" apkmirror-arch) || app_args[arch]="universal" app_args[include_stock]=$(toml_get "$t" include-stock) || app_args[include_stock]=true && vtf "${app_args[include_stock]}" "include-stock" diff --git a/config.toml b/config.toml index b619002..4641882 100755 --- a/config.toml +++ b/config.toml @@ -1,4 +1,3 @@ -parallel-jobs = 1 logging-to-file = true # enables logging of every patch process to a seperate file enable-magisk-update = true # set this to false if you do not want to receive updates for the module in magisk app @@ -10,7 +9,7 @@ build-mode = "both" # 'both', excluded-patches = "" # space-seperated patches to exclude (multiline strings are not supported) included-patches = "" # space-seperated patches to include (non-excluded patches are included by default) version = "auto" # 'auto', 'latest', 'beta' or a custom one like '17.40.41' -apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube/" +archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.youtube" [Music-Extended] app-name = "Music" @@ -19,7 +18,7 @@ integrations-source = "inotia00/revanced-integrations" cli-source = "inotia00/revanced-cli" rv-brand = "ReVanced Extended" build-mode = "both" -apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube-music/" +archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.apps.youtube.music" apkmirror-arch = "both" [YouTube-Extended] @@ -29,26 +28,26 @@ integrations-source = "inotia00/revanced-integrations" cli-source = "inotia00/revanced-cli" rv-brand = "ReVanced Extended" build-mode = "both" -apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube/" +archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.youtube" [Music] build-mode = "both" -apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube-music/" +archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.apps.youtube.music" apkmirror-arch = "both" [Twitter] build-mode = "apk" -uptodown-dlurl = "https://twitter.en.uptodown.com/android" +archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.twitter.android" [Twitch] -uptodown-dlurl = "https://twitch.en.uptodown.com/android" +archive-dlurl = "https://archive.org/download/jhc-apks/apks/tv.twitch.android.app" [TikTok] enabled = false -uptodown-dlurl = "https://tiktok.en.uptodown.com/android" +archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.zhiliaoapp.musically" [Reddit] -uptodown-dlurl = "https://reddit-official-app.en.uptodown.com/android" +archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.reddit.frontpage" [Lightroom] enabled = false diff --git a/utils.sh b/utils.sh index 2f811c2..5b4b8f2 100755 --- a/utils.sh +++ b/utils.sh @@ -293,6 +293,19 @@ dl_apkmonk() { } get_apkmonk_pkg_name() { grep -oP '.*apkmonk\.com\/app\/\K([,\w,\.]*)' <<<"$1"; } # -------------------------------------------------- +dl_archive() { + local archive_resp=$1 version=$2 arch=$3 output=$4 url=$5 + local path + path=$(grep "${version}-${arch}" <<<"$archive_resp") || return 1 + req "${url}/${path}" "$output" +} +get_archive_resp() { + r=$(req "$1" -) + if [ -z "$r" ]; then return 1; else sed -n 's;^