Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NoName-exe authored Aug 9, 2024
2 parents 24b3218 + 90037fc commit 68520d2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
9 changes: 4 additions & 5 deletions revanced-magisk/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ ui_print "- Setting Permissions"
set_perm "$MODPATH/base.apk" 1000 1000 644 u:object_r:apk_data_file:s0

ui_print "- Mounting $PKG_NAME"
mkdir -p "$NVBASE/rvhc"
RVPATH=$NVBASE/rvhc/${MODPATH##*/}.apk
mkdir -p "/data/adb/rvhc"
RVPATH=/data/adb/rvhc/${MODPATH##*/}.apk
mv -f "$MODPATH/base.apk" "$RVPATH"

if ! op=$(mm mount -o bind "$RVPATH" "$BASEPATH/base.apk" 2>&1); then
Expand All @@ -133,6 +133,5 @@ nohup cmd package compile --reset "$PKG_NAME" >/dev/null 2>&1 &
ui_print "- Cleanup"
rm -rf "${MODPATH:?}/bin" "$MODPATH/$PKG_NAME.apk"

for s in "uninstall.sh" "service.sh"; do
sed -i "2 i\NVBASE=${NVBASE}" "$MODPATH/$s"
done
ui_print "- Done"
ui_print " "
2 changes: 1 addition & 1 deletion revanced-magisk/service.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/system/bin/sh
MODDIR=${0%/*}
RVPATH=$NVBASE/rvhc/${MODDIR##*/}.apk
RVPATH=/data/adb/rvhc/${MODDIR##*/}.apk
. "$MODDIR/config"

until [ "$(getprop sys.boot_completed)" = 1 ]; do sleep 1; done
Expand Down
4 changes: 2 additions & 2 deletions revanced-magisk/uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/system/bin/sh
{
MODDIR=${0%/*}
rm "$NVBASE/rvhc/${MODDIR##*/}".apk
rmdir "$NVBASE/rvhc"
rm "/data/adb/rvhc/${MODDIR##*/}".apk
rmdir "/data/adb/rvhc"
} &
1 change: 0 additions & 1 deletion sig.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
a2a1ad7ba7f41dfca4514e2afeb90691719af6d0fdbed4b09bbf0ed897701ceb com.google.android.apps.youtube.music
3d7a1223019aa39d9ea0e3436ab7c0896bfb4fb679f4de5fe7c23f326c8f994a com.google.android.youtube
970b91143813b4c9d5f3634f672c9fcaa5621b4efaaedafd6c235cbbb869736f com.reddit.frontpage
0fd9a0cfb07b65950997b4eaebdc53931392391aa406538a3b04073bc2ce2fe9 com.twitter.android
9041803e91bcb814b4b4399fb5c85a91640b755e5e8ba76813814bf4cf2ab5ba com.zhiliaoapp.musically
1338f9b049893cc70b78432a177582f90bd4bc6296ea4ed35bcc7df59687ac53 tv.twitch.android.app
12 changes: 6 additions & 6 deletions utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ config_update() {
fi
else
sources[$PATCHES_SRC]=0
if ! last_patches=$(gh_req "https://api.github.com/repos/${PATCHES_SRC}/releases/latest" - \
| jq -e -r '.assets[] | select(.name | endswith("jar")) | .name'); then
if ! last_patches=$(gh_req "https://api.github.com/repos/${PATCHES_SRC}/releases/latest" - |
jq -e -r '.assets[] | select(.name | endswith("jar")) | .name'); then
abort oops
fi
cur_patches=$(sed -n "s/.*Patches: ${PATCHES_SRC%%/*}\/\(.*\)/\1/p" build.md | xargs)
Expand Down Expand Up @@ -216,9 +216,9 @@ dl_apkmirror() {
node=$($HTMLQ "div.table-row.headerFont:nth-last-child($n)" -r "span:nth-child(n+3)" <<<"$resp")
if [ -z "$node" ]; then break; fi
app_table=$($HTMLQ --text --ignore-whitespace <<<"$node")
if [ "$(sed -n 3p <<<"$app_table")" = "$apkorbundle" ] && { [ "$apkorbundle" = BUNDLE ] \
|| { [ "$apkorbundle" = APK ] && [ "$(sed -n 6p <<<"$app_table")" = "$dpi" ] \
&& isoneof "$(sed -n 4p <<<"$app_table")" "${apparch[@]}"; }; }; then
if [ "$(sed -n 3p <<<"$app_table")" = "$apkorbundle" ] && { [ "$apkorbundle" = BUNDLE ] ||
{ [ "$apkorbundle" = APK ] && [ "$(sed -n 6p <<<"$app_table")" = "$dpi" ] &&
isoneof "$(sed -n 4p <<<"$app_table")" "${apparch[@]}"; }; }; then
dlurl=$($HTMLQ --base https://www.apkmirror.com --attribute href "div:nth-child(1) > a:nth-child(1)" <<<"$node")
break
fi
Expand Down Expand Up @@ -260,7 +260,7 @@ get_uptodown_resp() {
}
get_uptodown_vers() { $HTMLQ --text ".version" <<<"$__UPTODOWN_RESP__"; }
dl_uptodown() {
local uptodown_dlurl=$1 version=$2 output=$3 arch=$4 is_latest=$6
local uptodown_dlurl=$1 version=$2 output=$3 arch=$4 _dpi=$5 is_latest=$6
local url
if [ "$is_latest" = false ]; then
url=$(grep -F "${version}</span>" -B 2 <<<"$__UPTODOWN_RESP__" | head -1 | sed -n 's;.*data-url=".*download\/\(.*\)".*;\1;p') || return 1
Expand Down

0 comments on commit 68520d2

Please sign in to comment.