Skip to content

Commit

Permalink
Merge branch 'j-hc:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
iamsmmh authored Nov 12, 2024
2 parents e2521d6 + 1969e07 commit bd2812e
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 118 deletions.
2 changes: 0 additions & 2 deletions CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ compression-level = 9 # module zip compression level
remove-rv-integrations-checks = true # remove checks from the revanced integrations

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"
cli-source = "j-hc/revanced-cli" # where to fetch cli from. default: "j-hc/revanced-cli"
# options like cli-source can also set per app
rv-brand = "ReVanced Extended" # rebrand from 'ReVanced' to something different. default: "ReVanced"

patches-version = "v2.160.0" # 'latest', 'dev', or a version number. default: "latest"
# integrations-version and cli-version can be also configured

[Some-App]
app-name = "SomeApp" # if set, release name becomes SomeApp instead of Some-App. default is same as table name, which is 'Some-App' here.
Expand Down
Binary file modified bin/paccer.jar
Binary file not shown.
10 changes: 2 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ fi
REMOVE_RV_INTEGRATIONS_CHECKS=$(toml_get "$main_config_t" remove-rv-integrations-checks) || REMOVE_RV_INTEGRATIONS_CHECKS="true"

DEF_PATCHES_VER=$(toml_get "$main_config_t" patches-version) || DEF_PATCHES_VER="latest"
DEF_INTEGRATIONS_VER=$(toml_get "$main_config_t" integrations-version) || DEF_INTEGRATIONS_VER="latest"
DEF_CLI_VER=$(toml_get "$main_config_t" cli-version) || DEF_CLI_VER="latest"
DEF_PATCHES_SRC=$(toml_get "$main_config_t" patches-source) || DEF_PATCHES_SRC="ReVanced/revanced-patches"
DEF_INTEGRATIONS_SRC=$(toml_get "$main_config_t" integrations-source) || DEF_INTEGRATIONS_SRC="ReVanced/revanced-integrations"
DEF_CLI_SRC=$(toml_get "$main_config_t" cli-source) || DEF_CLI_SRC="j-hc/revanced-cli"
DEF_RV_BRAND=$(toml_get "$main_config_t" rv-brand) || DEF_RV_BRAND="ReVanced"
mkdir -p "$TEMP_DIR" "$BUILD_DIR"
Expand Down Expand Up @@ -73,19 +71,15 @@ for table_name in $(toml_get_table_names); do
declare -A app_args
patches_src=$(toml_get "$t" patches-source) || patches_src=$DEF_PATCHES_SRC
patches_ver=$(toml_get "$t" patches-version) || patches_ver=$DEF_PATCHES_VER
integrations_src=$(toml_get "$t" integrations-source) || integrations_src=$DEF_INTEGRATIONS_SRC
integrations_ver=$(toml_get "$t" integrations-version) || integrations_ver=$DEF_INTEGRATIONS_VER
cli_src=$(toml_get "$t" cli-source) || cli_src=$DEF_CLI_SRC
cli_ver=$(toml_get "$t" cli-version) || cli_ver=$DEF_CLI_VER

if ! RVP="$(get_rv_prebuilts "$cli_src" "$cli_ver" "$integrations_src" "$integrations_ver" "$patches_src" "$patches_ver")"; then
if ! RVP="$(get_rv_prebuilts "$cli_src" "$cli_ver" "$patches_src" "$patches_ver")"; then
abort "could not download rv prebuilts"
fi
read -r rv_cli_jar rv_integrations_apk rv_patches_jar rv_patches_json <<<"$RVP"
read -r rv_cli_jar rv_patches_jar <<<"$RVP"
app_args[cli]=$rv_cli_jar
app_args[integ]=$rv_integrations_apk
app_args[ptjar]=$rv_patches_jar
app_args[ptjs]=$rv_patches_json
if [[ -v cliriplib[${app_args[cli]}] ]]; then app_args[riplib]=${cliriplib[${app_args[cli]}]}; else
if [[ $(java -jar "${app_args[cli]}" patch 2>&1) == *rip-lib* ]]; then
cliriplib[${app_args[cli]}]=true
Expand Down
59 changes: 28 additions & 31 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,35 @@ arch = "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"

[Music-Extended]
app-name = "Music"
patches-source = "inotia00/revanced-patches"
integrations-source = "inotia00/revanced-integrations"
cli-source = "inotia00/revanced-cli"
rv-brand = "ReVanced Extended"
build-mode = "both"
arch = "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"
[Twitch]
apkmirror-dlurl = "https://www.apkmirror.com/apk/twitch-interactive-inc/twitch/"
# archive-dlurl = "https://archive.org/download/jhc-apks/apks/tv.twitch.android.app"

[YouTube-Extended]
app-name = "YouTube"
patches-source = "inotia00/revanced-patches"
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-Extended]
# app-name = "Music"
# patches-source = "inotia00/revanced-patches"
# cli-source = "inotia00/revanced-cli"
# rv-brand = "ReVanced Extended"
# build-mode = "both"
# arch = "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"

# [YouTube-Extended]
# app-name = "YouTube"
# patches-source = "inotia00/revanced-patches"
# 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"

# [Reddit-Extended]
# patches-source = "inotia00/revanced-patches"
# cli-source = "inotia00/revanced-cli"
# rv-brand = "ReVanced Extended"
# apkmirror-dlurl = "https://www.apkmirror.com/apk/redditinc/reddit/"
# # archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.reddit.frontpage"

[Twitter]
enabled = false
Expand All @@ -48,18 +57,6 @@ build-mode = "apk"
dpi = "120-640dpi"
# archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.twitter.android"

[Reddit-Extended]
patches-source = "inotia00/revanced-patches"
integrations-source = "inotia00/revanced-integrations"
cli-source = "inotia00/revanced-cli"
rv-brand = "ReVanced Extended"
apkmirror-dlurl = "https://www.apkmirror.com/apk/redditinc/reddit/"
# archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.reddit.frontpage"

[Twitch]
enabled = false
# archive-dlurl = "https://archive.org/download/jhc-apks/apks/tv.twitch.android.app"

[TikTok]
enabled = false
# archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.zhiliaoapp.musically"
Expand Down
1 change: 0 additions & 1 deletion options.json

This file was deleted.

18 changes: 10 additions & 8 deletions revanced-magisk/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ if ! pmex path "$PKG_NAME" >&2; then
BASEPATH=${BASEPATH##*:} BASEPATH=${BASEPATH%/*}
if [ "${BASEPATH:1:4}" = data ]; then
if pmex uninstall -k --user 0 "$PKG_NAME" >&2; then
rm -rf "$BASEPATH" 2>&1
ui_print "* Cleared existing $PKG_NAME package"
ui_print "* Reboot and reflash"
abort
else abort "ERROR: pm uninstall failed"; fi
else ui_print "* Installed stock $PKG_NAME package"; fi
fi
Expand Down Expand Up @@ -134,16 +137,15 @@ install() {
}
if [ $INS = true ] && ! install; then abort; fi

ui_print "* Extracting native libs"
BASEPATHLIB=${BASEPATH}/lib/${ARCH}
if [ -z "$(ls -A1 "$BASEPATHLIB")" ]; then
ui_print "* Extracting native libs"
mkdir -p "$BASEPATHLIB"
if ! op=$(unzip -j "$MODPATH"/"$PKG_NAME".apk lib/"${ARCH_LIB}"/* -d "$BASEPATHLIB" 2>&1); then
ui_print "ERROR: extracting native libs failed"
abort "$op"
fi
set_perm_recursive "${BASEPATH}/lib" 1000 1000 755 755 u:object_r:apk_data_file:s0
if [ -d "$BASEPATHLIB" ]; then mkdir -p "$BASEPATHLIB"; else rm -f "$BASEPATHLIB/*" || :; fi
if ! op=$(unzip -j "$MODPATH"/"$PKG_NAME".apk lib/"${ARCH_LIB}"/* -d "$BASEPATHLIB" 2>&1); then
ui_print "ERROR: extracting native libs failed"
abort "$op"
fi
set_perm_recursive "${BASEPATH}/lib" 1000 1000 755 755 u:object_r:apk_data_file:s0

ui_print "* Setting Permissions"
set_perm "$MODPATH/base.apk" 1000 1000 644 u:object_r:apk_data_file:s0

Expand Down
Loading

0 comments on commit bd2812e

Please sign in to comment.