diff --git a/CONFIG.md b/CONFIG.md
index 7438482..227d2d3 100755
--- a/CONFIG.md
+++ b/CONFIG.md
@@ -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.
diff --git a/bin/paccer.jar b/bin/paccer.jar
index 4e18eb3..adb0ed8 100644
Binary files a/bin/paccer.jar and b/bin/paccer.jar differ
diff --git a/build.sh b/build.sh
index 8308f64..cf80dfa 100755
--- a/build.sh
+++ b/build.sh
@@ -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"
@@ -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
diff --git a/config.toml b/config.toml
index cb62c90..5408c54 100755
--- a/config.toml
+++ b/config.toml
@@ -7,7 +7,6 @@ parallel-jobs = 1
# you can use rvmm-config-gen to generate a config
[YouTube]
-enabled = false
build-mode = "module"
excluded-patches = ""
included-patches = ""
@@ -16,51 +15,48 @@ apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube" # fallback
# archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.youtube"
[Music]
-enabled = false
-build-mode = "module"
-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 = "module"
arch = "arm64-v8a"
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"
-integrations-source = "inotia00/revanced-integrations"
-cli-source = "inotia00/revanced-cli"
-rv-brand = "ReVanced Extended"
-build-mode = "module"
-apkmirror-dlurl = "https://www.apkmirror.com/apk/google-inc/youtube"
-# archive-dlurl = "https://archive.org/download/jhc-apks/apks/com.google.android.youtube"
+[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"
+
+# [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
apkmirror-dlurl = "https://www.apkmirror.com/apk/x-corp/twitter"
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"
diff --git a/options.json b/options.json
deleted file mode 100644
index 0637a08..0000000
--- a/options.json
+++ /dev/null
@@ -1 +0,0 @@
-[]
\ No newline at end of file
diff --git a/revanced-magisk/customize.sh b/revanced-magisk/customize.sh
index 28970d0..4cd0c5f 100755
--- a/revanced-magisk/customize.sh
+++ b/revanced-magisk/customize.sh
@@ -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
@@ -133,17 +136,17 @@ install() {
settings put global verifier_verify_adb_installs "$VERIF_ADB"
}
if [ $INS = true ] && ! install; then abort; fi
-
-BASEPATHLIB=${BASEPATH}/lib/${ARCH}
-if [ -z "$(ls -A1 "$BASEPATHLIB")" ]; then
+if [ $INS = true ] || [ -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
+ BASEPATHLIB=${BASEPATH}/lib/${ARCH}
+ if [ ! -d "$BASEPATHLIB" ]; then mkdir -p "$BASEPATHLIB"; else rm -f "$BASEPATHLIB"/* >/dev/null 2>&1 || :; fi
+ if ! op=$(unzip -o -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
fi
+
ui_print "* Setting Permissions"
set_perm "$MODPATH/base.apk" 1000 1000 644 u:object_r:apk_data_file:s0
diff --git a/utils.sh b/utils.sh
index de70c83..1005f8a 100755
--- a/utils.sh
+++ b/utils.sh
@@ -2,9 +2,9 @@
MODULE_TEMPLATE_DIR="revanced-magisk"
CWD=$(pwd)
-TEMP_DIR=${CWD}/"temp"
-BIN_DIR=${CWD}/"bin"
-BUILD_DIR=${CWD}/"build"
+TEMP_DIR="temp"
+BIN_DIR="bin"
+BUILD_DIR="build"
if [ "${GITHUB_TOKEN-}" ]; then GH_HEADER="Authorization: token ${GITHUB_TOKEN}"; else GH_HEADER=; fi
NEXT_VER_CODE=${NEXT_VER_CODE:-$(date +'%Y%m%d')}
@@ -36,19 +36,19 @@ abort() {
}
get_rv_prebuilts() {
- local cli_src=$1 cli_ver=$2 integrations_src=$3 integrations_ver=$4 patches_src=$5 patches_ver=$6
- local integs_file=""
+ local cli_src=$1 cli_ver=$2 patches_src=$3 patches_ver=$4
pr "Getting prebuilts (${patches_src%/*})" >&2
local cl_dir=${patches_src%/*}
cl_dir=${TEMP_DIR}/${cl_dir,,}-rv
[ -d "$cl_dir" ] || mkdir "$cl_dir"
- for src_ver in "$cli_src CLI $cli_ver" "$integrations_src Integrations $integrations_ver" "$patches_src Patches $patches_ver"; do
+ for src_ver in "$cli_src CLI $cli_ver revanced-cli" "$patches_src Patches $patches_ver patches"; do
set -- $src_ver
- local src=$1 tag=$2 ver=${3-} ext
- if [ "$tag" = "CLI" ] || [ "$tag" = "Patches" ]; then
+ local src=$1 tag=$2 ver=${3-} fprefix=$4
+ local ext
+ if [ "$tag" = "CLI" ]; then
ext="jar"
- elif [ "$tag" = "Integrations" ]; then
- ext="apk"
+ elif [ "$tag" = "Patches" ]; then
+ ext="rvp"
else abort unreachable; fi
local dir=${src%/*}
dir=${TEMP_DIR}/${dir,,}-rv
@@ -66,7 +66,7 @@ get_rv_prebuilts() {
fi
local url file tag_name name
- file=$(find "$dir" -name "revanced-${tag,,}-${name_ver#v}.${ext}" -type f 2>/dev/null)
+ file=$(find "$dir" -name "${fprefix}-${name_ver#v}.${ext}" -type f 2>/dev/null)
if [ -z "$file" ]; then
local resp asset name
resp=$(gh_req "$rv_rel" -) || return 1
@@ -77,7 +77,6 @@ get_rv_prebuilts() {
name=$(jq -r .name <<<"$asset")
file="${dir}/${name}"
gh_dl "$file" "$url" >&2 || return 1
- if [ "$tag" = "Integrations" ]; then integs_file=$file; fi
echo "$tag: $(cut -d/ -f1 <<<"$src")/${name} " >>"${cl_dir}/changelog.md"
else
local for_err=$file
@@ -89,37 +88,26 @@ get_rv_prebuilts() {
tag_name=$(cut -d'-' -f3- <<<"$name")
tag_name=v${tag_name%.*}
fi
-
- echo -n "$file "
if [ "$tag" = "Patches" ]; then
- name="patches-${tag_name}.json"
- file="${dir}/${name}"
- if [ ! -f "$file" ]; then
- resp=$(gh_req "$rv_rel" -) || return 1
- if [ "$ver" = "dev" ]; then resp=$(jq -r '.[0]' <<<"$resp"); fi
- url=$(jq -e -r '.assets[] | select(.name | endswith("json")) | .url' <<<"$resp") || return 1
- gh_dl "$file" "$url" >&2 || return 1
- echo -e "[Changelog](https://github.com/${src}/releases/tag/${tag_name})\n" >>"${cl_dir}/changelog.md"
+ if [ ! -f "$file" ]; then echo -e "[Changelog](https://github.com/${src}/releases/tag/${tag_name})\n" >>"${cl_dir}/changelog.md"; fi
+ if [ "$REMOVE_RV_INTEGRATIONS_CHECKS" = true ]; then
+ if ! (
+ mkdir -p "${file}-zip" || return 1
+ unzip -qo "${file}" -d "${file}-zip" || return 1
+ java -cp "${BIN_DIR}/paccer.jar:${BIN_DIR}/dexlib2.jar" com.jhc.Main "${file}-zip/extensions/shared.rve" "${file}-zip/extensions/shared-patched.rve" || return 1
+ mv -f "${file}-zip/extensions/shared-patched.rve" "${file}-zip/extensions/shared.rve" || return 1
+ rm "${file}" || return 1
+ cd "${file}-zip" || abort
+ zip -0rq "${CWD}/${file}" . || return 1
+ ) >&2; then
+ echo >&2 "Patching revanced-integrations failed"
+ fi
+ rm -r "${file}-zip" || :
fi
- echo -n "$file "
fi
+ echo -n "$file "
done
echo
-
- if [ "$integs_file" ] && [ "$REMOVE_RV_INTEGRATIONS_CHECKS" = true ]; then
- if ! (
- mkdir -p "${integs_file}-zip" || return 1
- unzip -qo "${integs_file}" -d "${integs_file}-zip" || return 1
- cd "${integs_file}-zip" || return 1
- java -cp "${BIN_DIR}/paccer.jar:${BIN_DIR}/dexlib2.jar" com.jhc.Main "${integs_file}-zip/classes.dex" "${integs_file}-zip/classes-patched.dex" || return 1
- mv -f "${integs_file}-zip/classes-patched.dex" "${integs_file}-zip/classes.dex" || return 1
- rm "${integs_file}" || return 1
- zip -0rq "${integs_file}" . || return 1
- ) >&2; then
- echo >&2 "Patching revanced-integrations failed"
- fi
- rm -r "${integs_file}-zip" || :
- fi
}
get_prebuilts() {
@@ -170,8 +158,7 @@ config_update() {
else
last_patches=$(gh_req "$rv_rel/tags/${ver}" -)
fi
-
- if ! last_patches=$(jq -e -r '.assets[] | select(.name | endswith("jar")) | .name' <<<"$last_patches"); then
+ if ! last_patches=$(jq -e -r '.assets[] | select(.name | endswith("rvp")) | .name' <<<"$last_patches"); then
abort oops
fi
if [ "$last_patches" ]; then
@@ -216,7 +203,7 @@ gh_dl() {
}
log() { echo -e "$1 " >>"build.md"; }
-get_largest_ver() {
+get_highest_ver() {
local vers m
vers=$(tee)
m=$(head -1 <<<"$vers")
@@ -228,19 +215,33 @@ semver_validate() {
[ ${#ac} = 0 ]
}
get_patch_last_supported_ver() {
- local inc_sel exc_sel vs
- inc_sel=$(list_args "$2" | sed 's/.*/\.name == &/' | paste -sd '~' | sed 's/~/ or /g' || :)
- exc_sel=$(list_args "$3" | sed 's/.*/\.name != &/' | paste -sd '~' | sed 's/~/ and /g' || :)
- inc_sel=${inc_sel:-false}
- if [ "$4" = false ]; then inc_sel="${inc_sel} or .use==true"; fi
- if ! vs=$(jq -e -r ".[]
- | select(.compatiblePackages // [] | .[] | .name==\"${1}\")
- | select(${inc_sel})
- | select(${exc_sel:-true})
- | .compatiblePackages[].versions // []" "$5"); then
- abort "error in jq query"
+ local pkg_name=$1 inc_sel=$2 _exc_sel=$3 _exclusive=$4 # TODO: resolve using all of these
+ local op
+ if [ "$inc_sel" ]; then
+ if ! op=$(java -jar "$rv_cli_jar" list-patches "$rv_patches_jar" -f "$pkg_name" -v -p 2>&1 | awk '{$1=$1}1'); then
+ epr "list-patches: '$op'"
+ return 1
+ fi
+ local ver vers="" NL=$'\n'
+ while IFS= read -r line; do
+ line="${line:1:${#line}-2}"
+ ver=$(sed -n "/^Name: $line\$/,/^\$/p" <<<"$op" | sed -n "/^Compatible versions:\$/,/^\$/p" | tail -n +2)
+ vers=${ver}${NL}
+ done <<<"$(list_args "$inc_sel")"
+ vers=$(awk '{$1=$1}1' <<<"$vers")
+ if [ "$vers" ]; then
+ get_highest_ver <<<"$vers"
+ return
+ fi
fi
- tr -d ' ,\t[]"' <<<"$vs" | sort -u | grep -v '^$' | get_largest_ver || :
+ if ! op=$(java -jar "$rv_cli_jar" list-versions "$rv_patches_jar" -f "$pkg_name" 2>&1 | tail -n +3 | awk '{$1=$1}1'); then
+ epr "list-versions: '$op'"
+ return 1
+ fi
+ if [ "$op" = "Any" ]; then return; fi
+ pcount=$(head -1 <<<"$op") pcount=${pcount#*(} pcount=${pcount% *}
+ if [ -z "$pcount" ]; then abort "unreachable: '$pcount'"; fi
+ grep -F "($pcount patch" <<<"$op" | sed 's/ (.* patch.*//' | get_highest_ver || return 1
}
isoneof() {
@@ -261,10 +262,10 @@ merge_splits() {
# this is required because of apksig
mkdir "${bundle}-zip"
unzip -qo "${bundle}.mzip" -d "${bundle}-zip"
- cd "${bundle}-zip" || abort
- zip -0rq "${bundle}.zip" .
- cd "$CWD" || abort
- # if building apk, sign the merged apk properly
+ pushd "${bundle}-zip" || abort
+ zip -0rq "${CWD}/${bundle}.zip" .
+ popd || abort
+ # if building module, sign the merged apk properly
if isoneof "module" "${build_mode_arr[@]}"; then
patch_apk "${bundle}.zip" "${output}" "--exclusive" "${args[cli]}" "${args[ptjar]}"
local ret=$?
@@ -329,7 +330,7 @@ dl_apkmirror() {
get_apkmirror_vers() {
local vers apkm_resp
apkm_resp=$(req "https://www.apkmirror.com/uploads/?appcategory=${__APKMIRROR_CAT__}" -)
- vers=$(sed -n 's;.*Version:\(.*\) .*;\1;p' <<<"$apkm_resp")
+ vers=$(sed -n 's;.*Version:\(.*\) .*;\1;p' <<<"$apkm_resp" | awk '{$1=$1}1')
if [ "$__AAV__" = false ]; then
local IFS=$'\n'
vers=$(grep -iv "\(beta\|alpha\)" <<<"$vers")
@@ -403,8 +404,9 @@ get_archive_pkg_name() { echo "$__ARCHIVE_PKG_NAME__"; }
patch_apk() {
local stock_input=$1 patched_apk=$2 patcher_args=$3 rv_cli_jar=$4 rv_patches_jar=$5
- local cmd="java -jar $rv_cli_jar patch $stock_input -p -o $patched_apk -b $rv_patches_jar $patcher_args --keystore=ks.keystore \
---keystore-entry-password=123456789 --keystore-password=123456789 --signer=jhc --keystore-entry-alias=jhc --options=options.json"
+ # TODO: --options
+ local cmd="java -jar $rv_cli_jar patch $stock_input --purge -o $patched_apk -p $rv_patches_jar --keystore=ks.keystore \
+--keystore-entry-password=123456789 --keystore-password=123456789 --signer=jhc --keystore-entry-alias=jhc $patcher_args"
if [ "$OS" = Android ]; then cmd+=" --custom-aapt2-binary=${AAPT2}"; fi
pr "$cmd"
if eval "$cmd"; then [ -f "$patched_apk" ]; else
@@ -435,7 +437,7 @@ build_rv() {
local arch_f="${arch// /}"
local p_patcher_args=()
- p_patcher_args+=("$(join_args "${args[excluded_patches]}" -e) $(join_args "${args[included_patches]}" -i)")
+ p_patcher_args+=("$(join_args "${args[excluded_patches]}" -d) $(join_args "${args[included_patches]}" -e)")
[ "${args[exclusive_patches]}" = true ] && p_patcher_args+=("--exclusive")
local tried_dl=()
@@ -457,7 +459,7 @@ build_rv() {
local get_latest_ver=false
if [ "$version_mode" = auto ]; then
if ! version=$(get_patch_last_supported_ver "$pkg_name" \
- "${args[included_patches]}" "${args[excluded_patches]}" "${args[exclusive_patches]}" "${args[ptjs]}"); then
+ "${args[included_patches]}" "${args[excluded_patches]}" "${args[exclusive_patches]}"); then
exit 1
elif [ -z "$version" ]; then get_latest_ver=true; fi
elif isoneof "$version_mode" latest beta; then
@@ -470,7 +472,7 @@ build_rv() {
if [ $get_latest_ver = true ]; then
if [ "$version_mode" = beta ]; then __AAV__="true"; else __AAV__="false"; fi
pkgvers=$(get_"${dl_from}"_vers)
- version=$(get_largest_ver <<<"$pkgvers") || version=$(head -1 <<<"$pkgvers")
+ version=$(get_highest_ver <<<"$pkgvers") || version=$(head -1 <<<"$pkgvers")
fi
if [ -z "$version" ]; then
epr "empty version, not building ${table}."
@@ -507,9 +509,9 @@ build_rv() {
fi
log "${table}: ${version}"
- p_patcher_args+=("-m ${args[integ]}")
local microg_patch
- microg_patch=$(jq -r ".[] | select(.compatiblePackages // [] | .[] | .name==\"${pkg_name}\") | .name" "${args[ptjs]}" | grep -i "gmscore\|microg" || :)
+ microg_patch=$(java -jar "$rv_cli_jar" list-patches "$rv_patches_jar" -f "$pkg_name" -v -p 2>&1 |
+ grep "^Name: " | grep -i "gmscore\|microg" || :) microg_patch=${microg_patch#*: }
if [ -n "$microg_patch" ] && [[ ${p_patcher_args[*]} =~ $microg_patch ]]; then
epr "You cant include/exclude microg patches as that's done by rvmm builder automatically."
p_patcher_args=("${p_patcher_args[@]//-[ei] ${microg_patch}/}")
@@ -524,9 +526,9 @@ build_rv() {
if [ -n "$microg_patch" ]; then
patched_apk="${TEMP_DIR}/${app_name_l}-${rv_brand_f}-${version_f}-${arch_f}-${build_mode}.apk"
if [ "$build_mode" = apk ]; then
- patcher_args+=("-i \"${microg_patch}\"")
- elif [ "$build_mode" = module ]; then
patcher_args+=("-e \"${microg_patch}\"")
+ elif [ "$build_mode" = module ]; then
+ patcher_args+=("-d \"${microg_patch}\"")
fi
else
patched_apk="${TEMP_DIR}/${app_name_l}-${rv_brand_f}-${version_f}-${arch_f}.apk"
@@ -574,7 +576,7 @@ build_rv() {
cp -f "$patched_apk" "${base_template}/base.apk"
if [ "${args[include_stock]}" = true ]; then cp -f "$stock_apk" "${base_template}/${pkg_name}.apk"; fi
pushd >/dev/null "$base_template" || abort "Module template dir not found"
- zip -"$COMPRESSION_LEVEL" -FSqr "${BUILD_DIR}/${module_output}" .
+ zip -"$COMPRESSION_LEVEL" -FSqr "${CWD}/${BUILD_DIR}/${module_output}" .
popd >/dev/null || :
pr "Built ${table} (root): '${BUILD_DIR}/${module_output}'"
done