mirror of
https://github.com/j-hc/revanced-magisk-module.git
synced 2025-05-21 16:57:07 +02:00
build tiktok
This commit is contained in:
parent
3aaafd94c7
commit
66b402b81f
@ -9,7 +9,9 @@ BUILD_MUSIC_ARM64_V8A=true
|
|||||||
BUILD_MUSIC_ARM_V7A=false
|
BUILD_MUSIC_ARM_V7A=false
|
||||||
BUILD_TWITTER=true
|
BUILD_TWITTER=true
|
||||||
BUILD_REDDIT=true
|
BUILD_REDDIT=true
|
||||||
|
|
||||||
BUILD_WARN_WETTER=false
|
BUILD_WARN_WETTER=false
|
||||||
|
BUILD_TIKTOK=false
|
||||||
|
|
||||||
BUILD_MINDETACH_MODULE=true
|
BUILD_MINDETACH_MODULE=true
|
||||||
MOUNT_DELAY=1 # some low-end phones cannot mount apks on boot without a delay. increase if needed.
|
MOUNT_DELAY=1 # some low-end phones cannot mount apks on boot without a delay. increase if needed.
|
||||||
|
1
build.sh
1
build.sh
@ -41,6 +41,7 @@ if [ "$BUILD_MUSIC_ARM_V7A" = true ]; then build_music $ARM_V7A; fi
|
|||||||
if [ "$BUILD_TWITTER" = true ]; then build_twitter; fi
|
if [ "$BUILD_TWITTER" = true ]; then build_twitter; fi
|
||||||
if [ "$BUILD_REDDIT" = true ]; then build_reddit; fi
|
if [ "$BUILD_REDDIT" = true ]; then build_reddit; fi
|
||||||
if [ "$BUILD_WARN_WETTER" = true ]; then build_warn_wetter; fi
|
if [ "$BUILD_WARN_WETTER" = true ]; then build_warn_wetter; fi
|
||||||
|
if [ "$BUILD_TIKTOK" = true ]; then build_tiktok; fi
|
||||||
if [ "$BUILD_MINDETACH_MODULE" = true ]; then
|
if [ "$BUILD_MINDETACH_MODULE" = true ]; then
|
||||||
echo "Building mindetach module"
|
echo "Building mindetach module"
|
||||||
cd mindetach-magisk/mindetach/
|
cd mindetach-magisk/mindetach/
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit d86f7c3335cd7f512be7e6d37ea99d678a52ecc2
|
Subproject commit 9cd5b8eea9ea754d70e0693cb0c1aac72a7bf618
|
17
utils.sh
17
utils.sh
@ -89,7 +89,7 @@ reset_template() {
|
|||||||
req() { wget -nv -O "$2" --header="$WGET_HEADER" "$1"; }
|
req() { wget -nv -O "$2" --header="$WGET_HEADER" "$1"; }
|
||||||
log() { echo -e "$1 " >>build.log; }
|
log() { echo -e "$1 " >>build.log; }
|
||||||
get_apk_vers() { req "$1" - | sed -n 's;.*Version:</span><span class="infoSlide-value">\(.*\) </span>.*;\1;p'; }
|
get_apk_vers() { req "$1" - | sed -n 's;.*Version:</span><span class="infoSlide-value">\(.*\) </span>.*;\1;p'; }
|
||||||
get_largest_ver() {
|
get_largest_ver() { # fix this later to properly support semver
|
||||||
local max=0
|
local max=0
|
||||||
while read -r v || [ -n "$v" ]; do
|
while read -r v || [ -n "$v" ]; do
|
||||||
if [[ ${v//[!0-9]/} -gt ${max//[!0-9]/} ]]; then max=$v; fi
|
if [[ ${v//[!0-9]/} -gt ${max//[!0-9]/} ]]; then max=$v; fi
|
||||||
@ -193,6 +193,21 @@ build_warn_wetter() {
|
|||||||
patch_apk "$stock_apk" "$patched_apk" "-r"
|
patch_apk "$stock_apk" "$patched_apk" "-r"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build_tiktok() {
|
||||||
|
echo "Building TikTok"
|
||||||
|
declare -r last_ver="${last_ver:-$(get_apk_vers "https://www.apkmirror.com/uploads/?appcategory=tik-tok" | head -1)}"
|
||||||
|
echo "Choosing version '${last_ver}'"
|
||||||
|
local stock_apk="${TEMP_DIR}/tiktok-stock-v${last_ver}.apk" patched_apk="${BUILD_DIR}/tiktok-revanced-v${last_ver}.apk"
|
||||||
|
if [ ! -f "$stock_apk" ]; then
|
||||||
|
declare -r dl_url=$(dl_apk "https://www.apkmirror.com/apk/tiktok-pte-ltd/tik-tok/tik-tok-${last_ver//./-}-release/" \
|
||||||
|
"APK</span>[^@]*@\([^#]*\)" \
|
||||||
|
"$stock_apk")
|
||||||
|
log "\nTikTok version: ${last_ver}"
|
||||||
|
log "downloaded from: [APKMirror - TikTok]($dl_url)"
|
||||||
|
fi
|
||||||
|
patch_apk "$stock_apk" "$patched_apk" "-r"
|
||||||
|
}
|
||||||
|
|
||||||
build_yt() {
|
build_yt() {
|
||||||
echo "Building YouTube"
|
echo "Building YouTube"
|
||||||
reset_template
|
reset_template
|
||||||
|
Loading…
x
Reference in New Issue
Block a user