diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 7808c795d1..883bf52a7a 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -1,7 +1,7 @@
name: 🐞 Bug report
description: Report a bug or an issue.
-title: "bug: "
-labels: ["Bug report"]
+title: 'bug: '
+labels: ['Bug report']
body:
- type: markdown
attributes:
@@ -80,38 +80,21 @@ body:
- Describe your bug in detail
- Add steps to reproduce the bug if possible (Step 1. ... Step 2. ...)
- Add images and videos if possible
- - List used patches if applicable
+ - List used patches, downloader and settings if applicable
validations:
required: true
- type: textarea
attributes:
- label: Version of ReVanced Manager and version & name of app you are patching
- validations:
- required: true
- - type: dropdown
- attributes:
- label: Installation method
- options:
- - Regular
- - Mount
- validations:
- required: false
- - type: textarea
- attributes:
- label: ReVanced Manager logs
- description: Export logs from the ReVanced Manager settings.
+ label: Patch logs
+ description: Patch logs can be exported by clicking on the "Logs" button in the "Patcher" screen, when patching finishes.
render: shell
- validations:
- required: true
- type: textarea
attributes:
- label: Patch logs
- description: Export logs from the "Patcher" screen.
- render: shell
+ label: Debug logs
+ description: Debug logs can be exported by clicking on "Export debug logs" in "Settings" > "Advanced".
validations:
- required: false
+ required: true
- type: checkboxes
- id: acknowledgements
attributes:
label: Acknowledgements
description: Your bug report will be closed if you don't follow the checklist below.
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 3ee6d407c9..6868beb0fb 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -2,4 +2,4 @@ blank_issues_enabled: false
contact_links:
- name: 🗨 Discussions
url: https://github.com/revanced/revanced-suggestions/discussions
- about: Have something unspecific to ReVanced Manager in mind? Search for or start a new discussion!
+ about: Have something unspecific to ReVanced Manager in mind? Search for or start a new discussion!
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
index f52fe568c8..8d3366b3e6 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -1,7 +1,3 @@
-name: ⭐ Feature request
-description: Create a detailed request for a new feature.
-title: "feat: "
-labels: ["Feature request"]
body:
- type: markdown
attributes:
@@ -84,7 +80,7 @@ body:
label: Motivation
description: |
A strong motivation is necessary for a feature request to be considered.
-
+
- Why should this feature be implemented?
- What is the explicit use case?
- What are the benefits?
@@ -97,9 +93,11 @@ body:
label: Acknowledgements
description: Your feature request will be closed if you don't follow the checklist below.
options:
- - label: I have checked all open and closed feature requests and this is not a duplicate.
+ - label: I have checked all open and closed feature requests and this is not a duplicate
required: true
- label: I have chosen an appropriate title.
required: true
+ - label: All requested information has been provided properly.
+ required: true
- label: The feature request is only related to ReVanced Manager.
required: true
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 44909febb3..0000000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,78 +0,0 @@
-version: 2
-updates:
- - package-ecosystem: github-actions
- labels: []
- directory: /
- target-branch: dev
- schedule:
- interval: monthly
- groups:
- gh-actions:
- applies-to: version-updates
- patterns:
- - "*"
- update-types:
- - "minor"
- - "patch"
-
- - package-ecosystem: npm
- labels: []
- directory: /
- target-branch: dev
- schedule:
- interval: monthly
- groups:
- npm:
- applies-to: version-updates
- patterns:
- - "*"
- update-types:
- - "minor"
- - "patch"
-
- # ReVanced Manager Flutter
- - package-ecosystem: pub
- labels: []
- directory: /
- target-branch: dev
- schedule:
- interval: monthly
- groups:
- pubspec:
- applies-to: version-updates
- patterns:
- - "*"
- update-types:
- - "minor"
- - "patch"
-
- - package-ecosystem: gradle
- labels: []
- directory: /android
- target-branch: dev
- schedule:
- interval: monthly
- groups:
- gradle:
- applies-to: version-updates
- patterns:
- - "*"
- update-types:
- - "minor"
- - "patch"
-
- # ReVanced Manager Compose
- - package-ecosystem: gradle
- labels: [ "ReVanced Manager Compose" ]
- directory: /
- target-branch: compose-dev
- schedule:
- interval: monthly
- groups:
- gradle-compose:
- applies-to: version-updates
- patterns:
- - "*"
- update-types:
- - "minor"
- - "patch"
diff --git a/.github/workflows/build_pull_request.yml b/.github/workflows/build_pull_request.yml
index 1b4400b325..81b1a13d4c 100644
--- a/.github/workflows/build_pull_request.yml
+++ b/.github/workflows/build_pull_request.yml
@@ -2,69 +2,37 @@ name: Build pull request
on:
workflow_dispatch:
- inputs:
- pr-number:
- description: PR number
- required: true
- app-flavor:
- description: App flavor
- default: release
- type: choice
- options:
- - release
- - debug
- - profile
+ pull_request:
+ branches:
+ - dev
+ - compose-dev
jobs:
- build:
+ release:
name: Build
runs-on: ubuntu-latest
- permissions:
- contents: read
- pull-requests: write
steps:
- - name: Checkout PR
- uses: actions/checkout@v4
- with:
- ref: refs/pull/${{ inputs.pr-number }}/merge
- fetch-depth: 0
+ - name: Checkout
+ uses: actions/checkout@v5
- name: Setup Java
- uses: actions/setup-java@v4
+ uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'
- - name: Set up Flutter
- uses: subosito/flutter-action@v2
- with:
- channel: stable
- cache: true
-
- name: Cache Gradle
- uses: burrunan/gradle-cache-action@v1
- with:
- build-root-directory: ${{ github.workspace }}/android
-
- - name: Get dependencies
- run: flutter pub get
-
- - name: Generate translations
- run: dart run slang
-
- - name: Generate code files
- run: dart run build_runner build --delete-conflicting-outputs
+ uses: burrunan/gradle-cache-action@v3
- name: Build
- id: flutter-build
- run: flutter build apk --${{ inputs.app-flavor }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: ./gradlew assembleRelease --no-daemon
- name: Upload artifacts
- if: steps.flutter-build.outcome == 'success'
uses: actions/upload-artifact@v4
with:
- name: revanced-manager-(${{ env.COMMIT_HASH }}
+ name: revanced-manager
path: |
- build/app/outputs/flutter-apk/app-*.apk
+ app/build/outputs/apk/release/revanced-manager*.apk
+ app/build/outputs/apk/release/revanced-manager*.apk.asc
diff --git a/.github/workflows/open_pull_request.yml b/.github/workflows/open_pull_request.yml
index 03d40f7f55..b86deb7327 100644
--- a/.github/workflows/open_pull_request.yml
+++ b/.github/workflows/open_pull_request.yml
@@ -12,18 +12,15 @@ env:
jobs:
pull-request:
name: Open pull request
- permissions:
- pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
- name: Open pull request
uses: repo-sync/pull-request@v2
with:
destination_branch: 'main'
pr_title: 'chore: ${{ env.MESSAGE }}'
- pr_body: |
- This pull request will ${{ env.MESSAGE }}.
+ pr_body: 'This pull request will ${{ env.MESSAGE }}.'
pr_draft: true
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1c3a2b4580..49f5872549 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -17,60 +17,54 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
+ uses: actions/checkout@v5
- name: Setup Java
- uses: actions/setup-java@v4
+ uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'
+ - name: Cache Gradle
+ uses: burrunan/gradle-cache-action@v3
+
+ - name: Build
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: ./gradlew assembleRelease
+
- name: Setup Node.js
- uses: actions/setup-node@v4
+ uses: actions/setup-node@v5
with:
node-version: "lts/*"
cache: 'npm'
- - name: Set up Flutter
- uses: subosito/flutter-action@v2
- with:
- channel: stable
- cache: true
-
- - name: Cache Gradle
- uses: burrunan/gradle-cache-action@v1
- with:
- build-root-directory: ${{ github.workspace }}/android
-
- name: Install dependencies
- run: npm i
-
- - name: Get dependencies
- run: flutter pub get
+ run: npm ci
- - name: Generate translations
- run: dart run slang
-
- - name: Generate code files
- run: dart run build_runner build --delete-conflicting-outputs
+ - name: Import GPG key
+ uses: crazy-max/ghaction-import-gpg@v6
+ with:
+ gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
+ passphrase: ${{ secrets.GPG_PASSPHRASE }}
+ fingerprint: ${{ vars.GPG_FINGERPRINT }}
- name: Setup keystore
run: |
- echo "${{ secrets.KEYSTORE }}" | base64 --decode > "android/app/keystore.jks"
+ echo "${{ secrets.KEYSTORE }}" | base64 --decode > "app/keystore.jks"
- name: Semantic Release
- uses: cycjimmy/semantic-release-action@v4
+ uses: cycjimmy/semantic-release-action@v5
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_ENTRY_ALIAS: ${{ secrets.KEYSTORE_ENTRY_ALIAS }}
KEYSTORE_ENTRY_PASSWORD: ${{ secrets.KEYSTORE_ENTRY_PASSWORD }}
-
+
- name: Attest
if: steps.semantic.outputs.new_release_published == 'true'
- uses: actions/attest-build-provenance@v2
+ uses: actions/attest-build-provenance@v3
with:
- subject-path: build/app/outputs/apk/release/revanced-manager-*.apk
+ subject-name: 'ReVanced Manager ${{ steps.release.outputs.new_release_git_tag }}'
+ subject-path: app/build/outputs/apk/release/revanced-manager*.apk
diff --git a/.github/workflows/sync_crowdin.yml b/.github/workflows/sync_crowdin.yml
deleted file mode 100644
index cf27665e05..0000000000
--- a/.github/workflows/sync_crowdin.yml
+++ /dev/null
@@ -1,80 +0,0 @@
-name: Sync Crowdin
-
-on:
- workflow_dispatch:
- schedule:
- - cron: 00 12 * * 1
- push:
- branches: dev
- paths:
- - assets/i18n/*.json
- - assets/i18n/*.dart
- - .github/workflows/sync_crowdin.yml
-
-jobs:
- sync:
- name: Sync
- runs-on: ubuntu-latest
- permissions:
- contents: write
- pull-requests: write
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- with:
- ref: dev
- fetch-depth: 0
- clean: true
-
- - name: Setup Flutter
- uses: subosito/flutter-action@v2
- with:
- cache: true
-
- - name: Sync translations from Crowdin
- uses: crowdin/github-action@v2
- with:
- config: crowdin.yml
- upload_sources: true
- upload_translations: false
- download_translations: true
- localization_branch_name: feat/translations
- skip_ref_checkout: true
- create_pull_request: true
- pull_request_title: "chore: Sync translations"
- pull_request_body: "Sync translations from [crowdin.com/project/revanced](https://crowdin.com/project/revanced)"
- pull_request_base_branch_name: "dev"
- commit_message: "chore: Sync translations"
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
- CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
-
- - name: Validation of synced translations
- run: |
- dart pub get
- dart run slang validate
-
- - name: Normalization of Translation Strings
- run: |
- sudo chmod 766 assets/i18n/*.i18n.json
-
- dart run slang analyze
- dart run slang clean
- dart run slang normalize
-
- dart run slang
-
- cd assets/i18n
- dart nuke.dart >> $GITHUB_STEP_SUMMARY
- cd ../..
-
- flutter analyze lib/gen/strings.g.dart --no-fatal-infos --no-fatal-warnings
-
- - name: Commit translations
- run: |
- git config --global user.name 'github-actions[bot]'
- git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- sudo chown -R $USER:$USER .git
- git commit -m "chore: Remove empty values from JSON" assets/i18n/*.i18n.json
- git push origin HEAD:feat/translations
diff --git a/.github/workflows/update_documentation.yml b/.github/workflows/update_documentation.yml
index 541a7aa5b5..f259a4b833 100644
--- a/.github/workflows/update_documentation.yml
+++ b/.github/workflows/update_documentation.yml
@@ -16,4 +16,4 @@ jobs:
token: ${{ secrets.DOCUMENTATION_REPO_ACCESS_TOKEN }}
repository: revanced/revanced-documentation
event-type: update-documentation
- client-payload: '{"repo": "${{ github.event.repository.name }}", "ref": "${{ github.ref }}"}'
+ client-payload: '{"repo": "${{ github.event.repository.name }}", "ref": "${{ github.ref }}"}'
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 387727a0f7..40c3c574ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,64 +1,132 @@
-# Miscellaneous
+### Java template
+# Compiled class file
*.class
-*.lock
+
+# Log file
*.log
-*.pyc
-*.swp
-.buildlog/
-.history
-# packages file containing multi-root paths
-.packages.generated
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+### JetBrains template
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# Generated files
+.idea/**/contentModel.xml
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Gradle
+.idea/**/gradle.xml
+.idea/**/libraries
-# IntelliJ related
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+.idea/artifacts
+.idea/compiler.xml
+.idea/jarRepositories.xml
+.idea/modules.xml
+.idea/*.iml
+.idea/modules
*.iml
*.ipr
+
+# CMake
+cmake-build-*/
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
*.iws
-.idea/
-# Flutter/Dart/Pub related
-**/doc/api/
-.dart_tool/
-.flutter-plugins
-.flutter-plugins-dependencies
-**/generated_plugin_registrant.dart
-.packages
-.pub-preload-cache/
-.pub/
-build/
-flutter_*.png
-linked_*.ds
-unlinked.ds
-unlinked_spec.ds
-
-# Android related
-**/android/**/gradle-wrapper.jar
-.gradle/
-**/android/captures/
-**/android/gradlew
-**/android/gradlew.bat
-**/android/local.properties
-**/android/**/GeneratedPluginRegistrant.java
-**/android/key.properties
-*.jks
-
-# Coverage
-coverage/
-
-# Symbols
-app.*.symbols
-
-# Obfuscation related
-app.*.map.json
+# IntelliJ
+out/
-# Generated files
-android/app/.cxx
-**/*.g.dart
-**/*.locator.dart
-**/*.router.dart
+# mpeltonen/sbt-idea plugin
+.idea_modules/
-# Project specific
-node_modules/
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+
+# Android studio 3.1+ serialized cache file
+.idea/caches/build_file_checksums.ser
+
+### Gradle template
+.gradle
+**/build/
+!src/**/build/
+
+# Ignore Gradle GUI config
+gradle-app.setting
+
+# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
+!gradle-wrapper.jar
+
+# Cache of project
+.gradletasknamecache
+
+# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
+# gradle/wrapper/gradle-wrapper.properties
+
+# Potentially copyrighted test APK
+*.apk
+
+# Ignore vscode config
.vscode/
+# Dependency directories
+node_modules/
+
+# Ignore IDEA files
+.idea/
+
+.kotlin/
+
+local.properties
+.cxx
\ No newline at end of file
diff --git a/.metadata b/.metadata
deleted file mode 100644
index c689480b51..0000000000
--- a/.metadata
+++ /dev/null
@@ -1,30 +0,0 @@
-# This file tracks properties of this Flutter project.
-# Used by Flutter tool to assess capabilities and perform upgrades etc.
-#
-# This file should be version controlled and should not be manually edited.
-
-version:
- revision: "2663184aa79047d0a33a14a3b607954f8fdd8730"
- channel: "stable"
-
-project_type: app
-
-# Tracks metadata for the flutter migrate command
-migration:
- platforms:
- - platform: root
- create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
- base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
- - platform: android
- create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
- base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
-
- # User provided section
-
- # List of Local paths (relative to this file) that should be
- # ignored by the migrate tool.
- #
- # Files that are not part of the templates will be ignored by default.
- unmanaged_files:
- - 'lib/main.dart'
- - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/.releaserc b/.releaserc
index 5ceed3a89d..40b3142abf 100644
--- a/.releaserc
+++ b/.releaserc
@@ -14,27 +14,17 @@
]
}
],
- "@semantic-release/changelog",
"@semantic-release/release-notes-generator",
- [
- "semantic-release-pub",
- {
- "publishPub": false,
- "updateBuildNumber": true
- }
- ],
- [
- "@semantic-release/exec",
- {
- "prepareCmd": "flutter build apk"
- }
- ],
+ "@semantic-release/changelog",
+ "gradle-semantic-release-plugin",
[
"@semantic-release/git",
{
"assets": [
- "pubspec.yaml"
- ]
+ "CHANGELOG.md",
+ "gradle.properties",
+ ],
+ "message": "chore: Release v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
@@ -42,20 +32,17 @@
{
"assets": [
{
- "path": "build/app/outputs/apk/release/revanced-manager*.apk"
+ "path": "app/build/outputs/apk/release/revanced-manager*.apk?(.asc)"
},
],
- "commits": [
- "message": "chore: Release v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
- ],
- "successComment": false
+ successComment: false
}
],
[
"@saithodev/semantic-release-backmerge",
{
- "backmergeBranches": [{"from": "main", "to": "dev"}],
- "clearWorkspace": true
+ backmergeBranches: [{"from": "main", "to": "dev"}],
+ clearWorkspace: true
}
]
]
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5841049990..f2838ff829 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -96,7 +96,7 @@ If you encounter a bug while using ReVanced Manager, open an issue using the
## 🤚 I want to contribute but don't know how to code
-Even if you don't know how to code, you can still contribute by
+Even if you don't know how to code, you can still contribute by
translating ReVanced Manager on [Crowdin](https://translate.revanced.app/).
❤️ Thank you for considering contributing to ReVanced Manager,
diff --git a/README.md b/README.md
index 3b1b604fa9..91e70d8ce1 100644
--- a/README.md
+++ b/README.md
@@ -73,10 +73,9 @@ ReVanced Manager is an application that uses [ReVanced Patcher](https://github.c
Some of the features ReVanced Manager provides are:
-- 💉 **Patch apps**: Apply any patch of your choice to Android apps
-- 📱 **Portable**: ReVanced Patcher that fits in your pocket
-- 🤗 **Simple UI**: Quickly understand the ins and outs of ReVanced Manager
-- 🛠️ **Customization**: Configurable API, custom sources, language, signing keystore, theme and more
+- ⬇️ **Download**: Automatically download apps using the ReVanced Manager downloader plugin system
+- 💉 **Patch**: Select and apply patches to any Android app
+- 🛠️ **Customize**: Manage patches, apps, signing, themes, updates, and many more settings
## 🔽 Download
diff --git a/SECURITY.md b/SECURITY.md
deleted file mode 100644
index 15e3660da6..0000000000
--- a/SECURITY.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Continuing the legacy of Vanced
-
-
-# 🔒 Security Policy
-
-This document describes how to report security vulnerabilities for ReVanced Manager.
-
-## 🚨 Reporting a Vulnerability
-
-Please open an issue in our [advisory tracker](https://github.com/ReVanced/revanced-manager/security/advisories/new) or reach out privately to us on [Discord](https://discord.gg/revanced).
-
-If a vulnerability is confirmed and accepted, you can join our [Discord](https://discord.gg/revanced) server to receive a special contributor role.
-
-### ⏳ Supported Versions
-
-| Version | Branch | Supported |
-| --------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------------------ |
-|  | main | :white_check_mark: |
-|  | dev | :white_check_mark: |
-|  | compose-dev | :white_check_mark: |
diff --git a/analysis_options.yaml b/analysis_options.yaml
deleted file mode 100644
index 03e6e65932..0000000000
--- a/analysis_options.yaml
+++ /dev/null
@@ -1,156 +0,0 @@
-# This file configures the analyzer, which statically analyzes Dart code to
-# check for errors, warnings, and lints.
-#
-# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
-# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
-# invoked from the command line by running `flutter analyze`.
-
-# The following line activates a set of recommended lints for Flutter apps,
-# packages, and plugins designed to encourage good coding practices.
-include: package:flutter_lints/flutter.yaml
-
-analyzer:
- exclude:
- - lib/app/app.locator.dart
- - lib/app/app.router.dart
- - lib/models/patch.g.dart
- - lib/models/patched_application.g.dart
- - lib/gen/
-
-linter:
- rules:
- - always_declare_return_types
- - require_trailing_commas
- - always_put_control_body_on_new_line
- - always_use_package_imports # we do this commonly
- - annotate_overrides
- - avoid_bool_literals_in_conditional_expressions
- - avoid_double_and_int_checks
- - avoid_empty_else
- - avoid_equals_and_hash_code_on_mutable_classes
- - avoid_escaping_inner_quotes
- - avoid_field_initializers_in_const_classes
- - avoid_function_literals_in_foreach_calls
- - avoid_implementing_value_types
- - avoid_init_to_null
- - avoid_js_rounded_ints
- - avoid_null_checks_in_equality_operators
- - avoid_print
- - avoid_redundant_argument_values
- - avoid_relative_lib_imports
- - avoid_renaming_method_parameters
- - avoid_return_types_on_setters
- - avoid_returning_null_for_void
- - avoid_setters_without_getters
- - avoid_shadowing_type_parameters
- - avoid_single_cascade_in_expression_statements
- - avoid_type_to_string
- - avoid_types_as_parameter_names
- - avoid_unnecessary_containers
- - avoid_void_async
- - avoid_web_libraries_in_flutter # we use web libraries in web-specific code, and our tests prevent us from using them elsewhere
- - await_only_futures
- - camel_case_extensions
- - camel_case_types
- - cancel_subscriptions
- - cast_nullable_to_non_nullable
- - close_sinks # not reliable enough
- - control_flow_in_finally
- - curly_braces_in_flow_control_structures
- - depend_on_referenced_packages
- - deprecated_consistency
- - directives_ordering
- - empty_catches
- - empty_constructor_bodies
- - empty_statements
- - eol_at_end_of_file
- - exhaustive_cases
- - file_names
- - flutter_style_todos
- - hash_and_equals
- - implementation_imports
- - collection_methods_unrelated_type
- - leading_newlines_in_multiline_strings
- - library_prefixes
- - library_private_types_in_public_api
- - missing_whitespace_between_adjacent_strings
- - no_adjacent_strings_in_list
- - no_duplicate_case_values
- - no_logic_in_create_state
- - non_constant_identifier_names
- - noop_primitive_operations
- - null_check_on_nullable_type_parameter
- - null_closures
- - overridden_fields
- - package_names
- - prefer_adjacent_string_concatenation
- - prefer_asserts_in_initializer_lists
- - prefer_collection_literals
- - prefer_conditional_assignment
- - prefer_const_constructors
- - prefer_const_constructors_in_immutables
- - prefer_const_declarations
- - prefer_const_literals_to_create_immutables
- - prefer_contains
- - prefer_final_fields
- - prefer_final_in_for_each
- - prefer_final_locals
- - prefer_for_elements_to_map_fromIterable
- - prefer_foreach
- - prefer_function_declarations_over_variables
- - prefer_generic_function_type_aliases
- - prefer_if_elements_to_conditional_expressions
- - prefer_if_null_operators
- - prefer_initializing_formals
- - prefer_inlined_adds
- - prefer_interpolation_to_compose_strings
- - prefer_is_empty
- - prefer_is_not_empty
- - prefer_is_not_operator
- - prefer_iterable_whereType
- - prefer_null_aware_method_calls # "call()" is confusing to people new to the language since it's not documented anywhere
- - prefer_null_aware_operators
- - prefer_single_quotes
- - prefer_spread_collections
- - prefer_typing_uninitialized_variables
- - provide_deprecation_message
- - recursive_getters
- - sized_box_for_whitespace
- - slash_for_doc_comments
- - sort_child_properties_last
- - sort_constructors_first
- - sort_pub_dependencies
- - sort_unnamed_constructors_first
- - test_types_in_equals
- - throw_in_finally
- - tighten_type_of_initializing_formals
- - type_init_formals
- - unnecessary_brace_in_string_interps
- - unnecessary_const
- - unnecessary_getters_setters
- - unnecessary_new
- - unnecessary_null_aware_assignments
- - unnecessary_null_checks
- - unnecessary_null_in_if_null_operators
- - unnecessary_nullable_for_final_variable_declarations
- - unnecessary_overrides
- - unnecessary_parenthesis
- - unnecessary_statements
- - unnecessary_string_escapes
- - unnecessary_string_interpolations
- - unnecessary_this
- - unrelated_type_equality_checks
- - use_build_context_synchronously
- - use_full_hex_values_for_flutter_colors
- - use_function_type_syntax_for_parameters
- - use_if_null_to_convert_nulls_to_bools
- - use_is_even_rather_than_modulo
- - use_key_in_widget_constructors
- - use_late_for_private_fields_and_variables
- - use_named_constants
- - use_raw_strings
- - use_rethrow_when_possible
- - use_setters_to_change_properties
- - use_test_throws_matchers
- - valid_regexps
- - void_checks
diff --git a/android/.gitignore b/android/.gitignore
deleted file mode 100644
index 55afd919c6..0000000000
--- a/android/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-gradle-wrapper.jar
-/.gradle
-/captures/
-/gradlew
-/gradlew.bat
-/local.properties
-GeneratedPluginRegistrant.java
-
-# Remember to never publicly share your keystore.
-# See https://flutter.dev/to/reference-keystore
-key.properties
-**/*.keystore
-**/*.jks
diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts
deleted file mode 100644
index 289feb1c3a..0000000000
--- a/android/app/build.gradle.kts
+++ /dev/null
@@ -1,104 +0,0 @@
-plugins {
- id("com.android.application")
- id("kotlin-android")
- // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
- id("dev.flutter.flutter-gradle-plugin")
-}
-
-android {
- namespace = "app.revanced.manager.flutter"
- compileSdk = 35
-
- compileOptions {
- isCoreLibraryDesugaringEnabled = true
-
- sourceCompatibility = JavaVersion.VERSION_17
- targetCompatibility = JavaVersion.VERSION_17
- }
-
- kotlinOptions {
- jvmTarget = JavaVersion.VERSION_17.toString()
- }
-
- defaultConfig {
- applicationId = "app.revanced.manager.flutter"
- minSdk = 26
- targetSdk = 35
- versionCode = flutter.versionCode
- versionName = flutter.versionName
-
- resValue("string", "app_name", "ReVanced Manager")
- }
-
- applicationVariants.all {
- outputs.all {
- this as com.android.build.gradle.internal.api.ApkVariantOutputImpl
-
- outputFileName = "revanced-manager-$versionName.apk"
- }
- }
-
- buildTypes {
- configureEach {
- isShrinkResources = false
- isMinifyEnabled = false
-
- signingConfig = signingConfigs["debug"]
-
- ndk.abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86_64")
- }
-
- release {
- isShrinkResources = true
- isMinifyEnabled = true
-
- val keystoreFile = file("keystore.jks")
- if (keystoreFile.exists()) {
- signingConfig = signingConfigs.create("release") {
- storeFile = keystoreFile
- storePassword = System.getenv("KEYSTORE_PASSWORD")
- keyAlias = System.getenv("KEYSTORE_ENTRY_ALIAS")
- keyPassword = System.getenv("KEYSTORE_ENTRY_PASSWORD")
- }
-
- resValue("string", "app_name", "ReVanced Manager")
- } else {
- applicationIdSuffix = ".development"
- resValue("string", "app_name", "ReVanced Manager (Development)")
- signingConfig = signingConfigs["debug"]
- }
- }
-
- debug {
- applicationIdSuffix = ".debug"
- resValue("string", "app_name", "ReVanced Manager (Debug)")
- }
-
- named("profile") {
- initWith(getByName("debug"))
- applicationIdSuffix = ".profile"
- resValue("string", "app_name", "ReVanced Manager (Profile)")
- }
- }
-
- packaging {
- jniLibs {
- useLegacyPackaging = true
- excludes.add("/prebuilt/**")
- }
-
- resources {
- excludes.add("/prebuilt/**")
- }
- }
-}
-
-flutter {
- source = "../.."
-}
-
-dependencies {
- coreLibraryDesugaring(libs.desugar.jdk.libs) // https://pub.dev/packages/flutter_local_notifications#gradle-setup
- implementation(libs.revanced.patcher)
- implementation(libs.revanced.library)
-}
diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro
deleted file mode 100644
index fb7c0bf92b..0000000000
--- a/android/app/proguard-rules.pro
+++ /dev/null
@@ -1,17 +0,0 @@
--dontobfuscate
-
--keep class app.revanced.** { *; }
--keep class com.android.tools.smali.** { *; }
--keep class kotlin.** { *; }
--keep class com.google.auto.value.** { *; }
--keep class com.android.apksig.internal.** { *; }
--keepnames class com.google.common.collect.**
--keepnames class org.xmlpull.** { *; }
-
--dontwarn com.google.auto.value.**
--dontwarn com.google.j2objc.annotations.*
--dontwarn java.awt.**
--dontwarn javax.**
-
-# Required for Share Plus, ref: ReVanced/revanced-manager#2474
--keep interface android.content.res.XmlResourceParser { *; }
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
deleted file mode 100644
index 399f6981d5..0000000000
--- a/android/app/src/debug/AndroidManifest.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 52ffb5eefb..0000000000
--- a/android/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/android/app/src/main/kotlin/app/revanced/manager/flutter/ExportSettingsActivity.kt b/android/app/src/main/kotlin/app/revanced/manager/flutter/ExportSettingsActivity.kt
deleted file mode 100644
index 4290cbcc31..0000000000
--- a/android/app/src/main/kotlin/app/revanced/manager/flutter/ExportSettingsActivity.kt
+++ /dev/null
@@ -1,81 +0,0 @@
-package app.revanced.manager.flutter
-
-import android.app.Activity
-import android.content.Context
-import android.content.Intent
-import android.content.pm.PackageManager
-import android.os.Bundle
-import android.util.Base64
-import org.json.JSONObject
-import java.io.ByteArrayInputStream
-import java.io.File
-import java.security.cert.CertificateFactory
-import java.security.cert.X509Certificate
-import java.security.MessageDigest
-
-class ExportSettingsActivity : Activity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
-
- if (getFingerprint(callingPackage!!) == getFingerprint(packageName)) {
- // Create JSON Object
- val json = JSONObject()
-
- // Default Data
- json.put("keystorePassword", "s3cur3p@ssw0rd")
-
- // Load Shared Preferences
- val sharedPreferences = getSharedPreferences("FlutterSharedPreferences", Context.MODE_PRIVATE)
- val allEntries: Map = sharedPreferences.getAll()
- for ((key, value) in allEntries.entries) {
- json.put(key.replace("flutter.", ""), value)
- }
-
- // Load keystore
- val keystoreFile = File(getExternalFilesDir(null), "/revanced-manager.keystore")
- if (keystoreFile.exists()) {
- val keystoreBytes = keystoreFile.readBytes()
- val keystoreBase64 = Base64.encodeToString(keystoreBytes, Base64.DEFAULT)
- json.put("keystore", keystoreBase64)
- }
-
- // Load saved patches
- val storedPatchesFile = File(filesDir.parentFile.absolutePath, "/app_flutter/selected-patches.json")
- if (storedPatchesFile.exists()) {
- val patchesBytes = storedPatchesFile.readBytes()
- val patches = String(patchesBytes, Charsets.UTF_8)
- json.put("patches", JSONObject(patches))
- }
-
- // Send data back
- val resultIntent = Intent()
- resultIntent.putExtra("data", json.toString())
- setResult(Activity.RESULT_OK, resultIntent)
- finish()
- } else {
- val resultIntent = Intent()
- setResult(Activity.RESULT_CANCELED)
- finish()
- }
- }
-
- fun getFingerprint(packageName: String): String {
- // Get the signature of the app that matches the package name
- val packageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES)
- val signature = packageInfo.signatures!![0]
-
- // Get the raw certificate data
- val rawCert = signature.toByteArray()
-
- // Generate an X509Certificate from the data
- val certFactory = CertificateFactory.getInstance("X509")
- val x509Cert = certFactory.generateCertificate(ByteArrayInputStream(rawCert)) as X509Certificate
-
- // Get the SHA256 fingerprint
- val fingerprint = MessageDigest.getInstance("SHA256").digest(x509Cert.encoded).joinToString("") {
- "%02x".format(it)
- }
-
- return fingerprint
- }
-}
diff --git a/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt b/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt
deleted file mode 100644
index 757eeb0cff..0000000000
--- a/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt
+++ /dev/null
@@ -1,427 +0,0 @@
-package app.revanced.manager.flutter
-
-import android.app.PendingIntent
-import android.app.SearchManager
-import android.content.Intent
-import android.content.pm.PackageInstaller
-import android.os.Build
-import android.os.Handler
-import android.os.Looper
-import app.revanced.library.ApkUtils
-import app.revanced.library.ApkUtils.applyTo
-import app.revanced.manager.flutter.utils.Aapt
-import app.revanced.manager.flutter.utils.packageInstaller.InstallerReceiver
-import app.revanced.manager.flutter.utils.packageInstaller.UninstallerReceiver
-import app.revanced.patcher.Patcher
-import app.revanced.patcher.PatcherConfig
-import app.revanced.patcher.patch.Patch
-import app.revanced.patcher.patch.PatchResult
-import app.revanced.patcher.patch.loadPatchesFromDex
-import io.flutter.embedding.android.FlutterActivity
-import io.flutter.embedding.engine.FlutterEngine
-import io.flutter.plugin.common.MethodChannel
-import kotlinx.coroutines.flow.FlowCollector
-import kotlinx.coroutines.runBlocking
-import org.json.JSONArray
-import org.json.JSONObject
-import java.io.File
-import java.io.PrintWriter
-import java.io.StringWriter
-import java.util.logging.LogRecord
-import java.util.logging.Logger
-
-
-class MainActivity : FlutterActivity() {
- private val handler = Handler(Looper.getMainLooper())
- private lateinit var installerChannel: MethodChannel
- private var cancel: Boolean = false
- private var stopResult: MethodChannel.Result? = null
-
- private lateinit var patches: Set>
-
- override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
- super.configureFlutterEngine(flutterEngine)
-
- val patcherChannel = "app.revanced.manager.flutter/patcher"
- val installerChannel = "app.revanced.manager.flutter/installer"
- val openBrowserChannel = "app.revanced.manager.flutter/browser"
-
- MethodChannel(
- flutterEngine.dartExecutor.binaryMessenger,
- openBrowserChannel
- ).setMethodCallHandler { call, result ->
- if (call.method == "openBrowser") {
- val searchQuery = call.argument("query")
- openBrowser(searchQuery)
- result.success(null)
- } else {
- result.notImplemented()
- }
- }
-
- val mainChannel =
- MethodChannel(flutterEngine.dartExecutor.binaryMessenger, patcherChannel)
-
- this.installerChannel =
- MethodChannel(flutterEngine.dartExecutor.binaryMessenger, installerChannel)
-
- mainChannel.setMethodCallHandler { call, result ->
- when (call.method) {
- "runPatcher" -> {
- val inFilePath = call.argument("inFilePath")
- val outFilePath = call.argument("outFilePath")
- val selectedPatches = call.argument>("selectedPatches")
- val options = call.argument