### Configuring ReVanced CLI Run Arguments (Shell) Source: https://github.com/revanced/revanced-documentation/blob/main/docs/revanced-development/1_setup.md This shell snippet provides an example of program arguments for the `revanced-cli` run configuration in IntelliJ IDEA. It demonstrates how to specify the `patch` command, the path to the patches file (`.rvp`), the input APK, and the `-i` flag for automatic installation after patching. ```sh patch -p revanced-patches\patches\build\libs\patches-.rvp binaries\some.apk -i # Install the patched APK to a device connected via ADB after patching ``` -------------------------------- ### Building ReVanced Projects with Gradle (Bash) Source: https://github.com/revanced/revanced-documentation/blob/main/docs/revanced-development/1_setup.md This Bash script iterates through each project directory within the current `revanced` directory and executes the `./gradlew build` command. This ensures that all cloned ReVanced projects are successfully built, verifying the development environment setup. ```bash for project in */; do cd "$project" && ./gradlew build && cd .. done ``` -------------------------------- ### Configuring GitHub Packages Authentication (Gradle Properties) Source: https://github.com/revanced/revanced-documentation/blob/main/docs/revanced-development/1_setup.md This example shows how to configure `gradle.properties` for GitHub Packages authentication. It requires a GitHub username and a personal access token with `read:packages` scope to resolve dependencies from GitHub Packages, preventing build failures due to authentication issues. ```properties gpr.user = gpr.key = ``` -------------------------------- ### Cloning ReVanced Repositories (Bash) Source: https://github.com/revanced/revanced-documentation/blob/main/docs/revanced-development/1_setup.md This Bash script creates a `revanced` directory, navigates into it, and then clones specified ReVanced repositories (`revanced-cli`, `revanced-patches`, `revanced-patcher`, `revanced-library`) from GitHub. It uses the `dev` branch, single-branch cloning, and a depth of 1 for shallow clones. ```bash mkdir revanced && cd revanced repositories=( "revanced-cli" "revanced-patches" "revanced-patcher" # Only if you want to work on ReVanced Patcher "revanced-library" # Only if you want to work on ReVanced Library ) for repository in "${repositories[@]}" ; do git clone -b dev --single-branch --depth 1 https://github.com/revanced/$repository done ``` -------------------------------- ### Configuring ReVanced CLI Working Directory (Shell) Source: https://github.com/revanced/revanced-documentation/blob/main/docs/revanced-development/1_setup.md This snippet specifies the working directory for the `revanced-cli` run configuration in IntelliJ IDEA. Setting it to `$ProjectFileDir$/..` ensures that the CLI executes from the parent directory of the `revanced-cli` project, allowing it to correctly locate other project components like `binaries`. ```sh $ProjectFileDir$/.. ``` -------------------------------- ### Cloning ReVanced Documentation Repository Recursively (Shell) Source: https://github.com/revanced/revanced-documentation/blob/main/README.md This shell command sequence is used to clone the ReVanced documentation repository, ensuring that all symbolic links and submodules are correctly retrieved. The first command performs a recursive clone, and the second command updates all submodules to their latest remote versions, which is crucial for accessing linked documentation content. ```Shell git clone -c core.symlinks=true https://github.com/revanced/revanced-documentation --recursive && cd revanced-documentation git submodule update --remote ``` -------------------------------- ### Capturing Android Application Logs via ADB Shell Source: https://github.com/revanced/revanced-documentation/blob/main/docs/revanced-resources/questions.md These commands demonstrate how to capture specific log messages from an Android device using the `logcat` utility via an ADB shell. The first command filters for ReVanced-specific logs, while the second captures general Android Runtime exception logs, both crucial for debugging application behavior and identifying issues. ```Shell logcat | grep revanced: ``` ```Shell logcat | grep AndroidRuntime ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.