diff --git a/.prettierignore b/.prettierignore
index ffa6089..a8eee58 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1,7 +1,6 @@
.DS_Store
node_modules
/build
-/testing-docs
/public
/.svelte-kit
/package
diff --git a/README.md b/README.md
index 2871e26..a220a69 100644
--- a/README.md
+++ b/README.md
@@ -2,12 +2,6 @@
The official ReVanced Website.
-## Documentation
-
-The documentation you see on the live website is generated from a collection of markup files found in [this git repository](https://github.com/revanced/revanced-documentation). The documentation "generator" currently supports asciidoc and markdown.
-
-It looks for markup files in the `testing-docs` folder by default, but you can specify a different path by changing the `REVANCED_DOCS_FOLDER` environment variable.
-
## Developing
Install dependencies with `npm install` (or `pnpm install`).
diff --git a/ci-build.sh b/ci-build.sh
deleted file mode 100755
index 9d7d6f4..0000000
--- a/ci-build.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-set -e
-
-# CD to the directory of this script.
-cd "$(dirname "$0")"
-
-docs_git_repo="${REVANCED_DOCS_REPO:-https://github.com/revanced/revanced-documentation.git}"
-
-git clone "$docs_git_repo" "_docs_src"
-# TODO: transform a tag links so this works properly...
-#export REVANCED_DOCS_FOLDER="_docs_src/docs"
-
-#git clone --recurse-submodules "$docs_git_repo" "_docs_src"
-
-# Copy assets from docs repo to here.
-# mkdir -p static/docs
-# cp -r "$REVANCED_DOCS_FOLDER"/assets static/docs/assets || true
-
-npm run build
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index a5ecda0..f40d281 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -61,6 +61,9 @@ devDependencies:
sass:
specifier: ^1.55.0
version: 1.64.1
+ semver:
+ specifier: ^7.5.4
+ version: 7.5.4
sirv-cli:
specifier: ^2.0.2
version: 2.0.2
diff --git a/src/routes/docs/+layout.server.ts b/src/routes/docs/+layout.server.ts
deleted file mode 100644
index 9720f30..0000000
--- a/src/routes/docs/+layout.server.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import type { LayoutServerLoad } from './$types';
-
-import { index_content } from './documentation.server';
-
-// The load function here used to get data from a json file created by a (prerendered) server route.
-// This was because we could not prerender the documentation route before.
-// If you can no longer prerender the docs, then you are going to have to move the load functions here to a prerendered server route like before and fetch them here.
-export const prerender = true;
-
-export const load: LayoutServerLoad = () => ({ tree: index_content() });
diff --git a/src/routes/docs/+layout.svelte b/src/routes/docs/+layout.svelte
deleted file mode 100644
index d3cf431..0000000
--- a/src/routes/docs/+layout.svelte
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
diff --git a/src/routes/docs/DocsNavNode.svelte b/src/routes/docs/DocsNavNode.svelte
deleted file mode 100644
index 0bfc72d..0000000
--- a/src/routes/docs/DocsNavNode.svelte
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
-
-
{info.title}
-
-
-
-
-
diff --git a/src/routes/docs/DocsNavTree.svelte b/src/routes/docs/DocsNavTree.svelte
deleted file mode 100644
index e29909f..0000000
--- a/src/routes/docs/DocsNavTree.svelte
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-{#if nested}
-
-
-{/if}
-
-
- {#if !nested}
-
-
- {/if}
-
- {#each tree.nodes as node}
- {#if is_tree(node)}
-
-
- {:else}
-
- {/if}
- {/each}
-
-
-
diff --git a/src/routes/docs/[...slug]/+page.server.ts b/src/routes/docs/[...slug]/+page.server.ts
deleted file mode 100644
index 9c44db9..0000000
--- a/src/routes/docs/[...slug]/+page.server.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import type { PageServerLoad } from './$types';
-import { error } from '@sveltejs/kit';
-
-import { get } from '../documentation.server';
-
-// See also: ../+layout.server.ts
-export const prerender = true;
-
-export const load: PageServerLoad = ({ params }) => {
- const document = get(params.slug);
- if (document === null) {
- error;
- throw error(404);
- }
-
- return document;
-};
diff --git a/src/routes/docs/[...slug]/+page.svelte b/src/routes/docs/[...slug]/+page.svelte
deleted file mode 100644
index 50e0219..0000000
--- a/src/routes/docs/[...slug]/+page.svelte
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
{data.title}
- {@html data.content}
-
diff --git a/src/routes/docs/documentation.scss b/src/routes/docs/documentation.scss
deleted file mode 100644
index 4265879..0000000
--- a/src/routes/docs/documentation.scss
+++ /dev/null
@@ -1,95 +0,0 @@
-#markup-content {
- /* Defaults for text */
- color: var(--accent-color-two);
- font-weight: 300;
- font-size: 1rem;
- line-height: 1.75rem;
- letter-spacing: 0.03rem !important;
-
-
-
- a {
- text-decoration: none;
- color: var(--accent-color);
- border-bottom: 1.5px solid var(--accent-low-opacity);
- padding: 0px ;
- }
-
-
-
- code {
- background-color: var(--grey-one);
- border-radius: 8px;
- padding: 0.2rem 0.5rem;
- font-size: 0.8rem;
- font-family: var(--mono-font);
- font-weight: 300;
- flex-wrap: wrap;
- line-height: 1.25rem;
- }
-
-
-
- pre code {
- font-size: 0.75rem;
- background-color: var(--grey-six);
- white-space: pre;
- display: block;
- flex-wrap: wrap;
- padding: 0.5rem 1rem;
- margin: 1rem 0;
- }
-
- h5 {
- margin-bottom: 0.5rem;
- }
-
- h5 {
- color: var(--accent-color);
- }
-
- h1, h2, h3, h4, h5 {
- margin-bottom: 1rem;
- }
-
- h1 {
- font-size: 2.25rem;
- font-weight: 600;
- letter-spacing: -0.02rem;
- color: var(--accent-color-two);
- border-bottom: 1px solid var(--grey-three);
- padding-bottom: 1rem;
- margin-bottom: 1rem;
- }
-
- h2 {
- font-size: 1.5rem;
- letter-spacing: -0.02rem;
- font-weight: 600;
- color: var(--accent-color-two);
- border-bottom: 1px solid var(--grey-three);
- padding-bottom: 1rem;
- margin-top: 2rem;
- }
-
- h3 {
- margin-top: 1rem;
- margin-bottom: 0.5rem;
- }
-
- li {
- margin-left: 1rem;
- margin-bottom: 0.5rem;
- }
-
- /* Markup processors output this for bold text, but css spec is goofy aah */
- strong {
- font-weight: bold;
- letter-spacing: 0.01rem;
-
- }
-
- ul {
- padding-left: 2rem;
- }
-}
diff --git a/src/routes/docs/documentation.server.ts b/src/routes/docs/documentation.server.ts
deleted file mode 100644
index ff94793..0000000
--- a/src/routes/docs/documentation.server.ts
+++ /dev/null
@@ -1,207 +0,0 @@
-import { is_tree } from './documentation.shared';
-import type { Document, DocsTree, DocsTreeNode, DocumentInfo } from './documentation.shared';
-
-import { browser } from '$app/environment';
-
-import fs, { existsSync as exists } from 'fs';
-import path from 'path';
-
-import { marked } from 'marked';
-import AsciiDocProcessor from 'asciidoctor';
-
-// This file does not work in a browser.
-if (browser) {
- throw Error('SvelteKit has skill issues');
-}
-
-/// Constants
-
-const supported_formats: Map Document> = new Map();
-
-supported_formats.set('md', (markup: string) => {
- let lines = markup.split('\n');
-
- // Get and remove the first line.
- const first_line = lines.splice(0, 1)[0];
- // Remove `# `.
- const title = first_line.substring(2);
-
- // Convert the rest to html
- const content = marked(lines.join('\n'));
-
- return { title, content };
-});
-
-const asciidoctor = AsciiDocProcessor();
-const adoc_fn = (markup: string) => {
- // Get first line.
- const first_line = markup.split('\n')[0];
- // Remove `= `.
- const title = first_line.substring(2);
-
- // Convert it to html. Unlike markdown, we do not need to remove the first title heading.
- // NOTE: Maybe consider change the safe mode value.
- const content = asciidoctor.convert(markup, { doctype: 'book' }) as string;
-
- return { title, content };
-};
-
-supported_formats.set('adoc', adoc_fn);
-supported_formats.set('asciidoc', adoc_fn);
-
-const supported_filetypes = [...supported_formats.keys()];
-
-let docs_folder = process.env.REVANCED_DOCS_FOLDER ?? 'testing-docs';
-
-const ignored_items = ['assets'];
-
-/// Utility functions
-
-function is_directory(item: string) {
- return fs.lstatSync(item).isDirectory();
-}
-
-function get_ext(fname: string) {
- // Get extname and remove the first dot.
- return path.extname(fname).substring(1);
-}
-
-function get_slug_of_node(node: DocsTreeNode): string {
- if (is_tree(node)) {
- return (node as DocsTree).index.slug;
- }
-
- return (node as DocumentInfo).slug;
-}
-
-/// Important functions
-
-// Get a document. Returns null if it does not exist.
-export function get(slug: string): Document | null {
- let target = path.join(docs_folder, slug);
- // Handle index (readme) file for folder.
- if (exists(target) && is_directory(target)) {
- target += '/README';
- }
-
- const dir = path.dirname(target);
- if (!exists(dir)) {
- return null;
- }
-
- let full_path: string,
- ext: string,
- found = false;
- // We are looking for the file `${target}.(any_supported_extension)`. Try to find it.
- for (const item of fs.readdirSync(dir)) {
- full_path = path.join(dir, item);
- // Get file extension
- ext = get_ext(item);
-
- // Unsupported/unrelated file.
- if (!supported_formats.has(ext)) {
- continue;
- }
-
- const desired_path = `${target}.${ext}`; // Don't grab some other random supported file.
- if (!is_directory(full_path) && desired_path == full_path) {
- // We found it.
- found = true;
- break;
- }
- }
-
- if (!found) {
- return null;
- }
-
- // Process the file and return.
- return supported_formats.get(ext!!)!!(fs.readFileSync(full_path!!, 'utf-8'));
-}
-
-// Get file information
-function process_file(fname: string): DocumentInfo {
- // Remove docs folder prefix and file extension suffix, then split it.
- const parts = fname
- .substring(`${docs_folder}/`.length, fname.length - (get_ext(fname).length + 1))
- .split('/');
-
- // Remove `README` suffix if present.
- const last_part_index = parts.length - 1;
- if (parts[last_part_index] == 'README') {
- parts.pop();
- }
-
- const slug = parts.join('/');
- const title = get(slug)!!.title;
-
- return { slug, title };
-}
-
-// Returns a document tree.
-function process_folder(dir: string): DocsTree | null {
- let tree: DocsTree = {
- index: null as any,
- nodes: []
- };
-
- // List everything in the directory.
- const items = fs.readdirSync(dir);
-
- for (const item of items) {
- if (ignored_items.includes(item) || ['.', '_'].includes(item[0])) {
- continue;
- }
-
- const itemPath = path.join(dir, item);
-
- const is_dir = is_directory(itemPath);
- let is_index_file = false;
-
- if (!is_dir) {
- // Ignore files we cannot process.
- if (!supported_formats.has(get_ext(item))) {
- continue;
- }
-
- for (const ext of supported_filetypes) {
- if (item == `README.${ext}`) {
- is_index_file = true;
- }
- }
- }
-
- const node = is_dir ? process_folder(itemPath) : process_file(itemPath);
- if (node === null) {
- console.error(`The ${itemPath} directory does not have a README/index file! ignoring...`);
- continue;
- }
-
- if (is_index_file) {
- tree.index = node as DocumentInfo;
- } else {
- tree.nodes.push(node);
- }
- }
-
- if (tree.index === null) {
- return null;
- }
-
- // `numeric: true` because we want to be able to specify
- // the order if necessary by prepending a number to the file name.
- tree.nodes.sort((a, b) =>
- get_slug_of_node(a).localeCompare(get_slug_of_node(b), 'en', { numeric: true })
- );
-
- return tree;
-}
-
-// Returns the document tree.
-export function index_content(): DocsTree {
- const tree = process_folder(docs_folder);
- if (tree === null) {
- throw new Error('Root must have index (README) file.');
- }
- return tree;
-}
diff --git a/src/routes/docs/documentation.shared.ts b/src/routes/docs/documentation.shared.ts
deleted file mode 100644
index cd17a3a..0000000
--- a/src/routes/docs/documentation.shared.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/// Types
-
-export interface Document {
- title: string;
- // HTML
- content: string;
-}
-
-export interface DocumentInfo {
- title: string;
- slug: string;
-}
-
-// A tree representing the `docs` folder.
-export interface DocsTree {
- // index.whatever
- index: DocumentInfo;
- // Everything except index.whatever
- nodes: DocsTreeNode[];
-}
-
-export type DocsTreeNode = DocsTree | DocumentInfo;
-
-/// Functions
-
-export function is_tree(node: DocsTreeNode) {
- return Object.prototype.hasOwnProperty.call(node, 'nodes');
-}
-
-export function assert_is_info_node(v: DocsTreeNode) {
- if (is_tree(v)) {
- throw new Error('Value is not an info node.');
- }
- return v as DocumentInfo;
-}
diff --git a/testing-docs/README.md b/testing-docs/README.md
deleted file mode 100644
index bee79c0..0000000
--- a/testing-docs/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Prerequisites
-##### docs/prerequisites
-
-
-
-#### Requirements
-
-- ADB
-- x86/x86\_64 host architecture
-- Zulu JDK 17
-- Latest Android SDK if you plan to build the integrations from the source
-- The APK file you want to patch (e.g. YouTube v17.36.37 or YouTube Music v5.23.50). If you want to mount patched applications as root, make sure the same version is installed on your device.
-
-
-
-You can continue by either [building everything from source](https://github.com/revanced/revanced-documentation/wiki/Building-from-source) or [downloading the prebuilt packages](https://github.com/revanced/revanced-documentation/wiki/Downloading-prebuilt-packages).
diff --git a/testing-docs/manager/1_patching-applications.md b/testing-docs/manager/1_patching-applications.md
deleted file mode 100644
index 6d6ff31..0000000
--- a/testing-docs/manager/1_patching-applications.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# 🧩 Patching applications
-1. Tap the `Patcher` button in the bottom navigation bar.
-2. Tap the `Select an application` card.
-3. Here, you have the option to choose between selecting an app from on-device or selecting an APK file directly from storage.
- * For selecting on-device applications, tap on the desired app from the shown menu. For an app to show up in this list, the app must be already installed on the device.
- > **Warning**: This feature is incomplete for non-root users as ReVanced has yet to add split APK support. We suggest you pick your APK from storage for now.
- * To select from storage, click on the `Storage` button and select the APK normally through the file picker.
- > **Note**: We recommend downloading APK files from [APKMirror](https://www.apkmirror.com/) as a temporary solution as `.apkm` and `.apks` files are not supported at the moment.
- * Verify that the selected application is a version supported by ReVanced. [See the list of supported versions for apps here.](https://github.com/revanced/revanced-patches#-patches)
-4. After selecting an application, you will be brought back to the `Patcher` screen again. Tap the `Select patches` card.
-5. Select your desired patches. Note that certain patches are required for non-root installations. (e.g. *MicroG Support* patch for YouTube)
-6. Tap the `Done` button.
-7. After selecting your patches, you will be brought back to the `Patcher` screen again. Tap the `Patch` button.
-8. The app is now patching. This process can range from 2-10 minutes depending on your device. Refrain from closing the Manager.
-9. When patching is complete, tap on the `Install` button. You may also tap on the three vertical dots in the top right to share logs or the patched APK.
- > **Warning**: If you close the Manager after patching, the patched APK file will be **automatically deleted from your device**!
-
-## ⏭️ Whats next
-The next section will guide you through managing your installed patched applications.
\ No newline at end of file
diff --git a/testing-docs/manager/README.md b/testing-docs/manager/README.md
deleted file mode 100644
index bee79c0..0000000
--- a/testing-docs/manager/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Prerequisites
-##### docs/prerequisites
-
-
-
-#### Requirements
-
-- ADB
-- x86/x86\_64 host architecture
-- Zulu JDK 17
-- Latest Android SDK if you plan to build the integrations from the source
-- The APK file you want to patch (e.g. YouTube v17.36.37 or YouTube Music v5.23.50). If you want to mount patched applications as root, make sure the same version is installed on your device.
-
-
-
-You can continue by either [building everything from source](https://github.com/revanced/revanced-documentation/wiki/Building-from-source) or [downloading the prebuilt packages](https://github.com/revanced/revanced-documentation/wiki/Downloading-prebuilt-packages).
diff --git a/testing-docs/patches/3_fingerprinting.md b/testing-docs/patches/3_fingerprinting.md
deleted file mode 100644
index a14c3bf..0000000
--- a/testing-docs/patches/3_fingerprinting.md
+++ /dev/null
@@ -1,243 +0,0 @@
-# 🔎 Fingerprinting
-
-Fingerprinting is the process of creating uniquely identifyable data about something arbitrarily large. In the context of ReVanced, fingerprinting is essential to be able to find classes, methods and fields without knowing their original names or certain other attributes, which would be used to identify them under normal circumstances.
-
-## ⛳️ Example fingerprint
-
-This page works with the following fingerprint as an example:
-
-```kt
-package app.revanced.patches.ads.fingerprints
-
-// Imports
-
-object LoadAdsFingerprint : MethodFingerprint(
- returnType = "Z",
- access = AccessFlags.PUBLIC or AccessFlags.FINAL,
- parameters = listOf("Z"),
- opcodes = listOf(Opcode.RETURN),
- strings = listOf("pro"),
- customFingerprint = { it.definingClass == "Lcom/some/app/ads/Loader;"}
-)
-```
-
-## 🆗 Understanding the example fingerprint
-
-The example fingerprint called `LoadAdsFingerprint` which extends on [`MethodFingerprint`](https://github.com/revanced/revanced-patcher/blob/main/src/main/kotlin/app/revanced/patcher/fingerprint/method/impl/MethodFingerprint.kt#L28) is made to uniquely identify a certain method by capturing various attributes of the method such as the return type, access flags, an opcode pattern and more. The following code can be inferred just from the fingerprint:
-
-```kt
- package com.some.app.ads
-
- // Imports
-
- 4 class Loader {
- 5 public final Boolean (: Boolean) {
- // ...
-
- 8 val userStatus = "pro";
-
- // ...
-
-12 return
- }
- }
-```
-
-## 🚀 How it works
-
-Each attribute of the fingerprint is responsible to describe a specific but distinct part of the method. The combination out of those should be and ideally remain unique to all methods in all classes. In the case of the example fingerprint, the `customFingerprint` attribute is responsible to find the class the method is defined in. This greatly increases the uniqueness of the fingerprint, because now the possible methods reduce down to that class. Adding the signature of the method and a string the method implementation refers to in combination now creates a unique fingerprint in the current example:
-
-- Package & class (Line 4)
-
- ```kt
- customFingerprint = { it.definingClass == "Lcom/some/app/ads/Loader;"}
- ```
-
-- Method signature (Line 5)
-
- ```kt
- returnType = "Z",
- access = AccessFlags.PUBLIC or AccessFlags.FINAL,
- parameters = listOf("Z"),
- ```
-
-- Method implementation (Line 8 & 12)
-
- ```kt
- strings = listOf("pro"),
- opcodes = listOf(Opcode.RETURN)
- ```
-
-## 🔨 How to use fingerprints
-
-After creating a fingerprint, add it to the constructor of the `BytecodePatch`:
-
-```kt
-class DisableAdsPatch : BytecodePatch(
- listOf(LoadAdsFingerprint)
-) { /* .. */ }
-```
-
-The ReVanced patcher will try to [resolve the fingerprint](https://github.com/revanced/revanced-patcher/blob/main/src/main/kotlin/app/revanced/patcher/fingerprint/method/impl/MethodFingerprint.kt#L63) **before** it calls the `execute` method of the patch.
-
-The fingerprint can now be used in the patch by accessing [`MethodFingerprint.result`](https://github.com/revanced/revanced-patcher/blob/d2f91a8545567429d64a1bcad6ca1dab62ec95bf/src/main/kotlin/app/revanced/patcher/fingerprint/method/impl/MethodFingerprint.kt#L227):
-
-```kt
-class DisableAdsPatch : BytecodePatch(
- listOf(LoadAdsFingerprint)
-) {
- override fun execute(context: BytecodeContext): PatchResult {
- val result = LoadAdsFingerprint.result
- ?: return PatchResultError("LoadAdsFingerprint not found")
-
- // ...
- }
-}
-```
-
-> **Note**: `MethodFingerprint.result` **can be null** if the fingerprint does not match any method. In such case, the fingerprint needs to be fixed and made more resilient if the error is caused by a later version of an app which the fingerprint was not tested on. A fingerprint is good, if it is _light_, but still resilient - like Carbon fiber-reinforced polymers.
-
-If the fingerprint resolved to a method, the following properties are now available:
-
-```kt
-data class MethodFingerprintResult(
- val method: Method,
- val classDef: ClassDef,
- val scanResult: MethodFingerprintScanResult,
- // ...
-) {
- val mutableClass
- val mutableMethod
-
- // ...
-}
-```
-
-> Details on how to use them in a patch and what exactly these are will be introduced properly later on this page.
-
-## 🏹 Different ways to resolve a fingerprint
-
-Usually, fingerprints are mostly resolved by the patcher, but it is also possible to manually resolve a fingerprint in a patch. This can be quite useful in lots of situations. To resolve a fingerprint you need a context to resolve it on. The context contains classes and thus methods to which the fingerprint can be resolved against. Example: _You have a fingerprint which you manually want to resolve **without** the help of the patcher._
-
-> **Note**: A fingerprint should not be added to the constructor of `BytecodePatch` if manual resolution is intended, because the patcher would try resolve it before manual resolution.
-
-- On a **list of classes** using [`MethodFingerprint.resolve`](https://github.com/revanced/revanced-patcher/blob/main/src/main/kotlin/app/revanced/patcher/fingerprint/method/impl/MethodFingerprint.kt#L49)
-
- This can be useful, if a fingerprint should be resolved to a smaller subset of classes, otherwise the fingerprint can be resolved by the patcher automatically.
-
- ```kt
- class DisableAdsPatch : BytecodePatch(
- /* listOf(LoadAdsFingerprint) */
- ) {
- override fun execute(context: BytecodeContext): PatchResult {
- val result = LoadAdsFingerprint.also { it.resolve(context, context.classes) }.result
- ?: return PatchResultError("LoadAdsFingerprint not found")
-
- // ...
- }
- }
- ```
-
-- On a **single class** using [`MethodFingerprint.resolve`](https://github.com/revanced/revanced-patcher/blob/main/src/main/kotlin/app/revanced/patcher/fingerprint/method/impl/MethodFingerprint.kt#L63)
-
- Sometimes you know a class but you need certain methods. In such case, you can resolve fingerprints on a class.
-
- ```kt
- class DisableAdsPatch : BytecodePatch(
- listOf(LoadAdsFingerprint)
- ) {
- override fun execute(context: BytecodeContext): PatchResult {
- val adsLoaderClass = context.classes.single { it.name == "Lcom/some/app/ads/Loader;" }
-
- val result = LoadAdsFingerprint.also { it.resolve(context, adsLoaderClass) }.result
- ?: return PatchResultError("LoadAdsFingerprint not found")
-
- // ...
- }
- }
- ```
-
-- On a **method** using [`MethodFingerprint.resolve`](https://github.com/revanced/revanced-patcher/blob/main/src/main/kotlin/app/revanced/patcher/fingerprint/method/impl/MethodFingerprint.kt#L78)
-
- Resolving a fingerprint on a method is mostly only useful if the fingerprint is used to resolve certain information about a method such as `MethodFingerprintResult.scanResult`. Example: _A fingerprint should be used to resolve the method which loads ads. For that the fingerprint is added to the constructor of `BytecodePatch`. An additional fingerprint is responsible for finding the indices of the instructions with certain string references in the implementation of the method the first fingerprint resolved to._
-
- ```kt
- class DisableAdsPatch : BytecodePatch(
- /* listOf(LoadAdsFingerprint) */
- ) {
- override fun execute(context: BytecodeContext): PatchResult {
- // Make sure this fingerprint succeeds as the result is required
- val adsFingerprintResult = LoadAdsFingerprint.result
- ?: return PatchResultError("LoadAdsFingerprint not found")
-
- // Additional fingerprint to get the indices of two strings
- val proStringsFingerprint = object : MethodFingerprint(
- strings = listOf("free", "trial")
- ) {}
-
- proStringsFingerprint.also {
- // Resolve the fingerprint on the first fingerprints method
- it.resolve(context, adsFingerprintResult.method)
- }.result?.let { result ->
- // Use the fingerprints result
- result.scanResult.stringsScanResult!!.matches.forEach { match ->
- println("The index of the string '${match.string}' is {match.index}")
- }
-
- } ?: return PatchResultError("pro strings fingerprint not found")
-
- return PatchResultSuccess
- }
- }
- ```
-
-## 🎯 The result of a fingerprint
-
-After a `MethodFingerprint` resolves successfully, its result can be used. The result contains mutable and immutable references to the method and the class it is defined in.
-
-> **Warning**: By default the immutable references **should be used** to prevent a mutable copy of the immutable references. For a patch to properly use a fingerprint though, usually write access is required. For that the mutable references can be used.
-
-Among them, the result also contains [MethodFingerprintResult.scanResult](https://github.com/revanced/revanced-patcher/blob/main/src/main/kotlin/app/revanced/patcher/fingerprint/method/impl/MethodFingerprint.kt#L239) which contains additional useful properties:
-
-```kt
-data class MethodFingerprintScanResult(
- val patternScanResult: PatternScanResult?,
- val stringsScanResult: StringsScanResult?
-) {
- data class PatternScanResult(
- val startIndex: Int,
- val endIndex: Int,
- var warnings: List? = null
- )
-
- data class StringsScanResult(val matches: List){
- data class StringMatch(val string: String, val index: Int)
- }
-
- // ...
-}
-```
-
-The following properties are utilized by bytecode patches:
-
-- The `MethodFingerprint.strings` allows patches to know the indices of the instructions which hold references to the strings.
-
-- If a fingerprint defines `MethodFingerprint.opcodes`, the start and end index of the first instructions matching that pattern will be available. These are useful to patch the implementation of methods relative to the pattern. Ideally the pattern contains the instructions opcodes pattern which is to be patched, in order to guarantee a successfull patch.
-
- > **Note**: Sometimes long patterns might be necessary, but the bigger the pattern list, the higher the chance it mutates if the app updates. For that reason the annotation `FuzzyPatternScanMethod` can be used on a fingerprint. The `FuzzyPatternScanMethod.threshold` will define, how many opcodes can remain unmatched. `PatternScanResult.warnings` can then be used if necessary, if it is necessary to know where pattern missmatches occured.
-
-## ⭐ Closely related code examples
-
-### 🧩 Patches
-
-- [CommentsPatch](https://github.com/revanced/revanced-patches/blob/main/src/main/kotlin/app/revanced/patches/youtube/layout/comments/bytecode/patch/CommentsPatch.kt)
-- [MusicVideoAdsPatch](https://github.com/revanced/revanced-patches/blob/main/src/main/kotlin/app/revanced/patches/music/ad/video/patch/MusicVideoAdsPatch.kt)
-
-### Fingerprints
-
-- [LoadVideoAdsFingerprint](https://github.com/revanced/revanced-patches/blob/main/src/main/kotlin/app/revanced/patches/youtube/ad/video/fingerprints/LoadVideoAdsFingerprint.kt)
-- [SeekbarTappingParentFingerprint](https://github.com/revanced/revanced-patches/blob/main/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/fingerprints/SeekbarTappingParentFingerprint.kt)
-
-## ⏭️ Whats next
-
-The next section will give a suggestion on coding conventions and on the file structure of a patch.
\ No newline at end of file
diff --git a/testing-docs/patches/README.md b/testing-docs/patches/README.md
deleted file mode 100644
index bee79c0..0000000
--- a/testing-docs/patches/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Prerequisites
-##### docs/prerequisites
-
-
-
-#### Requirements
-
-- ADB
-- x86/x86\_64 host architecture
-- Zulu JDK 17
-- Latest Android SDK if you plan to build the integrations from the source
-- The APK file you want to patch (e.g. YouTube v17.36.37 or YouTube Music v5.23.50). If you want to mount patched applications as root, make sure the same version is installed on your device.
-
-
-
-You can continue by either [building everything from source](https://github.com/revanced/revanced-documentation/wiki/Building-from-source) or [downloading the prebuilt packages](https://github.com/revanced/revanced-documentation/wiki/Downloading-prebuilt-packages).