Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhawat2 committed Oct 19, 2024
1 parent 0d674a2 commit 92b0561
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions repstr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env python3
import sys
file=sys.argv[1]
old=sys.argv[2]
new=sys.argv[3]

with open(file, 'r+') as f:
content = f.read()
f.seek(0,0)
f.truncate()
f.write(content.replace(old, new))

13 changes: 13 additions & 0 deletions yt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ clone_tools() {
CLIVER=$(grep version $CURDIR/revanced-cli/gradle.properties | tr -dc .0-9)
}

patch_tools() {
PATCHFILE=$CURDIR/revanced-integrations/app/src/main/java/app/revanced/integrations/shared/checks/CheckEnvironmentPatch.java
oldStr=" public static void check(Activity context) {"
newStr=" public static void check(Activity context) {
Check.disableForever();
return;
"
$CURDIR/repstr.py "$PATCHFILE" "$oldStr" "$newStr"
}

build_tools() {
cd $CURDIR/revanced-patcher && sh gradlew build >/dev/null
cd $CURDIR/revanced-patches && sh gradlew build >/dev/null
Expand Down Expand Up @@ -147,6 +157,9 @@ rm -rf revanced-patches.json
# Clone Tools
clone_tools

# Patch Tools
patch_tools

# Cleanup
find $CURDIR -type f -name "*.apk" -exec rm -rf {} \;
find $CURDIR -type f -name "*.zip" -exec rm -rf {} \;
Expand Down

0 comments on commit 92b0561

Please sign in to comment.